First thing to do is to put all pins to digital, since you are not going to use ADC.
ADCON1 = 7
Second thing to do is to fix what you want to do with these digital pins. Outputs? or Inputs? Now since you want to flash one led then we will set all as outputs, setting the TRIS register.
TRISA = %00000000
TRISB = %00000000
And place all to low level
PortA = 0
PortB = 0
Now your code
start:
High PortB.0
pause 1000
low PortB.0
pause 1000
goto start
Here I assume you have connected your led with 330 Ohms resistor in series to portB.0, which is pin 6. If you have use a different pin then change the reference.
You can also use ALIAS giving a name to the port, but you must declare it before to use it.
Led var PortB.0
start:
High Led
pause 1000
low Led
pause 1000
goto start
Will do the same as the previuos code. Hope it will help.
I didn't check if your oscillator setting is correct or not, I assume that is correct.
Al.
All progress began with an idea
Bookmarks