I stayed up a little late last night and added the LCD I mentioned in my last post to my setup.
I left the LEDs in the circuit to help debug the signaling to the panel which was a good thing as when I first powered the circuit, nothing showed up on the LCD. After slowing the shift routines down to a speed I could follow, I watched the “debug LEDs” properly sequencing through the signals to initialize and draw a character and still saw zip on the panel. I scratched my head for a while and reviewed the wiring and finally realized I neglected to connect anything to pin 3 of the panel.
That was a significant omission because pin 3 is used as the supply voltage to drive the LCD, distinct from the logic voltage. Leaving it disconnected results in a blank panel. I added a 10k ohm potentiometer and connected its wiper to pin 3 and one leg to ground. My modest 1st output (a single ASCII “A”) greeted me on the next power-on. Yipee!
Here’s a sketch of the circuit so far:
Since this application only uses 6 pins of the 74HC595, I took out two of the LEDs and swapped two red LEDs with green and yellow ones, to distinguish the LCD ‘E’ and ‘RS’ signals from the data nibble signals (D4-D7). An added benefit is when my wife/kids ask what I’m doing in my office, blinky lights in different colors keep their eyes from glazing over when I start my explanation.
Anyway, as I played around with the LCD code, I got a little carried away with the cursor movement and custom character set functions which you’ll see in the video below (sorry for the crappy quality… I’m still getting familar with YouTube editing and annotations).
Beyond the 74HC595 shift function and the LCD initialization code, I expect the extra routines I wrote for this will come in handy, notably:
- text string output
- binary-to-ASCII/decimal output
While I’ve coded stuff like this a million times before as part of my “day jobs”, coding in the Propeller’s “Spin” language is a little different, so these mundane tasks help me get familiar with the environment.
So the next step is to put the “shifty” on a breadboard so I have less of a wiring “rats-nest”. After that, it’s time to add an analog-to-digital converter so I’ll have some control knobs.
See you later!