Hi,
I want when I press button LED gets on for some time and then switch off. for keeping led on for sometime can I use TIMER in ISR instead __delay_cycles() function ?
#pragma vector=PORT1_VECTOR
__interrupt void port1_ISR(void){
P1OUT |=0x01;
_delay_cycles(10000); //instead of this delay Can I use timer or any other efficient way ?
P1OUT &=~ 0x01;
P1IFG = 0;
}