A very frustrating problem I'm facing: I cannot make that LED to lit at all. Here is the simple assembly program, it just turns on an LED, nothing special:
My LED has the positive terminal connected to pin 18 on the PIC (bit 2 of PORTA) and negative terminal to the negative of the power supply (it actually connects through a resistor first).
I know the LED works because I can connect its positive terminal to the Vdd terminal of the PIC and it turns on fine.
I'm also using absolute and not relocable code.
Could you please advise, what am I doing wrong?
Rich (BB code):
#include "p16f627a.inc"
STATUS equ 03h
TRISA equ 85h
PORTA equ 05h
bsf STATUS,5
movlw 00h
movwf TRISA
bcf 03h,5
movlw 02h
movwf PORTA
end
I know the LED works because I can connect its positive terminal to the Vdd terminal of the PIC and it turns on fine.
I'm also using absolute and not relocable code.
Could you please advise, what am I doing wrong?