NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » 16 x 2 LCD

March 27, 2011
by SpaceGhost
SpaceGhost's Avatar

Hello all, I have a 16 x 2 LCD display that I have just acquired and would like to be able to use for a project. It has the HD44780 controller like the Nerdkit's 20 x 4 module.

Here is the .pdf file for the new display. White characters on blue w/blue backlight :). Pinout appears to be the same as the Nerdkit LCD.

I figure that there must be some modifications made to the "/libnerdkits/lcd.h" file to use the different LCD. Can anyone help me out here or get me pointed in the right direction?

Thanks in advance,

Dave

March 27, 2011
by mongo
mongo's Avatar

Good question...

I have a couple of 20x2 displays and an 80x24 that I want to incorporate some how... Just haven't had the time lately to try anything.

March 27, 2011
by Ralphxyz
Ralphxyz's Avatar

I got some 4 line Blue LCD (the same as the Nerdkit LCD 4 line by 20 characters) off ebay, they appear to have to have the backlight light lit. Rick confirms that in fact.

So what would be the best way of turning on the LCD back light?

Then where does the Contrast resistor come to play?

The detail drawing on ebay for the LCDs shows the the contrast resistor as a potentiometer which is interesting.

Ralph

March 27, 2011
by Rick_S
Rick_S's Avatar

Did you Get one of the blue trimmer pots in your kit? That can be used in place of the contrast resistor.

March 27, 2011
by SpaceGhost
SpaceGhost's Avatar

Ya know, I've read on the forum people mentioning that pot.. I didn't get one though.

The new LCD I just got is 2 x 16. I ordered a 4 x 20, but they sent me the smaller one by mistake. The 2 x 16 has the HD44780 controller too.

I figured with a 4 x 20 I could just wire it the same, and no modification to code would be necessary. However, with the 2 x 16 I'm not so sure.

How was your vacation Rick? Got cold here again!

Dave

March 27, 2011
by Rick_S
Rick_S's Avatar

Vacation was great. I left 80 degree plus temps only to return home to the thirties. As for the ยค 16 x 2 working it probably will but may have some issues. Addressing or initialization may need changed.

March 27, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi SpaceGhost,

There actually should not be too many things you need to change to make the libraries work with the smaller LCD. You are only need to edit the functions that jump around the screen. Its true that the contrast setting might be a bit different, we did pick the contrast resistor so that it would work with the particular LCD we have, you might need to try some different values to get a good contrast.

Humberto

March 31, 2011
by lnino
lnino's Avatar

Hi SpaceGhost.

I tried the same thing the last days. You can wire the 2x16 display exactly like the big one in the nerdkit. Both are HD44780.

Maybe this thread will help you. Here

April 03, 2011
by SpaceGhost
SpaceGhost's Avatar

UPDATE -

Yes lnino, I wired my 2x16 the same way the 4x20 was wired.. That was all I had to do. Oh, and I used a 100 ohm resistor for the contrast resistor.

I just made sure that the text to be displayed with my program fit the display. I didn't have to do anything with the lcd.c, or any other libnerdkit files.

Every thing works as it should.. Although I wish that the white text (on the blue background) was a little brighter when operating the module with the backlight off. With the backlight on, the display is bright and beautiful!

I tried to take a picture to show it, but it was pretty blurry with my crappy camera. I might borrow a better camera and upload a picture later.

Dave

April 03, 2011
by Ralphxyz
Ralphxyz's Avatar

It's interesting with blue displays (LCD), I got some off ebay and didn't think they worked until I tried the backlight (which Rick confirmed).

Apparently you have to use the backlight to see a blue LCD good thing I am not trying to use a battery.

Ralph

April 04, 2011
by lnino
lnino's Avatar

Hi SpaceGhost,

great to hear you had success with your lcd display.

April 04, 2011
by SpaceGhost
SpaceGhost's Avatar

I had not realized that the blue LCDs required the backlight on to be readable. I now have a 3.3k resistor for the contrast resistor.. The display is only a little harder to read with the backlight off, but looks GREAT with the backlight on!

I have more of a solid blue background now with the backlight lit - the rectangular 5x8 pixel blocks that make up the characters are less noticeable in the background now, with the display lit. Awesome!

I was using smaller resistors to try to get the display more readable in its non-backlit state - which didn't really help that much, to be honest (only a little). I'm glad that I posted my results, I learned something :).

I'll get a 4.7k or 5k trimmer pot (I know I have a 4.7k, somewhere) to replace the resistor... I'll bet I could really fine tune the contrast to get an even better looking display. Sure is looking good now!

Dave

April 04, 2011
by Ralphxyz
Ralphxyz's Avatar

Next you should try to implement Ricks I2C two wire LCD Backpack project.

Imagine having only two wires to run your LCD (well four wires with + and -). That frees Port D.

I am almost there.

The blue LCDs really are a nice look not as harsh as the Nerdkit yellowgreen.

But I definitely have to use the backlight led. A potentiometer definitely would fine tune the look.

Again Rick's full project uses a digital potentiometer but I am not trying to implement that.

Ralph

April 26, 2012
by HexManiac
HexManiac's Avatar

I have something very similar, if not identical to the 16x2 display you describe. I wired mine up exactly as I had the NerdKit 20x4 display, with two exceptions:

I was unsure of the Vf and If values for the backlight, so I used a 1K series resistor, the brightness is fine.

Secondly, I used a 10K trimmer pot (I dint get one in my kit lol!) to determine the correct resistance, turned out to be 3K3.

I hope this is useful...

Post a Reply

Please log in to post a reply.

Did you know that a motor is harder to turn when its terminals are shorted together? Learn more...