- #1
- 729
- 0
I need some help setting a pin high. I have tested all pins(incase I accidentally set the wrong one) with a multimeter, and none, other than Vdd and Vss, of course, were high. I also ran it in a simulator, and notice that the value at PORTA never changes, its always 0.
Is there something special I need to do to get it to start, or does it start as soon as it has current to Vdd and ground on Vss? Also, if it was fried, would a PICkit2 programmer, used with MPLAB, have an error message of some sort?
Is there something special I need to do to get it to start, or does it start as soon as it has current to Vdd and ground on Vss? Also, if it was fried, would a PICkit2 programmer, used with MPLAB, have an error message of some sort?
Code:
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
bsf STATUS,05h
bcf TRISA,01h
bcf STATUS,05h
return
delay
movwf 20h
wait
decfsz 20h,01h
goto wait
return
end