#int_timer1
void timer1_isr(void){
int16 tservo;
int16 tservo1;
tservo=Servo_Pos[Servo_nro];
tservo1=Servo_Pos[Servo_nro+1];
// fServo1=0;
iguales=0;
bit_set(Port_Copy,Servo_nro);
bit_set(Port_Copy,Servo_nro+1);
output_b((int8)Port_Copy & 0x00ff);
//output_D((int8)(Port_Copy>>8)& 0x00ff);
if(tservo>tservo1){
fServo1=1;
Ticks4NextInterrupt=tservo;
ccp_2=tservo1;
Tics2_5ms=65535 - Ticks4Window + tservo;
}
else{
fServo1=0;
Ticks4NextInterrupt=tservo1;
ccp_2=tservo;
Tics2_5ms=65535 - Ticks4Window + tservo1;
}
if(tservo1==tservo)flag_phase=1;
// #ASM bcf 0xd,0
// bcf 0xc,2
// #ENDASM
set_timer1(0);
enable_interrupts(int_ccp2);
}