Im playing around with my new sparkfun serial 4x20 lcd and Im wondering how much difference there is from one lcd to the next. If I learn how to program this lcd and than go and buy someone elses serial lcd will I be starting over again? What are the pros and cons of serial vs the other 6 pins lcds?
Do this, it will save you headache later on: Assume that nearly every complex device that you want to interface will use a different interface protocol.
Why?
Because if they aren't from the same manufacturer, or they don't adhere to some level of "standards", that most likely -will- be the case.
For serial LCDs, they will each likely have a different communications protocol for controlling the functionality of the LCD. While at the LCD level, two LCDs might both use the same chipset (and thus, both LCDs at that level share the same control system), the interfacing techniques used by the serial interface (typically implemented in a microcontroller not unlike the one on the Arduino) may be different; one manufacturer, for instance, may implement a scrolling feature, while the other doesn't.
Some manufacturers may implement a compatibility mode or layer, but most don't. You may find such a library or "wrapper", as they are known, has already been written, if you wanted something like that for your toolbox. Other times, for whatever device (LCD or anything else), you may find nothing - at that point you can decide whether or not you want to implement one yourself (if you have the time and inclination, you may want to do so - it may take you longer, but you would have to do something similar anyhow in learning the new system - so why not help the next guy?).
This is going to be true no matter what you are trying to interface with; if no use of any standard or such is really mentioned for the interface protocol, you will have to assume that there will be a learning curve towards a successful interfacing with the device. This is just how hardware and software development works in computing. Get used to it, or quit NOW.
![]()
thanks for the help.
I've used a few different ones but they're all controlled by the HD44780 chip, so the software is all the same. Two of the power pins move (from one end of the strip to another) but otherwise I've been able to chop and change - even between screen sized. A 4x20 display plugged in to something that's set up for 2x16 will work, displaying the text on 16 characters of the first two lines.
What are the pros and cons of serial vs the other 6 pins lcds?
A serial LCD uses one digital pin (and the two power) whereas the other LCDs use more (6 digital pins or something close).
Mowcius
You can use a shift register though. I've just found this: Google Code Archive - Long-term storage for Google Code Project Hosting. which should reduce the pins needed to two. Haven't tried it yet though, don't think I've got room on by breadboard so will have to get the soldering iron out.
What are the pros and cons of serial vs the other 6 pins lcds?
The serial interface uses fewer (one) Arduino pins but the data transmission takes longer. Also the software is typically not compatible from one manufacturers implementation to the next.
The 6 pin LCDs (the devices actually have 14-16 pins) use at least 6 Arduino pins but the data transmission is much faster and the software is the same for all devices.
Don
Not to mention the standard parallel HD44780 LCDs (which can be configured to use as few as 6 or as many as 11 pins) are significantly cheaper. The serial ones are basically parallel ones with a microcontroller attached. Or you can go the real cheapskates route and make your own controller from a arduino chip : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1260399444
You can have the best of both worlds!
For about $15 you can buy a controller, a pre-programmed PIC, to put between your Arduino... uses one or two pins, depending on how conservative you are... on the Arduino side, and plugs into many LCD (up to 80 characters) panels.
Using the controller also saves you some Arduino programming as you "talk" to your LCD panel more simply than if connected to it directly.
Details at..
For about $15 you can buy a controller ...
He's already got one.
Using the controller also saves you some Arduino programming as you "talk" to your LCD panel more simply than if connected to it directly.
This brings up the original posters question...
If I learn how to program this lcd and than go and buy someone elses serial lcd will I be starting over again?
The answer is YES.
Don
Re- "He's got a controller"....
I misunderstood his post... I thought he had an LCD with an integral serial interface. I wanted to stress that "stand alone" serial interfaces exist, into which you can plug a range of LCD panels.
Maybe there are no LCD panels with integral serial controllers?
ok so I got my sparkfun 4x20 working alright and all of the sudden this
did I cook it? in the manual they say you can reset it to 9600 by entering "r" how exactly would I code that? I have tried it with all the sample codes for this unit and it doesnt change at all
A control-R is a hex value of 12 (0x12).
I have reset my Sparkfun LCD by sending a control-R at 9600bps (while the splash screen is visible)
btw Im not even getting the splash screen
tabular:
did I cook it?
Your photo shows the classic case of an LCD display that has power, contrast, and backlight voltages applied but which has not been correctly initialized. It is not likely that the LCD module has been damaged, it is probably just a bit confused.
We need some more information:
How are the devices powered and interconnected?
If you are not powering the serial backpack from the Arduino do they at least have a common ground?
Is the LCD module soldered to the serial backpack or does it plug in. Sparkfun is not clear about this.
I see another LCD module in the background - is that available for use?
ok so I got my sparkfun 4x20 working alright and all of the sudden this...
Could you be a bit more specific about the sequence of events. What happened first? How long until things changed? Any explosions, mushroom clouds, terrible smells, heat etc.?
btw Im not even getting the splash screen
Did you ever get the splash screen?
Don
thanks for the reply heres what I got
How are the devices powered and interconnected?
arduino duemilanove pin 1 is going to the rx ground going to the arduinos ground and VDD going to the arduinos 5 volts
Is the LCD module soldered to the serial backpack or does it plug in. Sparkfun is not clear about this.
Soldered in
I see another LCD module in the background - is that available for use?
that is a parallel
Could you be a bit more specific about the sequence of events. What happened first? How long until things changed? Any explosions, mushroom clouds, terrible smells, heat etc.?
no mushroom clouds, smells or explosions I had it working fine out of the box experimented with different codes and it just went to that one time when powered up
Did you ever get the splash screen?
yes
Try sending the control-r within a second after powering up the LCD
tubular:
As I said in reply #14 you have the classic symptoms of an LCD display that has not been properly initialized. While I was waiting for your reply to that post I went to the Sparkfun website and downloaded the source code for the serial backpack. It appears to me that the initialization code in that software has a 'Function Set' instruction missing which could well be the source of your problem. Many of these LCD devices are quite tolerant to deviations from the recommended initialization sequence but it is possible that the one you have is not.
You could try disconnecting the pin1 -- rx connection and cycling the power few times to see if you can get the LCD to initialize. I would try this two different ways, by cycling the power to the Arduino (which feeds the LCD) and by leaving the Arduino power on, and by disconnecting and reconnecting the VDD -- 5v connection.
The fact that you were experimenting with different codes is probably irrelevant. You could have inadvertently changed the baud rate but that would only affect your ability to control the device after it has been properly initialized and has displayed the splash screen.
Don
thanks for the tip, I have been real busy so I just got time to work on it today. I tried cycling the power several ways by pulling the arduino power, pulling the ground, and pulling the 5 volts to no avail