I have the simplest piece of code that I have probably ever written, but it still doesn't work. The code is as follows, and is supposed to flash a LED connected to PortF.1 The LED refuses to flash.
Chip is 18F66J60
Crystal is 25MHz (yes, I know my flash rate will be off)
Watchdog timer is OFF
Oscillator is set to OSC1,OSC2 inputs and "HS mode"
An oscilloscope confirms that the crystal is oscillating with
a good 25MHz signal.
Can someone tell me what I'm doing wrong?
DEFINE OSC 20
TRISF = %00000000 ' Make all output
ADCON1 = %11111111 ' Make certain that PortF.1 is digital
CMCON = %00000000 ' Disable comparator outputs
Flash:
PortF.1 = 1
PAUSE 1000
PortF.1 = 0
PAUSE 1000
GOTO Flash
END
Bookmarks