Hi All,
I've been working with another member to develop a cheap serial backpack for LCDs. We came across a recent article in Nuts & Volts that uses two lines to communicate to an LCD through a 74HC595. The code was written in GreatCow Basic for a PIC and after much trial and error, I successfully (I think) converted it over to PICAXE BASIC with some help from Westaust55's 3-digit display code using the '595. My code works, but not reliably. Code and schematic attached.
Sometimes the LCD works perfectly off the bat. Other times, I have to cycle power repeatedly before the LCD will work properly. I've tweaked the initialize (INIT) routine which seems to help, but does not eliminate the problem.
I've also noticed, sometimes the LCD will start up in one-line mode and display gibberish until it gets down to the block cursor example in the code - it then displays the first line only.
Another issue I noticed this weekend was the program appeared to reset randomly after running for several minutes. Sometimes this was okay, other times the LCD appears to go into one-line mode (not in code) and stay that way.
Unfortunately, the problem is not consistent so it's been hard to troubleshoot. I'm wondering if the problem is strictly with the INIT routine, possibly the sendNib routine, or if it is with the circuit layout, perhaps something to do with having the shift and storage register pins tied together? I read something about delaying signals between two pins using a capacitor and resistor. Don't know if that is required here though.
I've tried adding pull-down resistors on the data line to the '595 as well as the DB7-4 lines with no real difference. Also tried using different '595s. The TI I had seemed to have more problems than ST ICs. I was using an NXP IC this weekend.
I was just wondering if anyone else had experience interfacing '595s with LCDs, specifically using two lines? Would three lines be better? Would using two '595s to send 8-bit data to the LCD be a better choice?
Thanks in advance.
I've been working with another member to develop a cheap serial backpack for LCDs. We came across a recent article in Nuts & Volts that uses two lines to communicate to an LCD through a 74HC595. The code was written in GreatCow Basic for a PIC and after much trial and error, I successfully (I think) converted it over to PICAXE BASIC with some help from Westaust55's 3-digit display code using the '595. My code works, but not reliably. Code and schematic attached.
Sometimes the LCD works perfectly off the bat. Other times, I have to cycle power repeatedly before the LCD will work properly. I've tweaked the initialize (INIT) routine which seems to help, but does not eliminate the problem.
I've also noticed, sometimes the LCD will start up in one-line mode and display gibberish until it gets down to the block cursor example in the code - it then displays the first line only.
Another issue I noticed this weekend was the program appeared to reset randomly after running for several minutes. Sometimes this was okay, other times the LCD appears to go into one-line mode (not in code) and stay that way.
Unfortunately, the problem is not consistent so it's been hard to troubleshoot. I'm wondering if the problem is strictly with the INIT routine, possibly the sendNib routine, or if it is with the circuit layout, perhaps something to do with having the shift and storage register pins tied together? I read something about delaying signals between two pins using a capacitor and resistor. Don't know if that is required here though.
I've tried adding pull-down resistors on the data line to the '595 as well as the DB7-4 lines with no real difference. Also tried using different '595s. The TI I had seemed to have more problems than ST ICs. I was using an NXP IC this weekend.
I was just wondering if anyone else had experience interfacing '595s with LCDs, specifically using two lines? Would three lines be better? Would using two '595s to send 8-bit data to the LCD be a better choice?
Thanks in advance.
Attachments
-
21.3 KB Views: 42
-
21.7 KB Views: 22