Show a port on an lcd

Rickg1

New Member
I'm trying to show the state of the input pins of a whole port. I want it to be in binary e.g state of b.7 thru b.0. Is this possible? Want only 1's and 0's on the lcd. I have tried a lot of different programs in an 20m2 but can get any code to show 1's and 0's. Any help is needed. Thanks
 

inglewoodpete

Senior Member
You don't say how you have connected your PICAXE to your LCD. The following code assumes that you are using a serial interface like the AXE033 on the LCD. In the following code, I have assumed that the data is sent to the serial LCD module via pin C.1

Refer to the SerOut command and also Special Function Registers description in Manual 2 (Eg Page 18 for M2-series PICAXEs).

Code:
[color=Blue]SerOut c.1[/color][color=Black], [/color][color=Blue]T4800_4[/color][color=Black], [/color][color=Blue]([/color][color=Black]#[/color][color=Purple]pinb.7[/color][color=Black], #[/color][color=Purple]pinb.6[/color][color=Black], #[/color][color=Purple]pinb.5[/color][color=Black], #[/color][color=Purple]pinb.4[/color][color=Black], #[/color][color=Purple]pinb.3[/color][color=Black], #[/color][color=Purple]pinb.2[/color][color=Black], #[/color][color=Purple]pinb.1[/color][color=Black], #[/color][color=Purple]pinb.0[/color][color=Blue])[/color]
 

Rickg1

New Member
Thank you so much. that worked.
I do have an serial lcd and all I could get is 7 square blocks or the numbers 7 thru 0. I'm decoding some keyboards I have laying around here to use them in new projects.
Thanks again.
 
Top