#define OUTPUTB PORT1.1 #define OUTPUTC PORT1.2 const uint8_t port_val[] = {0x02, 0x03}; void func(void) { bool B_or_C; SETUP_TIMER(); START_TIMER(); // Output A goes high 2 clock cycles after this instruction. } //--------------------------------- // ISR to drive output B or C high. // Note that this is deterministic code and must not have any conditional statements! //--------------------------------- void _interrupt[TIMER] drive_B_or_C_high(void) { PORTA = PORTA | port_val[BorC]; }