I want to send half a byte to portb pins 0,1,4,5 and use pins 2 and 3 as analog input.
so pin 0 will be bit0, pin 1 will be bit1, pin4 will be bit2 and pin5 will be bit3.
Would it work to do the following?
dir portb =b'00110011'
set portb=b'00100001'
to send 9 to my half byte without affecting the analogue inputs.
or do I need to do it the hard way
set portb.0=1
set portb.1=0
set portb.4=0\
set portb.5=1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to send half a byte to portb pins 0,1,4,5 and use pins 2 and 3 as analog input.
so pin 0 will be bit0, pin 1 will be bit1, pin4 will be bit2 and pin5 will be bit3.
Would it work to do the following?
dir portb =b'00110011'
set portb=b'00100001'
to send 9 to my half byte without affecting the analogue inputs.
or do I need to do it the hard way
set portb.0=1
set portb.1=0
set portb.4=0\
set portb.5=1