Pages: [1]   Go Down
Author Topic: glcd "PVG120602EGE" k0108 | HELP PLSE  (Read 2009 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have a glcd "PVG120602EGE" (http://www.attiny.com/software/PVG120602EGE.pdf) k0108  and a arduino mega 1280, i conect all the wires and make upload of ks0180 and the lcd don´t do anything on serial monitor showm me this Serial initialized
——————————————————————–
GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
Panel Configuration:ks0108
Pin Configuration:ks0108-Mega
——————————————————————–
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
CSEL1:33(PIN_C4) CSEL2:34(PIN_C3)
RW:35(PIN_C2) DI:36(PIN_C1) EN:37(PIN_C0)
D0:22(PIN_A0) D1:23(PIN_A1) D2:24(PIN_A2) D3:25(PIN_A3)
D4:26(PIN_A4) D5:27(PIN_A5) D6:28(PIN_A6) D7:29(PIN_A7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(33,0×1, 34,0×0) CHIP1:(33,0×0, 34,0×1)
Data mode: byte
——————————————————————–
Diag Loop: 1
Initializing GLCD

please help i have this project to give on saturday
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13676
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Show us your code,
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
/*
 * ks0108 GLCDexample
 * (example sketch from original ks0108 library)
 *
 * Basic test code for the Arduino KS0108 GLCD library.
 * This code exercises a range of graphic functions supported
 * by the library and is an example of its use.
 * It also gives an indication of performance, showing the
 *  number of frames drawn per second. 
 */

#include <glcd.h>
#include "fonts/Arial14.h"         // proportional font
#include "fonts/SystemFont5x7.h"   // system font
#include "bitmaps/ArduinoIcon.h"     // bitmap
//#include "include/glcd_Deprecated.h"

/*
 * Check for small displays as this code was written
 * before small displays were supported.
 */
#if DISPLAY_HEIGHT < 64
#error ks0108 example requires a display at least 64 pixels tall
#endif
#if DISPLAY_WIDTH < 128
#error ks0108 example requires a display at least 128 pixels wide
#endif

/*  Example 24.4 - KS0108 Graphic LCD demonstration
http://tronixstuff.com/tutorials > chapter 24  CC by-sa-nc
*/
int xc, yc = 0;
int d=1000; // for delay use
void setup()
{
GLCD.Init(NON_INVERTED);   // initialise the library with pixel default as off
GLCD.ClearScreen();        // clear the LCD
randomSeed(analogRead(5));
}
void loop()
{
GLCD.DrawRect(0, 0, 127, 63, BLACK); // draw an open rectangle that spans the extremties of the LCD
GLCD.DrawRect(10, 10, 117, 53, BLACK);
GLCD.DrawRect(20, 20, 107, 43, BLACK);
GLCD.DrawRect(30, 30, 97, 33, BLACK);
delay(d);
GLCD.ClearScreen();  // clear the LCD
for (int a=1; a<20; a++)
{
GLCD.DrawCircle(63,31,a,BLACK);    // draws a circle with centre at 61,31; radius of a, with black pixels
delay(d-800);
GLCD.DrawCircle(63,31,a,WHITE); // draws the same circle with the pixels off
}
delay(d);
GLCD.ClearScreen();  // clear the LCD
for (int a=0; a<128; a++)
{

delay(d-950);
}
delay(d-800);
for (int a=0; a<128; a++)
{

delay(d-950);
}
GLCD.ClearScreen();  // clear the LCD
for (int a=0; a<64; a++)
{

delay(d-950);
}
for (int a=0; a<64; a++)
{
delay(d-950);
}
GLCD.ClearScreen();  // clear the LCD
GLCD.DrawRoundRect(30, 30, 20,20, 5,BLACK);   // draw a rectangle with rounded edges: x, y, width, height, radius of rounded edge, colour
GLCD.DrawRoundRect(60, 30, 20,20, 5,BLACK);
delay(d);
GLCD.ClearScreen();  // clear the LCD
delay(d);
GLCD.FillRect(30, 30, 30, 10, BLACK);  // draws a filled rectangle: x, y, width, height, colour
delay(d);
GLCD.ClearScreen();  // clear the LCD
for (int a=0; a<1000; a++)
{
xc=random(0,127);
yc=random(0, 63);
GLCD.SetDot(xc, yc, BLACK); // turn on a pixel at xc, yc);
delay(2);
}
GLCD.ClearScreen();  // clear the LCD
}
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if i disconect the +5 and the reset show me this on serial monitor, and the sreen of lcd some dots go to black blink


Serial initialized
--------------------------------------------------------------------
GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
Panel Configuration:ks0108
Pin Configuration:ks0108-Mega
--------------------------------------------------------------------
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
 CSEL1:33(PIN_C4) CSEL2:34(PIN_C3)
 RW:35(PIN_C2) DI:36(PIN_C1) EN:37(PIN_C0)
 D0:22(PIN_A0) D1:23(PIN_A1) D2:24(PIN_A2) D3:25(PIN_A3)
 D4:26(PIN_A4) D5:27(PIN_A5) D6:28(PIN_A6) D7:29(PIN_A7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(33,0x1, 34,0x0) CHIP1:(33,0x0, 34,0x1)
Data mode: byte
--------------------------------------------------------------------
Diag Loop: 1
Initializing GLCD
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 0 != 1
 Compare error: 0 != 2
 Compare error: 0 != 4
 Compare error: 0 != 8
 Compare error: 0 != 10
 Compare error: 0 != 20
 Compare error: 0 != 40
 Compare error: 0 != 80
TEST FAILED
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am not sure what version of the glcd library are you using.
But from your serial output I can tell that you are not
running the latest version which is currently RC2.

The beta had issues with 1280 support and there are also
some "hacked" versions of the beta code that do not work properly
for the megas.

Moving forward, the best thing is to first go grab the RC2 version of the library
from the official source:
http://code.google.com/p/glcd-arduino/downloads/list

That said, in nearly all cases, symptoms like this are due to incorrect wiring or due to
a damaged glcd from previous incorrect wiring.

From looking at the first serial output, it appears that the
code is getting stuck waiting for the BUSY status to go away. If things are wired incorrectly,
the code can end up looking at the incorrect glcd signal or perhaps the glcd board is not resetting properly
both of which can cause the code to get stuck waiting on BUSY forever.


Questions:
1) Are you sure the data sheet you have is for the board you have?
 The reason I ask is that the data sheet shows an EL backlight. That is pretty unusual for a ks0108 module
 and usually requires a high voltage high frequency AC power supply to drive it.

2) Do the arduino pin numbers reported in the diag serial output all match the glcd
pins you have them connected to as shown in your data sheet?
(If you are not sure, then post how you have hooked up each wire)


--- bill

« Last Edit: July 14, 2011, 04:35:25 pm by bperrybap » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Questions:

1) Yes i am sure about datasheet, on back in lcd boar show me that reference "PVG120602EGE", yes on page 37 show that glcd need 120 AC to EL but i am not connected, i just have contrast and the others connections.

2) I verificate 5 or more times the wires, and diss miss all and put back on, and the same again and again.

On paga 19 data sheet tell some about reset but i can´t undestand very well.

i tried a simple code like:


Code:
#include <glcd.h>
#include "fonts/Arial14.h"         // proportional font
#include "fonts/SystemFont5x7.h"   // system font
#include "bitmaps/ArduinoIcon.h"     // bitmap
//#include "include/glcd_Deprecated.h"

void setup(){
  GLCD.Init(NON_INVERTED);   // initialise the library, non inverted writes pixels onto a clear screen
}

void  loop(){   // run over and over again
  GLCD.CursorTo(14,2);              // positon cursor  
  GLCD.Puts("hi");               // print a text string
}


and nothing.




i make download that library and run again and continued the same.

how i can see if lcd are in good functionallaty?
how can I resolve this problem?

Thanks for help me.
« Last Edit: July 14, 2011, 04:47:11 pm by ntmg » Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The diags sketch is the best way to check the glcd and wiring.
Stick with that until we get things working.
No need to try anything else until the diags pass.

The reset signal (pin 17) on the glcd needs to be hooked up to something.
The simplest is to hook it to the RESET pin on the mega board.
That will reset the glcd when the reset button on the mega is pressed.

Alternatively, you can modify the pin configuration file and let the software
control it. To do that you must edit glcd/config/ks0108_Mega.h
You must un comment (remove the leading slashes) on the line that controls the software reset signal "glcdRES".
But also change the line to use pin 30 instead of pin 32.
(Pin 32 was an error. It has been fixed in the library code but I have not released another library yet)
Then hook the reset pin on glcd pin 17 to mega pin 30.

After you get the GLCD reset signal hooked up, run the diags and post the output.

But you still never said how you wired up the pins.
Which mega pins are going to which glcd pins?

--- bill
« Last Edit: July 14, 2011, 06:24:34 pm by bperrybap » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Already do what you sad.

My connections is in attach file, and 19 and 20 of glcd are disconect and RST to pin 30. on serial monitor now the lcd initailizing with all conections but he fails on "Memory Test"

Code:
Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 22
--------------------------------------------------------------------
GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
GLCD Lib build date: Sat 04/23/2011 15:01:49.03
GLCD Lib build number: 421
Panel Configuration:ks0108
Pin Configuration:ks0108-Mega
--------------------------------------------------------------------
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
 CSEL1:33(PIN_C4) CSEL2:34(PIN_C3)
 RW:35(PIN_C2) DI:36(PIN_C1) EN:37(PIN_C0)
 D0:22(PIN_A0) D1:23(PIN_A1) D2:24(PIN_A2) D3:25(PIN_A3)
 D4:26(PIN_A4) D5:27(PIN_A5) D6:28(PIN_A6) D7:29(PIN_A7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(33,0x1, 34,0x0) CHIP1:(33,0x0, 34,0x1)
Data mode: byte
--------------------------------------------------------------------
Diag Loop: 1
Initializing GLCD
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 30 != 1
 Compare error: 30 != 2
 Compare error: 30 != 4
 Compare error: 30 != 8
 Compare error: 30 != 10
 Compare error: 30 != 20
 Compare error: 30 != 40
 Compare error: 30 != 80
TEST FAILED



* mega.png (9.88 KB, 115x550 - viewed 23 times.)
« Last Edit: July 15, 2011, 01:32:18 pm by ntmg » Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The mega wiring in your table matches the GCD data sheet which is very good.
I'm assuming that you accidentally left out the connection for GLCD pin 17 (RST) to Mega pin 30 from the table.
However, from looking at the serial output it looks like you did not edit glcd/config/ks0108_Mega.h
to tell the software to use pin 30 for the glcd RST signal so the glcd is
not being properly reset.
Make sure to edit that file to allow the library to use pin 30 for RST control.
You should have a line like this in the file:
Code:
#define glcdRES         30    // Reset Bit

What about the contrast circuit?
How are pins 3 and 18 on the glcd hooked up?
Sometimes if those are incorrectly wired up it can affect the control/data interface.

How are you connecting the mega to the glcd?
Can you take a clear close up photo of your megaboard and glcd so I can see
the connections?

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I check with voltimiter the continuidade (piiiiiiii) of wiring, all set, and that give the same mistake, the reset in mega button i click, and do reset on lcd.

LCD does mot work and i don t know why.  


Code:
Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 22
--------------------------------------------------------------------
GLCD Lib Configuration: glcd ver: 3 glcd_Device ver: 1 gText ver: 1
GLCD Lib build date: Sat 04/23/2011 15:01:49.03
GLCD Lib build number: 421
Panel Configuration:ks0108
Pin Configuration:ks0108-Mega
--------------------------------------------------------------------
GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
 CSEL1:33(PIN_C4) CSEL2:34(PIN_C3)
 RES:30(PIN_C7) RW:35(PIN_C2) DI:36(PIN_C1) EN:37(PIN_C0)
 D0:22(PIN_A0) D1:23(PIN_A1) D2:24(PIN_A2) D3:25(PIN_A3)
 D4:26(PIN_A4) D5:27(PIN_A5) D6:28(PIN_A6) D7:29(PIN_A7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(33,0x1, 34,0x0) CHIP1:(33,0x0, 34,0x1)
Data mode: byte
--------------------------------------------------------------------
Diag Loop: 1
Initializing GLCD
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 10 != 1
 Compare error: 10 != 2
 Compare error: 10 != 4
 Compare error: 0 != 8
 Compare error: 0 != 10
 Compare error: 10 != 20
 Compare error: 10 != 40
 Compare error: 10 != 80
TEST FAILED

Images:

http://blackless.site40.net/DSC03251.JPG

http://blackless.site40.net/DSC03250.JPG

http://blackless.site40.net/DSC03252.JPG
« Last Edit: July 17, 2011, 05:28:22 pm by ntmg » Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The pictures are too dark and grainy for me to see much.
ISO 1000 is too high to get a clear picture.
See if you can add more light or use the flash.
If the flash is too strong in macro mode, drop back to about 15 inches or so.

The walking ones test writes different values to location 0 (zero) of glcd memory.
It writes 8 values each with a single bit set.
Compare error: 10 != 1
means the s/w wrote a hex 1 but read back a hex 10

This type of error is due to either bad/incorrect wiring or a bad glcd.

Unless the glcd was miswired with the power signals it almost always a wiring issue.
(miswiring the power signals +5v, GND, VEE, VO, lines can damage a glcd even if only done momentarily)

Wiring issues can be due to improper contacts in a socket or breadboard or even broken wires.

- What do you mean when you said you checked continuity of the wiring?

- Is the RST signal (GLCD pin 17) hooked up to mega pin 30?

Check power to the GLCD.
- Do you see around 5v if you measure the voltage between glcd pins 1 (gnd) & 2 (vcc)

- What value is your contrast pot? 5k? 10k? 20k? etc...

- What voltage to you see on the glcd Vo line?
Measure between glcd pin 3 and glcd pin 1 with you meter using pin 1 as ground.
(Be very careful not to short these lines together)
If you don't have a digital meter, use pin 3 as the ground and voltage measured will actually be negative)
You should see a negative voltage. (I see around -2.5v on my blue ks0108)

- Do you have access to any other test equipment?
logic probe? oscilloscope?, logic analyzer?

--- bill
« Last Edit: July 17, 2011, 07:06:27 pm by bperrybap » Logged

Pages: [1]   Go Up
Jump to: