LCD and the Basic Stamp II




note: pictures of the LCD display can be seen in the next two sections

$5 alphanumeric LCD

There's a parts store not too far from my house that literally has aisles of old junk at good prices. Almost all of it is new old junk (unused, but not new), and most probably comes from wherehouses that go bankrupt or something. You can get a 5v 1A power supply for 5 bucks. There is a bucket of like 100 reed switches that you can get for 49 cents a peice. And Vacuum tubes.

Anyways, I was walking through the place and came across a bunch of LCD displays. They had serial modules for 15 bucks and up, a couple dozens of them. And some 3" x 5" graphical displays. And then i found the perfect one... 2 for $10, two line by 24 characters.

As i'd seen them priced online for something like $40, 2 for 10 sounded great. I bought them, as well as some other junk. And into the drawer they went. I was still learning the BS2 instruction set at the time, and making a small robot (BoeBot) move around was a feat for me :)

Time is of the Essence

Well, now i'm a few months older and a lot (or so i like to think) smarter. I soldered on 14 copper wires onto the bus on the end of the LCD and hooked them down the center of the breadboard on the BOE. A bit of scanning online will find you the stats on the LCD module usually... mine used the Hitachi chips, which have lots of documentation online.

Important note: Unlike most things you will encounter in the digital world, most LCD displays have a bus numbered as follows:

14    13
12    11
10     9
 8     7
 6     5
 4     3
 2     1

Anyways, I then ran jumpers from the breadboard to the appropriate pins on the BASIC STAMP. I used the config as follows, and this will work for most LCDs

           use      connect to
----------------------------------------
pin  1     ground     ground
pin  2     power      +5v
pin  3     contrast   10K pot to ground.  don't connect to +5v
pin  4     RS         BS 8
pin  5     Read/Write BS 9
pin  6     Enable     BS 10
pins 7-14  Data       BS 0 - 7

Will work for µAmps

The next step was then just to get all the Code working. That was fun. The only trouble i had was 1) finding a power supply for the stamp (it's hard to try out code when the chip is off!) and 2) Issues with the RS bit. I had it inverted by accident, so it tried the send data when I meant command, and command instead of data. Oh well.

Source code: LCD.bs2

Schematic: here