No need to stop interrupts in int_ext just set timer0() and the flag
#int_ext
isr() {
{
set_timer0(0);
ready=1;
}
I'm not sure what your need is when setting Timer0 to zero,
I expect you are trying to measure something...If the external input is what's being measured then I don;t see how it will work !

If you Get_Timer0() before resetting it, you will be able to measure the time between the last interrupt and the current interrupt. Assuming Timer0 does not overflow. !

void main()
{
set_tris_A(0xFF);
set_tris_B(0xFF);
set_tris_C(0x00);
setup_timer_0(RTCC_DIV_16|RTCC_Internal); //Timer 0 Setup, counts up with 62,5kHz
//Teilung: When the counter has the value 1, 16us have left

delay_ms(80); //80ms delay to wait for the beginning of the next signal
enable_interrupts(int_ext); //allow ext Interrupt on Pin B0
flag=0; //Set The Interrupt Flag to Zero to get out of the cycle
abtast=75; //The Timer Value 75 is the same as 1,2 ms and i need that time to scan my bit in the 3/4 bit size
i=0;
}
}
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 10728