Manjuhb
Newbie level 6
Hi All,
I have written simple code to blink an LED when switch is pressed. But problem I'm facing here is when I press the button LED is going high but it is not turning off after 10sec delay. Please let me where is the problem in the below code. I'm using CCS C compiler and here RA3 is defined as input
port and RC0 is defined output port.
I have written simple code to blink an LED when switch is pressed. But problem I'm facing here is when I press the button LED is going high but it is not turning off after 10sec delay. Please let me where is the problem in the below code. I'm using CCS C compiler and here RA3 is defined as input
port and RC0 is defined output port.
Code:
WHILE (1)
{
IF (RA3 == 0)
{
RC0 = 1 ;
delay_ms(10000);
RC0 = 0 ;
}
}