This instruction for 16F series:
Does this essentially mean:
RB0 = output
RB1 = input
RB2 = output
RB3 = output
RB4 = input
RB5 = input
RB6 = output
RB7 = output ???
Or, does reading B'xxxxxxx' from left to right go bit 7,6,5,4,3,2,1,0?
Another question: Say pin 4 is RA3/MCLR/Vpp and you want to use it as MCLR. Would you set that pin as input whenever you're specifying the literal value? What about pins that ultimately wont be connected to anything in the circuit, are those better set as inputs or outputs?
I'm sorry to be bothersome with questions like these, but books and online tutorials only go into so much detail... even those specified for "beginners" make too many assumptions of things "you should already know".
Rich (BB code):
bsf status,5
movlw B'01001100'
movwf trisb
RB0 = output
RB1 = input
RB2 = output
RB3 = output
RB4 = input
RB5 = input
RB6 = output
RB7 = output ???
Or, does reading B'xxxxxxx' from left to right go bit 7,6,5,4,3,2,1,0?
Another question: Say pin 4 is RA3/MCLR/Vpp and you want to use it as MCLR. Would you set that pin as input whenever you're specifying the literal value? What about pins that ultimately wont be connected to anything in the circuit, are those better set as inputs or outputs?
I'm sorry to be bothersome with questions like these, but books and online tutorials only go into so much detail... even those specified for "beginners" make too many assumptions of things "you should already know".
Last edited: