help with wiring lcd to arduino uno

Hey All,
Im a total noob to the arduino and electronics world, and just working on my first project.

Im trying to get an LCD wired to my arduino and having some difficulties figuring out the wiring map as supplied by the manufacturer.

The LCD I have is as follows:
http://www.icstation.com/iici2c-2004-module-yellow-screen-arduino-p-1534.html

The attached pdf is the wiring diagram.

Unfortunately I'm no electronics guy, so Im having difficulties figuring out how exactly this thing should be wired to the arduino.

Currently, it's wired as follows:

vss = to ground on arduino
vdd = to 5v power on arduino
vee = (my first problem. where and how does this pin go ?)
di = to digital pin 12 on arduino (as per sample code attached)
rw = to digital pin 11 on arduino (as per sample code attached)
e = to digital pin 2 on arduino
d0 = pin 3
d1 = pin 4
d2 = pin 5
d3 = pin 6
d4 = pin 7
d5 = pin 8
d6 = pin 9
d7 = pin 10
a = 5v
k = ground

Have I done something wrong here ? If yes, please tell me. I was hoping this would be as simple as wiring it up properly, upload the sample code that came with the LCD and voila.... unfortunately no such luck.

Any advice anyone could provide would be most appreciated.

Cheers

Jason

Arduino_LCD1602.txt (2.18 KB)

Never mind.. I figured it out.. was the wrong resister to vee. As soon as reduced it to a 1k, it worked perfectly.

Cheers

HI,
can someone help me for LCD with bitmap problem i am getting error at draw bitmap line invalid conversion

#include <UTFT.h>

UTFT myGLCD(QD220A,A2,A1,A5,A4,A3);

const unsigned short menu[0X0C] = {0x00,0x00,0x20,0x20,0x30,0x50,0x50,0x78,0x48,0xCC,0x00,0x00};

void setup() {
Serial.begin(9600);
randomSeed(analogRead(0));

// Setup the LCD
myGLCD.InitLCD();
myGLCD.InitLCD();//Initializes twice to improve reliability

int buf[218];
int x, x2;
int y, y2;
int r;

myGLCD.clrScr();

}

void loop() {
//const unsigned menu =0x80;
myGLCD.drawRect(0,0,219,176);
myGLCD.setColor(150,150,255);
myGLCD.fillRect(0,0,219,176);
myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(0, 0, 0);

myGLCD.drawBitmap(20,90,8,12,menu);/// in this line i got error

delay(2000);
}

Right, first things first.

Go and read the instructions, then go back and modify your post to mark up the code as such so we can examine it comfortably and reliably.

And maybe start your own thread.

jvanosch:
Never mind.. I figured it out.. was the wrong resister to vee. As soon as reduced it to a 1k, it worked perfectly.

Cheers

Are you sure you 'figured it out' ?

If the LCD is indeed the model you identified in the link in your first post, you need only 4 wires to the LCD, and vee is NOT one of them!

Yes you CAN wire it up as you identified, but then you should remove the 'add on' board that is connected to all of the pins, OR you can use the display as it is intended using the IIC connections which only involves 4 wires to the pins poking out on the add on board (GND, VCC, SDA, SCL).

Regards,

Graham

The text attached to the first post, contains some code for "//Platform:ARDUINO MEGA 2560".
Are you connecting it to a MEGA ?

As ghlawrence2000 already mentioned, these references lack any backpack I2C information, the code doesn't seem to enable any wire library.
It does mention a driver for Arduino (but these kind of things usually are called library).
And there are some commands i don't recognize (but that doesn't really tell anything), but would usually need some library.

So something is still off, or it's interesting to see the thing working as is.

sohialsadiq:
HI,
can someone help me for LCD with bitmap problem i am getting error at draw bitmap line invalid conversion

#include <UTFT.h>

UTFT myGLCD(QD220A,A2,A1,A5,A4,A3);

const unsigned short    menu[0X0C]  =  {0x00,0x00,0x20,0x20,0x30,0x50,0x50,0x78,0x48,0xCC,0x00,0x00};

void setup() {
  Serial.begin(9600);
  randomSeed(analogRead(0));
 
// Setup the LCD
  myGLCD.InitLCD();
  myGLCD.InitLCD();//Initializes twice to improve reliability

int buf[218];
  int  x, x2;
  int  y, y2;
  int  r;

myGLCD.clrScr();

}

void loop() {
  //const unsigned  menu =0x80;
    myGLCD.drawRect(0,0,219,176);
    myGLCD.setColor(150,150,255);
    myGLCD.fillRect(0,0,219,176);
    myGLCD.setColor(255, 255, 255);
    myGLCD.setBackColor(0, 0, 0);
   
 
 
    myGLCD.drawBitmap(20,90,8,12,menu);/// in this line i got error

delay(2000);
}

I added the code tags.... for future reference to show code use the "</>" button!!

I also removed all the unnecessary crap and spaces in my version! :wink: :stuck_out_tongue: Not sure I would even post code looking as horrific as yours did, with or without code tags! :-* :roll_eyes:

Right, now we covered that, your problem is fixed by placing your 'menu' icon definition in another tab in the IDE. If you had looked at the bitmap example supplied by Henning, you would already have known this!

Your main sketch should look like this :-

#include <UTFT.h>

UTFT myGLCD(QD220A,A2,A1,A5,A4,A3);
extern unsigned int menu[0x0c]; // <======== NOTE!!

void setup() {
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setColor(150, 150, 255);
  myGLCD.fillRect(0, 0, 219, 176);
  myGLCD.setColor(255, 255, 255);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.drawBitmap(20, 90, 8, 12, menu);
}

void loop() {
}

Add new tab in the IDE and call it 'menu.c'

menu.c should look like this :-

#include <avr/pgmspace.h>
const unsigned short menu[] PROGMEM = {0x00, 0x00, 0x20, 0x20, 0x30, 0x50, 0x50, 0x78, 0x48, 0xCC, 0x00, 0x00};

I can only assume you are using a modified version of UTFT since QD220A is not a recognised display type in the Genuine UTFT library, but I can assure you that this solution will work assuming your UTFT initialiser is correct!

By the way, I am sure your 'menu' icon means something to you, but it is so tiny is it really worth this amount of trouble?

Regards,

Graham

PS, You might like to learn about the 'Auto Format' feature in the IDE >Tools menu.

And maybe start your own thread.

What could possibly be wrong with interspersing information about a character mode LCD having an indeterminate interface with information about a graphical LCD?

Don

floresta, @sohialsadiq will get more replies with a better-titled thread. It's for his own good :smiley:

Isaac96:
floresta, @sohialsadiq will get more replies with a better-titled thread. It's for his own good

I suspect you did not quite understand what floresta said. :grinning:

Now that they have displaced 44 of the smileys there is room for a [sarcasm] button.

Don

Good point. :drooling_face: