My objective is to light an LED. So far, I have the circuit ready and the program *almost* working. That's what I need help with. I want to set RA1 high, but while executing the following code, I tested all pins(in case I messed up on the numbering/positioning) with a multimeter, and none of the pins, other than Vdd and Vss, registered.
Is there a problem in my code? I noticed that when ran in a simulator, PORTA(0x05) never changes value, I assumed this was normal since it is not average memory, but it could also be the effect of a bug.
STATUS equ 03h
PORTA equ 05h
PORTB equ 06h
TRISA equ 85h
TRISB equ 86h
start
call init
main
movlw 02h
xorwf PORTA,01h
movlw 0ffh
call delay
call delay
goto main
init
; switch to bank 1
bsf STATUS,05h
; clear bit 1 to set RA1 to out
bcf TRISA,01h
; switch back
bcf STATUS,05h
return
delay
movwf 20h
wait
decfsz 20h,01h
goto wait
return
end