Hi forum!
This is my first post so I thought, "why not start it off with a question?":
How do you light a LED?
I've bought a demonstration/development board mounted with the 18F8722 PIC, and 8 LEDs.
For a first program I'm going to choose the obvious and attempt to light one of my LEDs.
The problem is that I can't get it working, - it simply won't light any LED.
I'm using the PICKit 3 programmer/debugger to program my PIC. When I program the device, I have the board powered on, and the PICKit 3 programmer connected through a USB cable.
All I get in the Output console under the PICKit 3 tab when I program the device is: "Programming...
Programming/Verify complete". After that I simply unplug the PICKit 3 programmer, and pull the plug to the 9V power supply. After that I replug the power source, but nothing happens..
This is the full source code for this simple program:
If you need any more information, just tell me and I'll be happy to provide it .
-Best regards,
Benjamin.
This is my first post so I thought, "why not start it off with a question?":
How do you light a LED?
I've bought a demonstration/development board mounted with the 18F8722 PIC, and 8 LEDs.
For a first program I'm going to choose the obvious and attempt to light one of my LEDs.
The problem is that I can't get it working, - it simply won't light any LED.
I'm using the PICKit 3 programmer/debugger to program my PIC. When I program the device, I have the board powered on, and the PICKit 3 programmer connected through a USB cable.
All I get in the Output console under the PICKit 3 tab when I program the device is: "Programming...
Programming/Verify complete". After that I simply unplug the PICKit 3 programmer, and pull the plug to the 9V power supply. After that I replug the power source, but nothing happens..
This is the full source code for this simple program:
Rich (BB code):
list p=18F8722
#include p18F8722.inc
CONFIG OSC = HSPLL
CONFIG FCMEN = OFF
CONFIG IESO = OFF
CONFIG PWRT = OFF
CONFIG BOREN = OFF
CONFIG WDT = OFF
CONFIG MCLRE = ON
CONFIG LVP = OFF
CONFIG XINST = OFF
org 0x0000
start:
banksel TRISB
clrf TRISB
banksel PORTB
movlw 0x00ff
movwf PORTB
end
-Best regards,
Benjamin.