Read a full port?

Rickg1

New Member
I must be missing something in the manuals. I want to read an full port ( all 8 bits ) and test for certain bit values to assign a variable a value ( in ASCII ) . Can one "read" a full port in any way? If so can someone show me how?
 

hippy

Ex-Staff (retired)
You can use "Let b0 = pinsX" to read an entire port, where 'X' is whichever port you wish to read; A, B, C or D.

Once you have the port data in variable 'b0' ( or 'b1', 'b2' or 'b3' ) you can then use 'bitN' variables to test or use the bits in the those variables. The 'N' will depend on variable used, 'bit0' to 'bit7' if using 'b0'.
 
Top