Go Down

Topic: connection diagram order to arduino lcd j12864 - pedido de diagrama de coneccion (Read 4655 times) previous topic - next topic

Nahuel1990gchu

Hello, I am writing here to ask for a connection diagram of lcd j12864 my Arduino mega.
Sorry to explain some, but I have trouble with the language.
Thank you.


Si alguien me quiere ayudar, hablo espaƱol, pero uso google traductor.
Gracias.






dc42

That LCD has a PSB pin, which means that it is probably uses the ST7920 controller chip and can be connected in serial or parallel mode. I have a fairly basic serial mode driver for it at https://github.com/dc42/arduino/tree/master/Libraries/Lcd7920. The pin connections are listed in the sketch. For a more comprehensive library, search for U8glib.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Nahuel1990gchu

I tried so, but does not work, you have my lcd pin are:
gnd
vcc
vo
rs
r / w
and
DB0-DB7
psb
nc
rst
vout
bla
blk

and a lateral
k
to

Thanks and sorry for my language.
Gracias y disculpen por mi idioma.

olikraus

Except for power supply and some suitable rc network for the reset, only three lines need to be connected with the Arduino.
See here: http://arduino.cc/forum/index.php/topic,130989.0.html

Oliver

Nahuel1990gchu

My connetion:

PSB to GND

E to Digital Pin 4
R/W to digital pin 3
RS to digital pin 2

K and A 5v GND respectively

My Program:
Code: [Select]

#include "U8glib.h"
U8GLIB_ST7920_128X64 u8g(4, 3, 2, U8G_PIN_NONE );

void draw(void) {
 // graphic commands to redraw the complete screen should be placed here  
 u8g.setFont(u8g_font_unifont);
 //u8g.setFont(u8g_font_osb21);
 u8g.drawStr( 0, 22, "Hello World!");
}

void setup(void) {
 
 // flip screen, if required
 // u8g.setRot180();
 
 // set SPI backup if required
 //u8g.setHardwareBackup(u8g_backup_avr_spi);

 // assign default color value
 if ( u8g.getMode() == U8G_MODE_R3G3B2 )
   u8g.setColorIndex(255);     // white
 else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
   u8g.setColorIndex(3);         // max intensity
 else if ( u8g.getMode() == U8G_MODE_BW )
   u8g.setColorIndex(1);         // pixel on
}

void loop(void) {
 // picture loop
 u8g.firstPage();  
 do {
   draw();
 } while( u8g.nextPage() );
 
 // rebuild the picture after some delay
 delay(500);
}




respeel lcd turns but does not work.

olikraus

In prinziple correct, but maybe "rst" (which probably is the reset line) should be connected to something.
"rst" should be tied to power supply. If this is not sufficient, try this:

U8GLIB_ST7920_128X64 u8g(4, 3, 2, U8G_PIN_NONE, 5 );

Connect "rst" to pin 5. U8glib will do a reset.

A picture of your setup (arduino + display) would be also nice to double check your connection.

Oliver

Nahuel1990gchu



Uploaded with ImageShack.us

respeel lcd turns but does not work.

In arduino program changed
U8GLIB_ST7920_128X64 u8g(4, 3, 2, U8G_PIN_NONE, 5 );

olikraus

Thanks. Unfortunately the lables of the display pins are not readable, but from one of your first pictures, I would say, that you did not power up the display.
VCC must be connected to power (3.3V or 5V, depending on the specification of the display)
GND must be connected to GND of the Arduino.

K and A are reserved for the power of the backlight LEDs. Usually you must not apply power here without resistor.

Can you share the specification for your display?

BTW, it seems the same display as here, correct? http://www.flickr.com/photos/73766535@N00/7810659332

Oliver


dc42

As well as not connecting Vdd or Vss, I don't think he has connected the PSB pin to ground.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Nahuel1990gchu

Keep the lcd not working.
The LCD is the same picture, but I see that there are only 4 wires ahy connected.

Aca leave clearer pictures of my connections.

Sorry for my language, I'm using google translator.









In that account there are more images of lcd and their connections.

olikraus

For the latest pictures you attached power supply and PSB, correct?
The wires are not soldered to the display. This probably will not provide a reliable connection.

Oliver

Nahuel1990gchu

Hello, actually I could not run the lcd, and I donot like it, anyone has a connection that I can show it works. And if possible some sample program.

So far all I can do is to pledge, but nno shows me nothing.

Thank you very much, sorry for the language, I'm using google translator.

dc42

Here are the connections I use:

// Pins for serial LCD interface. For speed, we use the SPI interface, which means we need the MOSI and SCLK pins.
// Connection of the 7920-based GLCD:
//  Vss to Gnd
//  Vdd to +5v
//  Vo through 10k variable resistor to +5v (not needed if your board has a contrast adjust pot on the back already, like mine does)
//  RS to +5v
//  PSB to gnd
//  RW to Arduino MOSI (see below for pin mapping)
//  E to Arduino SCLK (see below for pin mapping)
//  RST to +5v
//  D0-D7 unconnected
//  BLK to ground (or collector of NPN transistor if controlling backlight by PWM)
//  BLA via series resistor (if not included in LCD module) to +5v or other supply

Your display has a contrast pot on it already, so you don't need to connect the Vo pin.

You do need to have reliable soldered connections. If you solder a header pin strip to the display, you can then plug it into a breadboard.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Nahuel1990gchu


My lcd  pines:
gnd vcc

Your conneccion:
vss
vdd


is the same?


Do you have any programs to test the connection?

dc42

Yes, that's equivalent. But as olikraus said, you will need to solder wires or header pins to the pads in order to get good enough connections.

I have a basic driver and test sketch at https://github.com/dc42/arduino/tree/master/Libraries/Lcd7920.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up