I'm quite new to microcontrollers, but have completed a successful project on a PIC16F628A. I need to eventually have USB capability and want to learn the PIC18F2550. To start simply, I wired a circuit with an LED and used a 20Mhz crystal with the following code:
DEFINE OSC 20
loop:
High PORTA.0 ' Turn on LED connected to PORTA.0
Pause 500 ' Delay for .5 seconds
Low PORTA.0 ' Turn off LED connected to PORTA.0
Pause 500 ' Delay for .5 seconds
Goto loop ' Go back to loop and blink LED forever
End
This works but the LED blinks twice as fast as it should. I haven't yet run across anything in the Datasheet that would account for this. I'm sure I'm missing something simple. Any input is appreciated.
Thanks,
Jeff
Bookmarks