# DIY 8x2 LCD Shield

## Overview & Parts

This tutorial will show you how to solder together a shield for an LCD with a 8x2 header.  
## Parts
Aside from the parts offered available from Adafruit, you will need to source the LCD yourself. &nbsp;Parallel LCDs come in a couple different sizes, from 16 characters, 1 line (16x1) to 24 characters, 4 lines (24x4).![](https://cdn-learn.adafruit.com/assets/assets/000/000/950/medium800/lcds___displays_lcd.jpg?1396767357)

In this tutorial I use the&nbsp;[16x2 Picvue from Jameco](http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=365982)&nbsp;because that’s what I had in my box of stuff, but you can easily adapt it for any other LCD. The wiring may differ a little bit but that will be covered.

# DIY 8x2 LCD Shield

## Check Out the Pins

The first step is to turn over the LCD and check out the pins. Parallel LCDs almost always have 14 or 16 pins. In this model they are all the way to the left, near the label J1. I soldered 2 7-pin female headers for e-z plugging. Somtimes the pins are along the bottom all in a row.![](https://cdn-learn.adafruit.com/assets/assets/000/000/951/medium800/lcds___displays_lcdrev.jpg?1396767363)

Look closely at the header for the numbers that show which pins are which. In this model, the first pin is at the top right, the second pin is top left, etc till pin 14 in the bottom left.![](https://cdn-learn.adafruit.com/assets/assets/000/000/952/medium800/lcds___displays_lcdpins.jpg?1396767370)

When the LCD is flipped over, the pinout will be&nbsp;_mirrored_ **,&nbsp;** to help me keep track of it, I made a diagram:| **1** | **2** |
| --- | --- |
| **3** | **4** |
| --- | --- |
| **5** | **6** |
| --- | --- |
| **7** | **8** |
| --- | --- |
| **9** | **10** |
| --- | --- |
| **11** | **12** |
| --- | --- |
| **13** | **14** |
| --- | --- |

Whatever your pinout is, make sure you have a diagram written out since you will need to refer to it many times!# DIY 8x2 LCD Shield

## Headers and Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/000/953/medium800/lcds___displays_headersprep.jpg?1396767377)

OK now that we are diagrammed out, I took the protoshield and soldered 2 7-pin headers at one end of the pcb. Note that they are not all the way to the edge, I left one row of holes so I could easily solder some wires. I also soldered a short piece of header (that comes with the shield kit) at the left so that the LCD will be propped up.![](https://cdn-learn.adafruit.com/assets/assets/000/000/954/medium800/lcds___displays_testfit.jpg?1396767385)

You can now do a test fit to verify how it will look. it hangs over a bit but thats OK by me.## Wiring the LCD
Since this is a parallel LCD, data will be sent to it over a&nbsp;_parallel&nbsp;_interface. That is, multiple bits at a time. These LCDs are designed for either a 8-bit or 4-bit interface. Since we'd like to save pins, lets go with the 4-bit interface! The data pins are name&nbsp; **D4** ,&nbsp; **D5** ,&nbsp; **D6** , and&nbsp; **D7**. Double-check your datasheet but almost all parallel LCDs have these pins numbered 4, 3, 2, and 1 respectively.  
| **1 (D7)** | **2 (D6)** |
| --- | --- |
| **3 (D5)** | **4 (D4)** |
| --- | --- |
| **5** | **6** |
| --- | --- |
| **7** | **8** |
| --- | --- |
| **9 (ENABLE)** | **10 (R/W)** |
| --- | --- |
| **11 (RS)** | **12 (CONTRAST)** |
| --- | --- |
| **13 (GND/VSS)** | **14 (+5V/VDD)** |
| --- | --- |

There's a lot of wiring to be done but we're going to go thru it very slowly so it shouldn't be too bad.

Lets connect these to the arduino thusly: D4 -\> Arduino pin #7, D5 -\> Arduino pin #8, D6 -\> Arduino pin #9, D7 -\> Arduino pin #10.

![lcds___displays_datawires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/000/956/medium640/lcds___displays_datawires.jpg?1396767397)

Since I wasnt sure of the wiring, I used the sockets on the protoshield. Once I test and verify they are correct, I'll solder them in!

Next are the two power wires. Parallel LCDs run off of +5V so you can just solder the Vcc wire to 5V and the ground wire to GND.

![lcds___displays_powerwires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/000/957/medium640/lcds___displays_powerwires.jpg?1396767404)

Next are the 2 control wires,&nbsp; **ENABLE** &nbsp;and&nbsp; **RS** &nbsp;which we connect to pins 12 and 11 respectively.![lcds___displays_controlwires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/000/958/medium640/lcds___displays_controlwires.jpg?1396767411)

Theres another control line called&nbsp; **R/W** &nbsp;that you can use to control whether you're reading or writing to the LCD. Since we'll just be writing, that pin can be connected to ground, saving another arduino pin.![lcds___displays_rwline.jpg](https://cdn-learn.adafruit.com/assets/assets/000/000/959/medium640/lcds___displays_rwline.jpg?1396767419)

The last wire is the contrast control, we need to connect a potentiometer to this to make the display visible. I dont know the specifics of the input current but I used a 10K potentiometer and it worked great.

One pin is connected to +5V, the pin on the other side is connected to ground and the middle pin is connected to the contrast line.

![lcds___displays_contrastpot.jpg](https://cdn-learn.adafruit.com/assets/assets/000/000/960/medium640/lcds___displays_contrastpot.jpg?1396767427)

Now place the LCD on top. Looks good!![lcds___displays_lcdplaced.jpg](https://cdn-learn.adafruit.com/assets/assets/000/000/961/medium640/lcds___displays_lcdplaced.jpg?1396767432)

Make sure you finish up the rest of the shield so you can plug it into an arduino. At least solder in the male headers.# DIY 8x2 LCD Shield

## Using the LCD Shield

Our first test will be just to connect it up to power and see what happens. Plug it into an Arduino and power it up. You should see the following:![](https://cdn-learn.adafruit.com/assets/assets/000/000/962/medium800/lcds___displays_lcdstart.jpg?1396767440)

Make sure you tweak the contrast potentiometer, if the contrast is all the way down you may not see anything.

## Arduino Sketch
Now we must upload some sketch to the Arduino to talk to the LCD. Luckily the&nbsp; **LiquidCrystal** &nbsp;library is already built in. So we just need to load one of the examples and modify it for the pins we used.

If you've changed the pins, you'll want to make a handy table so you can update the sketch properly.

| **LCD pin name** | RS | EN | DB4 | DB5 | DB6 | DB7 |
| **Arduino pin #** | 11 | 12 | 7 | 8 | 9 | 10 |

Open up the **&nbsp;File-\>Examples-\>LiquidCrystal-\>HelloWorld&nbsp;** example sketch

Now we'll need to update the pins. Look for this line:

```
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
```

And change it to:```
LiquidCrystal lcd(11, 12, 7, 8, 9, 10);
```

To match the pin table we just made.

Now you can compile and upload the sketch, adjusting the contrast if necessary. (The image below is from a different fruity sketch but it will look similar).

![](https://cdn-learn.adafruit.com/assets/assets/000/000/963/medium800/lcds___displays_pineapple.jpg?1396767447)


## Featured Products

### Solid-Core Wire Spool - 25ft - 22AWG - Yellow

[Solid-Core Wire Spool - 25ft - 22AWG - Yellow](https://www.adafruit.com/product/289)
Perfect for bread-boarding, free wiring, etc. This spool of solid-core wire is easy to solder to. When bent it keeps its shape pretty well. We like to have a few spools of this stuff around. We suggest picking up wire strippers to match. Wire gauge is 22 AWG which we've found is the best...

In Stock
[Buy Now](https://www.adafruit.com/product/289)
[Related Guides to the Product](https://learn.adafruit.com/products/289/guides)
### 36-pin 0.1" Female header - pack of 5!

[36-pin 0.1" Female header - pack of 5!](https://www.adafruit.com/product/598)
Female header is like the duct tape of electronics. Its great for connecting things together, soldering to perf-boards, sockets for wires or break-away header, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of five!  
<br...></br...>

In Stock
[Buy Now](https://www.adafruit.com/product/598)
[Related Guides to the Product](https://learn.adafruit.com/products/598/guides)
### Break-away 0.1" 36-pin strip male header - Black - 10 pack

[Break-away 0.1" 36-pin strip male header - Black - 10 pack](https://www.adafruit.com/product/392)
Breakaway header is like the duct tape of electronics. It's great for connecting things together, soldering to perf-boards, fits into any breakout or breadboard, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of ten!<br...></br...>

In Stock
[Buy Now](https://www.adafruit.com/product/392)
[Related Guides to the Product](https://learn.adafruit.com/products/392/guides)
### Adafruit Proto Shield for Arduino Kit

[Adafruit Proto Shield for Arduino Kit](https://www.adafruit.com/product/51)
Works with the Uno! This prototyping shield is the best out there (well, we think so, at least). It works with UNO, NG, Diecimila and Duemilanove Arduinos. You can use it with a Leonardo but it will not break out the hardware SPI pins (they're only on the ISP connector underneath) or the...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/51)
[Related Guides to the Product](https://learn.adafruit.com/products/51/guides)
### Adafruit METRO 328 Fully Assembled - Arduino IDE compatible

[Adafruit METRO 328 Fully Assembled - Arduino IDE compatible](https://www.adafruit.com/product/50)
We sure love the ATmega328 here at Adafruit, and we use them&nbsp;_a lot_&nbsp;for our own projects. The processor has plenty of GPIO, Analog inputs, hardware UART SPI and I2C, timers and PWM galore - just enough for most simple projects. When we need to go small, we use a <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/50)
[Related Guides to the Product](https://learn.adafruit.com/products/50/guides)

## Related Guides

- [Geofencing with the FONA 808 & Adafruit IO](https://learn.adafruit.com/geofencing-with-the-fona-808-and-adafruit-io.md)
- [Arduino Lesson 16. Stepper Motors](https://learn.adafruit.com/adafruit-arduino-lesson-16-stepper-motors.md)
- [Mini Thermal Receipt Printers](https://learn.adafruit.com/mini-thermal-receipt-printer.md)
- [Skill Badge Requirements: Microcontrollers](https://learn.adafruit.com/skill-badge-requirements-microcontrollers.md)
- [Automatic Monitor Color Temperature Adjustment](https://learn.adafruit.com/automatic-monitor-color-temperature-adjustment.md)
- [Introducing Adafruit Trellis ](https://learn.adafruit.com/adafruit-trellis-diy-open-source-led-keypad.md)
- [Adafruit Optical Fingerprint Sensor](https://learn.adafruit.com/adafruit-optical-fingerprint-sensor.md)
- [Create an Internet of Things Dashboard with Adafruit IO](https://learn.adafruit.com/create-an-internet-of-things-dashboard-with-adafruit-dot-io.md)
- [Arduino Prototyping Mounting Plate](https://learn.adafruit.com/arduino-prototyping-mounting-plate.md)
- [3D Printed Animatronic Robot Head](https://learn.adafruit.com/3d-printed-animatronic-robot-head.md)
- [1.8" TFT Display Breakout and Shield](https://learn.adafruit.com/1-8-tft-display.md)
- [IR Sensor](https://learn.adafruit.com/ir-sensor.md)
- [Adafruit 1.27" and 1.5" Color OLED Breakout Board](https://learn.adafruit.com/adafruit-1-5-color-oled-breakout-board.md)
- [Ladyada's Learn Arduino - Lesson #0](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-0.md)
- [DS1307 Real Time Clock Breakout Board Kit](https://learn.adafruit.com/ds1307-real-time-clock-breakout-board-kit.md)
