Peter1960
- 25th November 2007, 03:17
Hi,
I looked at the bitwise functions, and the examples given in
http://www.picbasic.co.uk/forum/showthread.php?t=2783&highlight=masking
Say you want PortB.0 as Input and Rest as Outputs
Assuming you set
TRISB = &10000000 '
then
PortB = PortBnewdata & $FE ' Will this only change the values on bits 1 to 7
' and leave the value of the input on bit 0 the same
' ie as an input ?
kind regards
Peter
I looked at the bitwise functions, and the examples given in
http://www.picbasic.co.uk/forum/showthread.php?t=2783&highlight=masking
Say you want PortB.0 as Input and Rest as Outputs
Assuming you set
TRISB = &10000000 '
then
PortB = PortBnewdata & $FE ' Will this only change the values on bits 1 to 7
' and leave the value of the input on bit 0 the same
' ie as an input ?
kind regards
Peter