I am trying to get a LED blinking on my pic18f25k80. The LED is connected to pin: RC1.
I think that I might be missing some configuration.
BR Fredrik
#include <p18f25k80.h>
void delay1s(void);
void main(void) {
TRISC = 0;
OSCCON = 0xF2;
while (1) {
delay1s();
LATC = 0xFF;
delay1s();
LATC = 0x00;
}
}
void delay1s(void) {
int m,n;
for (m=0;m<200;m++) {
for (n=0;n<200;n++);
}
}
update:
Found the actual problem, I needed this configuration:
# pragma config SOSCSEL = 0x2