NOTE: I finally got my camera figured out so there should only be 1 or 2 blurry images. On with the Instructable!

LCDs are one of the coolest things to add to any project right now. You can use them to display things from the speed of your bike, to the amount of room being used up on your RAM. This Instructable will give you a general description on how LCDs work, and how to get started using them. The information provided here will give you enough information to even develop control circuits on any Microcontroller. LCDs are a lot simpler than you think!

Step 1: How They Work

Most LCDs have a HD44780 LCD driver in them. The HD44780 is the most common LCD driver and is very easy to connect to. A LCD with this driver typically has 14 or 16 pin, with the first being ground and the second being 5V+. This is the only LCD type I will cover today being it is so common. Very common. LCDs of this type are parallel devices. That means that 8 bits of data are sent side by side (or parallel to each other) instead of in line. This is also the way parallel printer ports work which is why it such a popular decision to connect a LCD to a parallel port. Data is sent to LCD screens in a kind of 8-bit Binary ASCII code. For example: 01000001 translates to a capital a. 01000001=A. There are special symbols too like: 11110100=the Pi sign. In the instance of HD44780 driven LCDs, the first bit of data is the 14th pin and the last bit of data is the 7th pin. Unless you haven't figured it out already, this means that building a test rig, or interfacing to a microcontroller would be very simple.
No need for a debounce circuit. A transistor and 100 ohm resistor did the trick for me. I connected the output pin of a microcontroller to the base, wired one gate to the LCD's enable pin, and put a 100 ohm resistor between the last pin and ground.
Oh, and by the way, nice instructable. You really helped me figure out my LCD
Hi could you please advise using the following on how to connect the lcd as per pics.? <br>thanks <br>this is a v5 shield which is supposed to handle this. <br> <br>http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=150632164582&amp;ssPageName=ADME:L:OC:US:1123 <br> <br>just not 100 percent sure on how to proceed! <br>Are you able to advise <br>thanks <br> <br>
There's an example picture of the hookup on that ebay page you posted,and <a href="http://www.b2cqshop.com/products/165-arduino-iici2ctwi-serial-lcd-1602-module-shield.aspx">example code on the manufacturer's website</a>. The manufacturer's website says it uses I2C protocol (that's actually pronounced I squared C), which means addressing it should be pretty simple. There are plenty of tutorials across the internet in regards to I2C on the arduino.&nbsp; Try starting off on adafruit's forum.<br>
Thanks for your prompt input! <br> <br> I had already tried the sketch from the mnfrs. site but get errors. The unit is connected correctly onto the board and I get a &quot;blue lit' screen so that works. when you mention &quot;addressing&quot; should the original code registers ? this is the original code error. <br> <br>I am fighting with this and have checked out all the I2C tuts... <br>much appreciated in advance any further input will be appreciated !
how can i add bigger lcd to a mp3 modulators used in cars lighter socket? anybody has some idea?
My LCD has a backlight, but only 14 pins.&nbsp; The model number isRT0802B, its got 8 characters per line, and 2 lines.<br />This is what the unit looks like on the bottom.&nbsp; I'm not quite surehow the wiring is different on this one?&nbsp; Can you help me out?<br /><br />
I have something similar.IF&nbsp;YOU&nbsp;ARE&nbsp;SURE that there is a backlight, try to find the power pins. I have some LCDs with seperate wires for the baclight. You will need a driver if it is the flourescent kind.<br />
i &lt;3 u!!!!!!!!!!!!!!i &lt;3 u!!!!!!!!!!!!!!i &lt;3 u!!!!!!!!!!!!!!i&lt;3 u!!!!!!!!!!!!!!
That is so complicated O.o
Wait until I publish my followup with graphic LCDs. Then eventually, color serial graphic LCDs. LCDs are a fundamental part of any electronic hobby.
How can i use a computer keyboard to type on an LCD display?
if you program it right
Yes, but how? what code, serial inputs...?
that i'm not sure ask<br/><a rel="nofollow" href="http://www.instructables.com/member/klee27x/">klee27x</a>, he is an experienced PIC programmer <br/>
mine is off a couculater and hase 28
Then it is just the LCD w/ no driver. Calculators have the LCD driver built into the main MCU.
Anyone know how to connect the LCD that's in a kodak easyshare c330? I've had this piece of crap camera for years, and it's been sitting in a drawer for half that (new camera!) It's a color AU a015an03 screen. I was trying to convert the camera to only see near IR/ IR. I put in the wrong filter (don't use floppies, they turn out very red, and it's quality isn't great.). I went in again, to take it out/wait for later, and broke a ribbon cable -.- so i salvaged parts (capacitors, etc) and the screen was one of the parts i took. :D
Hey nice instructable... well, i am having some problem out here with my projects... i just entered into the world of LCD and discovered there are 2 types of 'em...i.e. Common cathode and common anode. which LCD is better and most widely used?? also ,i want to make a temp/humidity sensor using pic16f628a and a sensirion sensor that shows the data on an LCD...which LCD do i use(common cathode or anode??) ... if anyone has the compiled code+schematic for this project, plzzzz mail it to me! Thanks
I think you're thinkin of LED displays, easy to mistype. If that is the case, common cathode is probably the easiest route. LED displays don't have much of a standard so determining the code would be tricky. VFDs also come in common anode or cathode. Those are a little easier and are sometimes similar in use to LCDs, just at a hight voltage (about 12-14 volts).
I'm sorry, but that didn't make much sense. common cathode and common anode sound like LED's to me. There are different kinds of lcd's (different controllers and interface types), but neither of those are them. Also, this has no code. It is for directly controlling the LCD. If you want code for controlling the lcd via a microcontroller, well, it depends on the kind of controller you are using.
So pin 4 of the lcd display puts it in write mode right?
when u r soldering in this board wats the best way to solder them together cause i tried like that and i saw that it needs much solder
please could could you give me any tips or information on changing lcd's, eg. take green lcd from sky/ virgin media box and change it with the screen on a calculator?
Typically devices have their LCD drivers built in to the main board. The driver may or may not be the HD44780 or similar. In a calculator the LCD driver is always part of the main chip and I don't know how I could hack it unless it didn't have the black glob over it. The TI graphing calculator I took apart had a LCD with a HD44780 resembling chip in it but I accidenatly broke the chip off (ther is no board underneath the chip so when I touched it it fell through). Too bad though, it was a big LCD
i have a 3.3 volt lcd. do i still use the 4.7k resistors, or should i use something else.
The 4.7k resistors are pull up resitors. That is, they keep the pins in a positive voltage. You should probably use a lower resistor value as 4.7k may be to high and not allow enough voltage through to pull up the pins.
can you recommend a value to try. I don't really have any resistors lying around, so I have to buy them. It would be nice to only have to buy what I need
This will help a lot! Thanks!
can someone please tell me where to buy a LCD screen? one that is used in this project
Any LCD with a HD44780 drive will work. Try <a rel="nofollow" href="http://www.goldmine-elec-products.com/products.asp?dept=1039">HERE</a>. That's where I go for cheap, high quantity surplus. They're my favorite supplier.<br/>
yeah i couldnt find that driver
pretty mush any LCD with 14-16 pins will have the HD44780 chipset. Or at least be compatible.
cool thanx then i know exactly which one to buy
sooo i was thinkin bout making this thing like a texting device, the general idea would be to send the binary code to another rigs lcd (rig being this lcd project) <br/>would these work <a rel="nofollow" href="http://parallax.com/Store/Accessories/Communication/tabid/161/CategoryID/36/List/0/Level/a/ProductID/111/Default.aspx?SortField=ProductName%2cProductName">http://parallax.com/Store/Accessories/Communication/tabid/161/CategoryID/36/List/0/Level/a/ProductID/111/Default.aspx?SortField=ProductName%2cProductName</a> yeah the link long but i think it could work but im a little confused how<br/><br/>
Well, it may work if you have a couple of serial LCDs and some MCUs to encode and translate keystrokes.
ok i was just thinkin the other day that it would be cool to have a texting system in school in my locker and some of my friends but then i thought bout putting the texting system in an altoids tin to make a portable texting walkie talkie type them just im not 100% sure on how to do it. i think it will be a experiment until u succeed type of deal
R U using a 4 pin momentary button? And something off topic... can someone explain me how can i use a photocell in a 9v circuit? please help.
What are you doing with a photocell?
I want to make a light that opens at night.
kool great instructable
i almost baught a dipswitch once
If I had this Instructable a year ago, my electronics life would be much farther than it is. Great info. Love it!
hey, really well done instructable. i followed instructions buy for some reason my display (1 x 16) will only display 8 characters, and on top of that when i push "the button" to input a character, it will make several instead of just 1 appear on the screen.
MY 1x16 does that too. It only displays 8 characters, but for what reason I don't know, It even does it under computer and microcontroller 4 pin control. As for the multiple letters you have 2 options: Hit the button really fast or make a debounce circuit. Here is a schematic. It uses 2 NAND gates of a 74LS00 and a SPDT switch.
gimme, Did you try setting the function register to 2 line mode? If you do, try setting the position to address 40h for the second set of 8 characters. Most displays initialize for a single line, but you could try setting it to single line just in case. I've never run across an LCD that did this, but it could be the way your LCD is wired up.
Like I said, It does it under computer and microcontroller control.
Page 1 of HD44780U datasheet:<br/><br/>&quot;A single HD44780U can display up to one 8-character line or two 8-character lines.&quot;<br/><br/>From Page 11 of the datasheet:<br/><br/>&quot;Note that the first line end address and the second line start address are not<br/>consecutive. For example, <strong>when just the HD44780 is used, 8 characters x 2 lines are displayed</strong>. See Figure 5.&quot;<br/><br/>In other words, unless an &quot;extension driver&quot; is present on your LCD controller (which is not present on cheaper LCDs), the 1x16 display you have is actually arranged as 8 characters by 2 lines with the 'second line' being the last 8 characters. The second set of 8 characters are addressed as the second line which starts at DDRAM position 40h. Since the second line wouldn't show up until you entered enough characters to move the address to 40h (64 characters) by normal incrementing, you will see nothing for 56 characters between your 8th character and your 9th.<br/><br/>That is how the HD44780 is designed. And that is how your LCD is wired up. It's right there in the datasheet.<br/><br/><a rel="nofollow" href="http://www.sparkfun.com/datasheets/LCD/HD44780.pdf">http://www.sparkfun.com/datasheets/LCD/HD44780.pdf</a><br/><br/>Put your display in 2 line mode (it will initialize as 1 line unless you change it) and address the second set of 8 characters by changing the cursor position to the second line at 40h, which is done by pulling R/S low and writing C0h or 11000000b. If you also have 'increment' (05h) set, you will only need to do this once for the remaining 8 characters. When you need to start over, you can either write 80h or 10000000b to the register to set the address at zero again or you can just send the CLEAR (01h) and HOME (02h)commands.<br/><br/>Hope this is helpful to your visitors.<br/>
thanks a bunch, i will try that now.

About This Instructable


304 favorites


Bio: Making a better tomorrow, tomorrow.
More by gimmelotsarobots: 4.8 Watt LED Steampunk Lamp Steampunk Razor Scooter Beginning LCDs
Add instructable to: