PDA

View Full Version : Serial ic to 2x20 LCD help



grasshopper
03-25-2009, 03:56 AM
I have this 8 bit serial to parallel IC that works great with the code I made running on the propeller. I also have a 2x20 LCD that works with the object in the object exchange. Now I want to run the serial to parallel into the 2x20. My Question is How do I go about this its hella confusing to me. Just when I think I figure this out it makes me pull my hair out.

Any one done this?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit my site -> www.rawcircuits.com (Http://www.rawcircuits.com)

Peter Jakacki
03-25-2009, 04:40 AM
grasshopper said...
I have this 8 bit serial to parallel IC that works great with the code I made running on the propeller. I also have a 2x20 LCD that works with the object in the object exchange. Now I want to run the serial to parallel into the 2x20. My Question is How do I go about this its hella confusing to me. Just when I think I figure this out it makes me pull my hair out.

Any one done this?


Done what?

I think the problem with your request is the lack of information.

When you say "this 8-bit serial to parallel IC that works great" then all we know is:
a) it's a serial to parallel IC
b) it works great

What we don't know is:
a) Which specific IC is it (part number etc)
b) how have you connected the LCD

Generally speaking then, yes you do need to "write" the correct character or control code but toggling implies something different (on/off/on/off..).

The LCD also needs at least two other control lines to function and they are:
* RS - register select, sometimes labeled A0. To write an LCD command pull this low or pull it high to write character data such as "A"
* R/W - read or write control signal. If R/W is high then the LCD is outputting data onto the data lines. Most of the time this is held low or can even be tied low.
* ENABLE - an active high strobe issued to the LCD when D0..D7, RS,t and R/W are ready and stable

There are plenty of examples and information both in this forum and elsewhere but if you need specific help then please be specific.
Include as much information as is practical such as schematics and code etc.

*Peter*

PJ Allen
03-25-2009, 10:42 AM
All about 44780_type LCD controllers: http://home.iae.nl/users/pouweha/lcd/lcd.shtml

You can learn a lot from the PBASIC demo programs.

Peter Jakacki
03-26-2009, 04:55 AM
Grasshopper, you cannot get this circuit to work in this fashion, either hardware or software wise.

The E or enable signal is a strobe but in the unlatched shift register that the 164 is the E line will trigger as bits are shifted in. You either need a separate E line direct from the Prop or use a latched shift register. Both of these solutions require an extra I/O line.

Also, if you are driving the LCD in 4-bit mode you need to connect the data to DB7..DB4 not DB3..DB0. There is also the matter of the R/W line which needs to be tied low and the software access is slow enough for everything except the home and clear commands where you need to time a short delay.

Software-wise you are missing the important initialization routines necessary to start-up the LCD and place it in 4-bit mode etc. Have a look at example code such as one I posted recently
http://forums.parallax.com/attachment.php?attachmentid=58949

*Peter*