Offline
Newbie
Karma: 0
Posts: 14
|
 |
« on: November 11, 2012, 01:35:38 am » |
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.   
|
|
|
|
« Last Edit: November 11, 2012, 01:45:10 am by Nahuel1990gchu »
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4668
|
 |
« Reply #1 on: November 11, 2012, 01:48:13 pm » |
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.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #2 on: November 11, 2012, 04:33:50 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Offline
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #3 on: November 11, 2012, 07:23:42 pm » |
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.htmlOliver
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #4 on: November 13, 2012, 11:56:33 am » |
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: #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.
|
|
|
|
« Last Edit: November 13, 2012, 11:58:05 am by Nahuel1990gchu »
|
Logged
|
|
|
|
|
Germany
Offline
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #5 on: November 13, 2012, 01:54:57 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #6 on: November 13, 2012, 08:09:33 pm » |
 Uploaded with ImageShack.usrespeel lcd turns but does not work. In arduino program changed U8GLIB_ST7920_128X64 u8g(4, 3, 2, U8G_PIN_NONE, 5 );
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Offline
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #7 on: November 14, 2012, 12:50:02 am » |
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/7810659332Oliver
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4668
|
 |
« Reply #8 on: November 14, 2012, 03:08:14 am » |
As well as not connecting Vdd or Vss, I don't think he has connected the PSB pin to ground.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #9 on: November 14, 2012, 09:15:19 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Offline
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #10 on: November 15, 2012, 12:47:05 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #11 on: November 18, 2012, 04:30:55 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4668
|
 |
« Reply #12 on: November 18, 2012, 05:13:41 pm » |
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.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #13 on: November 18, 2012, 06:52:03 pm » |
 My lcd pines: gnd vcc Your conneccion: vss vdd is the same? Do you have any programs to test the connection?
|
|
|
|
« Last Edit: November 18, 2012, 07:06:04 pm by Nahuel1990gchu »
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4668
|
 |
« Reply #14 on: November 19, 2012, 02:46:41 am » |
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.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
|