skeeterb
Member
I've got a question in regards to programming a pic. What do I have to do to setup the ports as Input and Output and read the inputs to activate and deactivate the output. Currently if I try to use TRISA and TRISB in my code, the programing program throws me out with and error message.
here is a bit of the code I have now
ORG 0x000
GOTO Start
Init
bsf 03h,5
movlw b'11111111'
movwf 05h
movlw b'00000000'
movwf 06h
bcf 03h,5
goto Main
Start
call Init
Main
btfsc PORTA,1
bsf PORTB,3
goto Main
END
here is a bit of the code I have now
ORG 0x000
GOTO Start
Init
bsf 03h,5
movlw b'11111111'
movwf 05h
movlw b'00000000'
movwf 06h
bcf 03h,5
goto Main
Start
call Init
Main
btfsc PORTA,1
bsf PORTB,3
goto Main
END