Go Down

Topic: What specifications do I look for when buying an LCD to work with a UNO or MEGA (Read 1 time) previous topic - next topic

shanecy

I'm wanting to tinker around with LCD's with my arduino micro-controllers. I have a uno and a mega. I'm wanting to make sure I'm buying the appropriate item for a standard project of displaying simple text "characters". The below links are the items to which I'm considering.

Could someone give me some feedback on what I should look for or take into account when ordering an LCD that I want to use with my UNO micro-controller.


ITEM 1:

http://www.mouser.com/ProductDetail/ELECTRONIC-ASSEMBLY/EA-DOGM163B-A/?qs=sGAEpiMZZMt7dcPGmvnkBtVaL0rYWIcV3Q49TcU1oFs%3d

ITEM 2:

http://www.mouser.com/ProductDetail/Newhaven-Display/NHD-0420E2Z-NSW-BBW/?qs=sGAEpiMZZMt7dcPGmvnkBq9RSAvEJGmRspzq0zQda%252bA%3d

ITEM 3:

http://www.mouser.com/ProductDetail/Newhaven-Display/NHD-0416BZ-NSW-BBW/?qs=sGAEpiMZZMt7dcPGmvnkBq9RSAvEJGmRLjN5s%252bpMW58%3d

Nick_Pyner

Those are just plain-vanilla displays that will work equally as well on a Uno as a Mega. You are probably aware that the pins for the I2C and SPI busses are different on the Mega and some displays utilise these. This means you may be obliged to make minor changes to the programmes for the Mega.

About the only exceptional displays are those big graphic items that need heaps of pins and it is either  self evident that a Uno would not be up to the job, and/or the advertisements will have plenty of advice to that effect.

MAS3

You would need to take the power requirements in consideration.
The first item you mentioned, is a 3.3 volt and 5 volts display the datasheet tells you can use either one.
If it needs 3.3 volts to power it, its pins used to communicate with it need to be 3.3 volts maximum also.
Your boards will probably use 5 volts, but it is possible to have them at 3.3 volts so check this first.
Also you can reduce a 5 volt output to 3.3 volts using external components but you'd have to do that for every pin you want to use.
The item is to be used with backlight, but that is not included (unlike most other displays that require backlight).
So you have to order that separately.
I can't tell you whether this display has an Arduino library available, but the availability of such library is very recommended for first use of displays.
A library takes care of initialising and sending commands to the display, it's like a windows driver.
The display can be used as 8, 4 bits as well as SPI or I2C so you can use it any way you like (your arduino's could use all of those modes, you just decide what's best fitting for you).

Items 2 and 3 are similar, one is 4 lines of 16 characters, the other is 4 lines of 20 characters.
They have built in backlight and have a standard 16 pin connector.
The 16 chars display can be equipped with 2 different chipsets, of which 1 is also used in the 20 chars version.
I can't tell you about the availability of a library for the SPLC780D or ST7066U, couldn't find data on that fast enough.

I can tell you that these prices can very well be beaten if you're just looking for some display to play and learn with, you'd have to wait a bit longer for cheaper displays to arrive (from China or so).


Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

bperrybap


I can tell you that these prices can very well be beaten if you're just looking for some display to play and learn with, you'd have to wait a bit longer for cheaper displays to arrive (from China or so).


Yep, You can find 16x2 on ebay for just a couple of USD. The 20x4 are about $10 USD.
If you want to use the LiquidCrystal library that comes with the Arduino IDE,
then the key to finding an LCD will be to get one that uses a HD44780 interface.
On ebay you can search for HD44780 and see several options.
You can also search for "1602 LCD" or "2004 LCD" to see 16x2 or 20x4 LCDs.

The LiquidCrystal library drives the hd44780 LCD interface
using 6 arduino pins in 4 bit mode and 10 arduino pins in 8 bit mode.
If you want to use fewer pins you can use I2C or a TTL serial interface.
There are LCD modules that have I2C or serial interfaces on them.
These will require a different library than the one that comes with the Arduino IDE.
There are also LCD backpacks that can be purchased that will convert the
HD44780 interface of the LCD to i2c or serial.

When using i2c or serial it often isn't quite as "plug and play" as using the HD44780
interface. This is because the HD44780 interface is standardized.
so every LCD that has a hd44780 interface works the same using the same pins.
When using i2c or serial, there is no standard for talking to an LCD so there are many different
ways to talk to the LCD through the module/backpack.

While i2c interface itself is standardized, (the interface between the Arduino and the i2c chip)
how the i2c chip talks to the hd44780 LCD is not standardized.
For example, the i2c backpack can use different i2c chips.
Even using the same i2c chip doesn't guarantee compatibility since the output pins
from the i2c chip may not be wired up to the hd44780 LCD interface the same way.
Because of that it can be a bit challenging to get the i2c interface up and working
initially depending on how much information the vendor supplies.
But it isn't that difficult,
(it requires installing a new library and then configuring the sketch to use it for the hardware)
and it is a one time thing. i.e. once it is done, it will "just work".

So all that said,
using i2c to talk to LCDs is works pretty well and saves pins, particularly if
talking to multiple LCDs since with i2c you only use 2 pins on the Arduino regardless of how many
LCDs you are talking to.

For a super quick & easy plug and play option, you could go with a LCD shield.
http://www.ebay.com/sch/i.html?_odkw=LCD+shield&LH_BIN=1&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313&_nkw=Arduino+LCD+shield&_sacat=0

With one of these, you are up and going almost immediately since it works
with the LiquidCrystal library.
Plus, there are some button inputs to play with as well.
I will caution you that usually these shields are not wired up to the Arduino pins
the same was as the LiquidCrystal examples so it won't work "out of the box" with
the LiquidCrystal examples.
However, a simple change to the LCD constructor in the sketch (which specifies the pins)
and the shield works just fine.


--- bill

shanecy

First off, thanks for the helpful advice.

I've researched the i2c before and I'm having a hard time understanding it. I've been told over and over that the i2c is a very simple component to learn how to use.

I know it lets you send multiple information down a single line just by specifying the address of the receiving end to each data set that is sent out. Maybe that's wrong but it's the idea I got from it. Anyways, I'm just having a hard time understanding all of this.

Can anyone advise some simple projects that I could implement this i2c with to learn the programming, circuit setup and to see the overall advantages of it. I would really like to learn about the i2c in general before I start implementing it into more difficult projects. Otherwise I'm just throwing stuff together without actually learning anything.

Any ideas.......Thanks in advance for your help and consideration. 

bperrybap

Your general understanding is correct.
Using i2c on Arduino is pretty simple.
The wire library and AVR hardware takes care of the physical layer encoding and timing.

Nick Gammon has a nice tutorial and some projects on his site:
http://gammon.com.au/i2c

The tricky part with respect to using i2c LCD  backpacks is that the i2c chip has an 8 or 16 bit output port
and the i2c backpack manufacturers don't hook up the pins on the output port of the i2c chip
to the LCD the same way.
There are also different i2c chips that can be used.
Some of the i2c chips work very differently from each other( different initialization and different internal registers)
because of that, you will need a different library for each i2c chip.
Also, the library often has to be initialized differently for different boards even when the same i2c chip is used.
Luckily most of the i2c LCD backpacks out there seem to be using the PCF8574 or compatible.
But it's not that bad once you figure out which i2c chip, its i2c address,
and how the output port of the i2c chip is hooked up to the LCD and backlight circuitry.


--- bill

floresta

Quote
Items 2 and 3 are similar, one is 4 lines of 16 characters, the other is 4 lines of 20 characters.
...
The 16 chars display can be equipped with 2 different chipsets, of which 1 is also used in the 20 chars version.
I can't tell you about the availability of a library for the SPLC780D or ST7066U, couldn't find data on that fast enough.


Be aware of the fact that if you use the default LiquidCrystal library it does not correctly deal with the cursor positioning for the 16x4 displays.

Also, the SPLC780D and the ST7066U are equivalent to the HD44780U and software written for one will work equally well (or equally poorly) with any of them.


Don

Go Up