desbromilow
New Member
G'Day,
my field desk is working well in the camp accomodation, and I spent the last few days getting a 16x2 LCD (HD44780) to talk to a 18m2.
I used a version of the picaxe sample code I found by googling - it all worked fine once I remembered to insert the R/W connection to ground (cost me 2 days to find it)
Long story short, I did look at some code in the Picaxe book by David Lincoln - second edition, pages 195/196
in the routine called lcdout (page 196) there is this line of code:
pins = outbyte & $F0|2|rs
I've found references in the manuals and books regarding the "&" symbol and it being used as a bitwise AND between outbyte and $F0... but what is the rest of it doing?
Where is the reference I missed which explains it, and any other similar bitwise/bytewise commands?
in the above sample code, rs is a byte variable containing either a 1, or a 0.
many many thanks in advance,
Des
my field desk is working well in the camp accomodation, and I spent the last few days getting a 16x2 LCD (HD44780) to talk to a 18m2.
I used a version of the picaxe sample code I found by googling - it all worked fine once I remembered to insert the R/W connection to ground (cost me 2 days to find it)
Long story short, I did look at some code in the Picaxe book by David Lincoln - second edition, pages 195/196
in the routine called lcdout (page 196) there is this line of code:
pins = outbyte & $F0|2|rs
I've found references in the manuals and books regarding the "&" symbol and it being used as a bitwise AND between outbyte and $F0... but what is the rest of it doing?
Where is the reference I missed which explains it, and any other similar bitwise/bytewise commands?
in the above sample code, rs is a byte variable containing either a 1, or a 0.
many many thanks in advance,
Des