Pages: [1]   Go Down
Author Topic: Solved-Another glcd with st7920 chip question  (Read 803 times)
0 Members and 1 Guest are viewing this topic.
alabama
Offline Offline
Full Member
***
Karma: 1
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I might have fried this brand new 128x64GLCD,  http://www.ebay.com/itm/221152162523?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649.
When I hooked it up according to this thread http://arduino.cc/forum/index.php/topic,133736.0.html (mine had the contrast pot), I wondered why not even the backlight would come on, even my power light on my breadboard setup would'nt come on. Well, it seems when the PSB pin (15)is hooked to ground, everything shorts out. without it hooked up i can get contrast and backlight, but no display.  Tried the 8 wire setup like a regular lcd (wired as the examples from U8glib) and got the same result. And yes, I changed the constuctor, the board does at least have the pins labled.
Sorry, I have no idea where to find the exact datasheet for the board, I have one for the st7920 that I googled for and it matches the wiring that was set out on the other thread. According to it, PSB has to be hooked to ground to enable serial communication. I tried hooking through resistors all the way down to 100ohms, it got hot but no change, doesn't short out the USB port though. Any ideas?

« Last Edit: December 04, 2012, 02:13:45 pm by Tumbleweed » Logged

Einstein once said you don't really understand anything until you can explain it to your Grandmother

alabama
Offline Offline
Full Member
***
Karma: 1
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, 60+ views and no ideas. I checked the rs, rw, and en outputs on the 328 chip with an o-scope,
good signal there, no solder bridges on either side of the pcb-header connections, so it looks like time to contact the vendor.
Thanks for the brain searches anyway.
TomJ
Logged

Einstein once said you don't really understand anything until you can explain it to your Grandmother

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4107
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well, 60+ views and no ideas.
You have waited only 12 hours.  Half the world, including my part, was asleep most of that time.

Quote
Sorry, I have no idea where to find the exact datasheet for the board...
If you post nice clear photographs of both sides of your board someone else may get an idea.  If you post a nice clear photograph that shows how your board is connected to your Arduino someone may also be able to help you with your connections.

Don

Logged

alabama
Offline Offline
Full Member
***
Karma: 1
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it!!
Used the parallel hookup from the vendor, changed constructor pins to reflect a 328 instead of the other AVR and Bob's my uncle. Wanted to use serial for the project I was working on, but doesn't look like this will leave me enough pins. Guess its time to try to find a 4bit setup example. This is my first GLCD so I don't know if that is even possible.
Thank You floresta, usually it seems someone has my simple questions answerd before I hit "post",
the e-bay page has good pictures and a serial hookup is pretty straight forward, 3 wires and the PSB pin that I couldn't get to work, so pictuers of my hookup wouldn't have done much more. Thanks again though.
In case someone else buys this non-documented GLCD here is the code with the pinouts I used, from the u8glib Hello World example.
Code:
/*

  HelloWorld.pde
 
  "Hello World!" example code.
 
  >>> Before compiling: Please remove comment from the constructor of the
  >>> connected graphics display (see below).
 
  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
 
  Copyright (c) 2012, olikraus@gmail.com
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, this list
    of conditions and the following disclaimer.
   
  * Redistributions in binary form must reproduce the above copyright notice, this
    list of conditions and the following disclaimer in the documentation and/or other
    materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
*/


#include "U8glib.h"

// setup u8g object, please remove comment from one of the following constructor calls


U8GLIB_ST7920_128X64 u8g(2,3,4,5,6,7,8,9,12, U8G_PIN_NONE, U8G_PIN_NONE,10, 11);   // 8Bit Com: D0..D7: 2,3,4,5,6,7,8,9 en=12, di=cs=10,rw=11


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);
}
TomJ

Logged

Einstein once said you don't really understand anything until you can explain it to your Grandmother

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If connecting PSB to ground was shorting out the power supply, then it sounds like your display is faulty. I always use displays of this type in serial mode. I suggest you trace the track leading from the PSB connection, looking for solder bridges etc.

EDIT: If your display uses the same circuit board as mine and others that I have seen pictures of on this forum, then on the back of the board is a small rectangle containing 3 pads, marked with P on the left and S on the right. If the centre pad is solder-bridged to the one marked P, that would probably cause this problem.
« Last Edit: December 06, 2012, 07:08:53 pm by dc42 » Logged

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.

Pages: [1]   Go Up
Jump to: