LCD connection

15 Feb 2011

Hello everyone,

As I am new to mbed, I am currently having problem with connecting an lcd to the mbed please check the attached lcd picture.

An any formation would be helpfull.

Thanks

/media/uploads/sandeep08/lcd.jpg

15 Feb 2011

Well the picture is a bit blur... It could be HD44780 compatible but to be sure you have to check the serial number on the back of the LCD. It is to vague to read...

Can you post the serial number of product ID of the LCD?

15 Feb 2011

Hi Ben,

Thanks for the reply, the only thing written on the LCD is DISPLAYTECH 162D. The LCD is available on the following site with all the detail.

http://il.rsdelivers.com/product/displaytech/162d-ba-bc/16x2-reflective-stn-yel-grn-85x30/5326470.aspx

15 Feb 2011

Hi !

The supplied datasheet is similar to standard lcd's. So it should be easy to connect. See page 9 for the pins.

I connected my 16x2LCD this way:

2x16LCD:

RS pin30

E pin29

D4 pin28

D5 pin27

D6 pin26

D7 pin 25

V0 -> 1k -> GND

VCC 5v(pin39)

RW GND

Hope this helps

For software see here http://mbed.org/cookbook/Text-LCD

Regards charly

sandeep sooteehall wrote:

Hi Ben,

Thanks for the reply, the only thing written on the LCD is DISPLAYTECH 162D. The LCD is available on the following site with all the detail.

http://il.rsdelivers.com/product/displaytech/162d-ba-bc/16x2-reflective-stn-yel-grn-85x30/5326470.aspx

15 Feb 2011

Hi,

Thanks for the information, I had a look earlier to your lcd connection but what I cant understand is on my LCD the first two pins will go in Vin and GRD which fine, but the other pins does not say which one is which and they have double holes give tatal of 14 cables, so how do I know which one is which in term of RS E, D4, D5, D6, D7, V0 -> 1k -> GND, VCC 5v(pin39) and RW-GND.

This what I cant understand at the moment.

15 Feb 2011

Hello Sandeep,

your display has not the standard pinout ! 5V is on pin 14 and ground on 13 ! VO has to be connected to a poti to setup the contrast (1k to 10k will work). If you change the VO voltage the display have to change. Without init you normaly see one of the two lines darker. HD44780 compatible displays can be sensitive for contrast voltage - VO connected to 5V or GND no display.

To follow the demo :

#include "mbed.h"
#include "TextLCD.h"

TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD16x2); // rs, e, d4-d7

int main() {
    lcd.printf("Hello World!\n");
}

you have to connect: p15 to LCD 11, p16 to LCD 9, p17 to LCD 4, p18 to LCD 3, p19 to LCD 2, p20 to LCD 1, LCD 10 to GND, LCD 5 - LCD 8 open or conected to GND

15 + 16 is the background light. You have to use a resistor to limit the current when using 5V.