I had been using only the software debugging mode in the past. Today it was the first day on the development board. I got the board LEDS blinking. However when I wanted to make them blink on button input on development board, it simply did not work. I think I am probably not setting all registers. Here is the simple program I used:
void main(void)
{
TRISA=0XFF;
TRISC=0X00;
while (1)
{
if (PORTA==1)
{
delay_ms(10);
PORTC=0XFF;
delay_ms(1000);
PORTC=0X00;
}
}
}
Does it have to do something with ADCON0 and ADCON1 register?- I used RA4 (digital input on POR) and PORT D, but never got the LEDS blinking on input.
Thanks
void main(void)
{
TRISA=0XFF;
TRISC=0X00;
while (1)
{
if (PORTA==1)
{
delay_ms(10);
PORTC=0XFF;
delay_ms(1000);
PORTC=0X00;
}
}
}
Does it have to do something with ADCON0 and ADCON1 register?- I used RA4 (digital input on POR) and PORT D, but never got the LEDS blinking on input.
Thanks