TRIS = direction (0 for output)
PORT = high or low (0 for low)
Don't connect anything to the unused pins.
Here's another advanced tip:
RBPU will turn a weak pullup on PORTB, handy for pushbuttons.
I must have them set.
it looks like this. Is this right?
init
movlw 0 ;initialise port settings
tris portb
movwf portb
movlw 1
tris porta
bcf porta,0
Last edited: