Код
int i;
char run=1;
eeprom int dat1=0;
// External Interrupt 0 service routine
interrupt [EXT_INT0] void ext_int0_isr(void)
{
if (run)
{
while (!PORTB.6)
{
delay_us(10);
i++;
}
run=0;
}
dat1=i;
}
char run=1;
eeprom int dat1=0;
// External Interrupt 0 service routine
interrupt [EXT_INT0] void ext_int0_isr(void)
{
if (run)
{
while (!PORTB.6)
{
delay_us(10);
i++;
}
run=0;
}
dat1=i;
}