Trouble with BS2 and the new LCD0821 rev 2.0

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
Turnbull2112
LCD?
Posts: 9
Joined: Tue Jan 04, 2011 8:39 am
Location: Florida

Trouble with BS2 and the new LCD0821 rev 2.0

Post by Turnbull2112 »

I am trying to get my BS2 to communicate with the LCD0821. I am not sure which connector to use on the back. The three pin or the four pin connector?? Also which jumpers should be selected on the reverse side of the LCD? TTL or 232?? Is there any example code as far as configuration settings and such? So far I am trying to go through the three pin connector in 232 and I'm getting a bunch of gibberish. Any help would be greatly appreciated. I am working on a prototype and I need this to work so I can get into testing and production. Thanks!!
Rob

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi Rob,

Great to hear you are working the LCD0821 into your project, we have a few appnotes online for Basic Stamp at our matrixorbital.ca support site.

You can use either the 3 or 4 pin connector, just keep in mind you cannot receive information from the display using the 3 pin. TTL or RS232 will depend on your controller, check out what levels it uses to determine how to set the display. You can check out the display manual for more info on all settings.

IF you have any more questions or concerns regarding your LCD0821 as you continue development, please don't hesitate to post.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

Turnbull2112
LCD?
Posts: 9
Joined: Tue Jan 04, 2011 8:39 am
Location: Florida

Post by Turnbull2112 »

I believe the BS2 uses 0-5v for its serial output. Is the LCD capable of reading this? I've read the appnotes and manual but I'm still struggling here. I've even tried downloading the sample code for the Basic Stamp but I get a bunch of garbled data on the LCD. Thanks!

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi Rob,

0-5v logic will require that the display be set to TTL mode, this simple change should clear up your garbage. Be sure to remove all three RS232 resistors and connect only the two TTL pads.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

Turnbull2112
LCD?
Posts: 9
Joined: Tue Jan 04, 2011 8:39 am
Location: Florida

Post by Turnbull2112 »

I made the changes to the pads and I'm getting what looks like a bunch of commas and lower case "p" characters. I'm using the sample program from your webpage. See below.

Code: Select all

'{$STAMP BS2}
' {$PBASIC 2.5}

SEROUT 0, 240, ["HELLO WORLD"]

I'm using PIN 0 instead of one. Same results regardless of pin. I ordered 3 of these units and so far two are doing the same thing. Am I missing something here?
Thanks

Turnbull2112
LCD?
Posts: 9
Joined: Tue Jan 04, 2011 8:39 am
Location: Florida

Post by Turnbull2112 »

I think I figured it out. i guess the rev 2.0 default baud rate is 19200. The examples are showing 9600. Here is my code that started working. Thanks again for the help!!

' {$STAMP BS2}
' {$PBASIC 2.5}

SEROUT 1, 33, [254] 'Command Prefix
SEROUT 1, 33, [88] 'Clear screen command
SEROUT 1, 33, ["Hello"]

Post Reply