AGM1264 GLCD problem

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys,

I have a 128x64 AGM1264 KS0108 controller GLCD.

I am trying to check if the GLCD is working. Eventually I will be using this with an Atmega328.

Here is the basic hookup I am using to check if the GLCD works:

Pin 1 (vss) ---> GND
Pin 2 (vdd) ---> 5V (I checked vdd at the GLCD connector and it is 5V)
Pin 3 (Vo) ----> GND
Pin 6 (E) ----> 5V
Pin 15 (CS1) ---> 5V
Pin 17 (Reset) ---> GND
Pin 18 (Vee) ---> GND

With the above configuration, shouldn't I see "boxes" on the GLCD?

Could it be the contrast pin?

Do I need a negative power supply for the Vee pin?

Datasheet is attached.

Appreciate any help.

Thanks.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

shouldn't I see "boxes" on the GLCD?

You seem to be very confused - you get character cell "boxes" when you use a character format LCD (usually driven by an HD44780 compatible controller).

A GLCD is just a see of dots (128 across, 64 up and down). Things appear on the display when YOU tell them too - not before.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So with the above setup, should I be seeing dots on the GLCD? The GLCD looks completely dead.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Do I need a negative power supply for the Vee pin?
Yes, this is clearly pictured in datasheet page 8.
Without that negative voltage it will not work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But even then you won't see dots simply by applying power - you need to write data into the RAM frame buffer in the KS0108 and for any 1 bits you will see black dots.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have several of this exact display up and running.

Over the past year, I've spent an enormous amount of time working with this exact glcd module
including updating the Arduino ks0108 library (now called "glcd" and in beta release)
to have many new graphic and text capabilities including support for several other glcd modules with other chips.

I know the datasheet is kind of confusing, (even a few errors) but you need to study it more carefully.
You have several incorrect connections; hopefully nothing fried.
Don't play with it anymore until you correct your connections.
The power pins (pin 1 and pin 2) are the only correct pins.

My biggest concern is for Vee.
Vee is an output, not an input.
It is the on-board negative voltage supply that is used along with a potentiometer to control the Vo input voltage for contrast adjustment.
(there is no need for an additional negative power supply as it is on board)

RESET is active low, which means holding it low is holding the module in reset.
To reset the module you would drop reset low, then
raise it back high again.

I have attached a text drawing of how to hook up the pins.

This module is a simple/dumb memory mapped display. Once you have the electrical connections setup,
you have to have code that wiggles the control and data lines to read & write the LCD memory pages to turn on/off pixels.

The other control pins like E, CS1, CS2, R/W, D/I
must be properly controlled by the software
to perform data reads & writes, command writes,
and status reads.
The 8 data pins can be either inputs or output pins depending on the data direction.
On the m328, you normally cannot get all 8 data bits in a single AVR port.

The code to control a ks0108 is non trivial, especially
when supporting more complex graphic functions and user defined fonts with wrapping and scrolling
but there are a few ks0108 libraries out there if you look around.

One other thing on this particular display.
The display powers up or after reset with the display off. So until you send a DISPLAY_ON command no dots will show up on the screen. So you have to have quite a bit of software up and operating correctly to be able to see anything.

BTW: there is an error with the DISPLAY ON/OFF commands in the data sheet. Bit 0 controls the operation. When 1 the display is on, when 0, the display is turned off.

--- bill

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the info, Bill. I will give this a try and see if I can get a heartbeat from the GLCD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bill,

Ok I tried the connections you have shown along with the GLCD driver code and there is no response from the GLCD (screen is blank and it doesn't look like the GLCD is on)

I want to try and use the simplest GLCD driver code that will check if the GLCD is working. Following is my attempt (code taken from Sami Varjo's complete driver code) I have put all the header file code along with the main code in one file to make it easy for reading.


//*****************************************************************************
//
// Work File 	: lcd_driver_KS0107.h
// Description	: Driver for KS0107 driven LCD display.
//
// Author       : Sami Varjo
// Created      : 2008-06-23
// Revised      : 2008-06-29
// Version      : 0.03
// Target MCU	: Atmel AVR - ATMEGA 5815 (or equivalent)
// Uses         : avr-libc
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
// Change history:  
//       ver 0.03: Cleaned up
//       ver 0.02: Added several functions
//       ver 0.01: Project started - basic definitions
//
//*****************************************************************************

#ifndef LCD_DRIVER_KS0107
#define LCD_DRIVER_KS0107

#include 
#include 

//MCU definitions
#ifndef F_CPU
//#define F_CPU 1000000UL //1M CPU speed (for ) 
#define F_CPU  8000000UL //Atmega328  8 MHz
//#define F_CPU 14745600UL //Atmega8    14.7456MHz
#endif


//23--> 4
//
//MCU connection definitions  (bits for pins and ports)
//Control port pins
#define LCD_CONTROLPORT   PORTC   //port to send control signals (PC1-PC7) 
#define LCD_CPDIRECTION   DDRC    //direction register for port to LCD control
                                  //input 0, output 0b11111111 (0xff)
#define LCD_CS1  (1<<PIN3) // Chip select 1
#define LCD_CS2  (1<<PIN4) // Chip select 2
#define LCD_RST  (1<<PIN5) // RESET bit - IF 0 IT STARTS INITIALIZATION
#define LCD_RS   (1<<PIN0) //MCU pin to LCD RS  0 == command  | 1 == DDRAM data 
#define LCD_RW   (1<<PIN1) //MCU pin to LCD R/W 0 == write to 0|1 == read from  
#define LCD_E    (1<<PIN2) //MCU pin to LCD E   1 == Enable operation - execute

//Data port definitions (actual commands and data)
#define LCD_DATAPORT      PORTB // MCU port connected to LCD data pins
#define LCD_DATA_IN	  PINB  // Place to read data in
#define LCD_DPDIRECTION   DDRB  // direction reg for data/command port data 1=out 0=in (A0)
#define LCD_D0 (1<<PIN0) // MCU pin to LCD  : data bit 0
#define LCD_D1 (1<<PIN1) // MCU pin to LCD  : data bit 1
#define LCD_D2 (1<<PIN2) // MCU pin to LCD  : data bit 2
#define LCD_D3 (1<<PIN3) // MCU pin to LCD  : data bit 3
#define LCD_D4 (1<<PIN4) // MCU pin to LCD  : data bit 4
#define LCD_D5 (1<<PIN5) // MCU pin to LCD  : data bit 5
#define LCD_D6 (1<<PIN6) // MCU pin to LCD  : data bit 6
#define LCD_D7 (1<<PIN7) // MCU pin to LCD  : data bit 7

//LCD spec definitions
#define LCD_PAGE_HEIGHT 8   //8 lines per page
#define LCD_LINES       64
#define LCD_LINE_LENGTH 128
#define LCD_NUM_CHIPS   2

#define FALSE   0x00
#define TRUE    0x01

#define LEFT  0
#define RIGHT 1

//LCD binary instructions
#define SET_DISPLAY_OFF             0b00111110       
#define SET_DISPLAY_ON              0b00111111
#define SET_COLUMN_ADDRESS(col)     0b01000000|col  //0-63
#define SET_INIT_DISPLAY_LINE(line) 0b11000000|line //0-63
#define SET_PAGE_ADDRESS(page)      0b10111000|page //0-7

//Function declarations for low level operations
void    LCD_sendCommand(uint8_t command);
void    LCD_writeByte(uint8_t data);
uint8_t LCD_readByte(void);
uint8_t LCD_readStatus(void);
void    LCD_selectChip(void);
void    LCD_selectLeftChip(void);
void    LCD_selectRightChip(void);

//API function declarations
void LCD_init(void);   //do reset and int LCD
void LCD_on(void);     //turn on  LCD (not backlight)
void LCD_off(void);    //turn off LCD (not backlight)

void LCD_clr(void);
void LCD_allPagesOn(uint8_t byte);

void LCD_setCursorXY(uint8_t x, uint8_t y);
void LCD_pixelOn(uint8_t x, uint8_t y);
void LCD_pixelOff(uint8_t x, uint8_t y);
void LCD_invertPixel(uint8_t x, uint8_t y);

void LCD_invertPage(uint8_t page, uint8_t x1, uint8_t x2);
void LCD_onPage(uint8_t page,uint8_t x1,uint8_t x2);
void LCD_offPage(uint8_t page,uint8_t x1,uint8_t x2);

void LCD_putchar(uint8_t c);
void LCD_puts(uint8_t* string);
void LCD_putsp(uint8_t* string, uint8_t page, uint8_t x);

uint8_t LCD_isBusy(void);
uint8_t LCD_isOff(void);
uint8_t LCD_isReseting(void);

//Functions to set RAM addresses for read and write operations
void LCD_setPageAddress(uint8_t page);
void LCD_setColumnAddress(uint8_t col);
void LCD_setInitialLineAddress(uint8_t line);

//help functions
void LCD_wait_execution(void);
void LCD_wait_busy(void);
void LCD_selectSide(uint8_t side);
uint8_t _LCD_readByte(void);

#endif //Define LCD_DRIVER

/*****************LCD_Driver_ks0107.c****************/

//*****************************************************************************
//
// Work File		: lcd_driver_KS0107.c
// Description		: Driver for KS0107 driven LCD display
//            		  Implementations for lcd_driver_KS0107.h
//
// Author		: Sami Varjo
// Created		: 2008-23-06
// Revised		: 2008-29-06
// Version		: 0.04
// Target MCU	        : Atmel AVR series - ATMEGA5815 (or equivalent)
// Uses                 : avr-libc lcd_driver_KS0107.h font5x7.h
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
// Change history:  
//       ver 0.04: Fixed LCD_readStatus() + changed LCD_allPixelsOn() to 
//                 LCD_allPagesOn(byte) + added starting x to LCD_putsp()
//       ver 0.03: Bugs fixed
//       ver 0.02: Added several functions
//       ver 0.01: Project started - basic definition
//
//*****************************************************************************

#include "lcd_driver_KS0107.h"
#include 
#include 
#include 
#include "font5x7.h"

//------------------------------------------------------------------------------
//Global variables used by driver
uint8_t LCD_currentX, LCD_currentY;

//------------------------------------------------------------------------------
//Send a binary command to LCD 
// Target is currently selected controller chip
void LCD_sendCommand(uint8_t command)
{
  LCD_CPDIRECTION  = 0xff;     //send data out
  LCD_DATAPORT     = command;  //load command to port

  LCD_CONTROLPORT |= LCD_E;    //execute  (LCD_RS and LCD_RW by default low)
  LCD_wait_execution();            
  LCD_CONTROLPORT &= ~LCD_E;   //stop execition  
  LCD_wait_execution();
}

//------------------------------------------------------------------------------
//Write a byte to LCD.  Single 8 bit segment is send to current cursor position
//
void LCD_writeByte(uint8_t data)
{
  LCD_setCursorXY(LCD_currentX,LCD_currentY); //address and chip selected 

  LCD_DPDIRECTION  = 0xff;     //send data out 
  LCD_DATAPORT     = data;     //load data to port
  LCD_CONTROLPORT |= (LCD_RS | LCD_E); 
  LCD_wait_execution();            

  LCD_CONTROLPORT &= ~LCD_E;
  LCD_CONTROLPORT &= ~LCD_RS;  //stop and go back to command mode
  LCD_wait_execution();            

  LCD_currentX++;
}

//-----------------------------------------------------------------------------
//Read a byte from LCD DDRAM (using modify_read mode)
//
uint8_t _LCD_readByte(void)
{
  uint8_t data;
  LCD_setCursorXY(LCD_currentX,LCD_currentY);    //address and chip selected
  LCD_DPDIRECTION &= 0x00;                       //set read data from port

  LCD_CONTROLPORT |= ( LCD_E | LCD_RS | LCD_RW); //select read data mode and execute
  LCD_wait_execution();
  data=LCD_DATA_IN;
  LCD_CONTROLPORT &= ~( LCD_E | LCD_RS | LCD_RW); //select read data mode and execute
  LCD_wait_execution();

  LCD_DPDIRECTION |= 0xff;                    
  LCD_setCursorXY(LCD_currentX,LCD_currentY);   //move back to where was red

  return data;
}

uint8_t LCD_readByte(){
  _LCD_readByte();       //dummy read needed
  return _LCD_readByte();
}

//------------------------------------------------------------------------------
//Functions to inquiry the status of S6B0724
uint8_t LCD_readStatus(void)
{
  uint8_t status;
  LCD_selectChip();
  LCD_DPDIRECTION  =  0x00;     //read data from port
  LCD_CONTROLPORT &= ~LCD_RS; //=0
  LCD_CONTROLPORT |= (LCD_RW | LCD_E); //=1
  LCD_wait_execution();
  status=LCD_DATA_IN;
  LCD_DPDIRECTION |= 0xff;                    
  LCD_CONTROLPORT &= ~(LCD_E | LCD_RW);  

  return status;
}

//------------------------------------------------------------------------------
//Initialize LCD 
//
void LCD_init(void)
{ 
  LCD_CPDIRECTION |=0xff;      // controlport pins for output (needed for reset)
  LCD_DPDIRECTION |=0xff;      // dataport pins for output    

  LCD_CONTROLPORT &= ~LCD_RST; //0 -reset the chip
  _delay_ms(20);               //  -wait for reset
  LCD_CONTROLPORT |= LCD_RST;  //1 
  
  while(LCD_isReseting()) LCD_wait_execution();  //This might be omitted 
  //  _delay_ms(50);           //  -wait for reset 

  LCD_on();
  LCD_clr();                   //clear LCD memory
  LCD_setCursorXY(0,0);        //set cursor to "home"

}


//------------------------------------------------------------------------------
//clear LCD DDRAM 
void LCD_clr(void)
{
    LCD_allPagesOn(0x00);
}
//-----------------------------------------------------------------------
//fill all pages with selected byte
void LCD_allPagesOn(uint8_t byte)
{
  uint8_t i,j;
  for (i=0;i=LCD_LINE_LENGTH){
      if (LCD_currentY

I haven't tried it yet on the GLCD. Before I do that, is there anything that stands out or is missing from the above code that will cause problems?

Appreciate your help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm quite familiar with Sami's code, but it, just like several of the other ks0108 libraries including Thiele's library, IMHO, only works "by accident", if at all.
There are many control line and timing violations, and depending on the glcd module and the speed of the AVR, the code may or may not function.

The code also depends on being able to have all the 8 data bits in a single AVR port, and all the control lines in a single AVR port which is not always possible especially on a m328 if you have a crystal and use the serial port.

It has been almost a year since I played with Sami's code but I went and took a look to see if I could remember some of the initialization issues because as I recalled, it did not function at all out of the box for me on a 16mz m328 with a AGM1264.

A few things came to mind:

- You need to add a LCD_wait_busy(); call at the top
of LCD_sendCommand() because it does not wait for a previous command to finish before it jams in a new command. This can cause all sorts of problems.

- You need to remove the LCD_selectChip(); call in the LCD_readStatus() function.
It clobbers a chip select that has been done previously now that LCD_Wait_busy() is called for each command.
In particular it would hurt the ones in the LCD_on() and LCD_off() functions. Without removing it, the chip selected is based on the last X address rather than what LCD_on()/LCD_off() want.

- insert a few ms delay after unreseting the module
in LCD_init().
The AGM1264 module is slow at posting RESET status, and if
you look too quickly after unreseting it, it will look
like it is done reseting, but in fact it hasn't even
posted its reset status yet.

I also seem to recall that the RESET status bit on the AGM1264 is per chip and not per module like many other modules. So in order to really be sure that the reset phase of the module's initialization is done, you have to check RESET on both chips.
As a kludge rather than polling both chips for reset to
go away, you might try inserting an extra 50ms delay after the reset check loop in GLCD_init().
50ms should be more than enough time to ensure the
module has finished its reset.

In fact if you don't want to mess with reset polling
you could simply reset the module than wait 50ms and
things should be fine.

Also, keep in mind that Sami's code will stomp on the full control port direction bits,
(DDRC in your case) and not just
the bits/pins it needs.

---

I'm not sure I've pointed out all the issues, but
at least this may help. If it still isn't working,
you may have to put in some
LED blinking to see if the code ever gets out of
certain routines. Top of the list would be
the reset code.

There are other bugs in Sami's library but as I recall they are more related to rendering issues and didn't prevent initialization and pixels from turning on.

But like I said, IMHO none of these glcd libraries really work reliably and I think there was quite a bit of luck involved for anybody that is able to use them "as is".
From my experience, they all needed code fixes/updates, well beyond just header file "tuning/configuration" to make it work reliably.

--- bill

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok I have the following connections for the GLCD:

MCU   GLCD
PORTB = CONTROL PINS

14(PB0)    4(DI)
15(PB1)    5(RW)
16(PB2)    6(E)
17(PB3)    15(CS1)
18(PB4)    16(CS2)
19(PB5)    17(Reset)

PORTD = DATA PINS

2(PD0)       7(DATA0)
3(PD1)       8(DATA1)
4(PD2)       9(DATA2)
5(PD3)       10(DATA3)
6(PD4)       11((DATA4)
11(PD5)      12(DATA5)
12(PD6)      13(DATA6)
13(PD7)      14(DATA7)

I have also modified the code according to your suggestions.

For some reason, on power on, my 7805 regulator just starts heating up really bad. I checked the voltage and it was 5V and stayed steady at 5V.

This happens only when I connect the data lines of the GLCD.

I have already confirmed with a blinky program and the AVR is ok (to check if the 8MHz crystal is being used, etc.)

I will try hooking up one data pin at a time to isolate which pin it is.

I also have a blinky code in main as follows:

int main(void)
{
  LCD_init();
  DDRC = 0xFF;
  while(1) { 
   
//Code added for blinky LED to check if AVR is working
   _delay_ms(500);
          PORTC ^= (1 << PORTC5);
   _delay_ms(500);
       LCD_clr();
        LCD_setCursorXY(15,0);
       LCD_puts ((uint8_t*)"Hello AVR world!\0");
        LCD_putsp((uint8_t*)"This LCD uses KS0107\0",3,3);
         LCD_putsp((uint8_t*)"Too long paged text is wrapped automatically\0",5,3);
         wait_100x_ms(30);
       }
   return 0;
} 

However, the LED does not blink. Maybe the AVR is waiting indefinitely for the GLCD to be reset?

I wish there was a simple test you could do to check if the GLCD is ok like measuring the resistance between two specific pins of the GLCD. (if say R between DI and E pin is say 100K, then the GLCD is ok).

If it takes months to just check if the GLCD is working, if the supplier do sends a bad GLCD, the 30 day return time will have expired long before you know you got a lemon GLCD.

Maybe I should have rigged my setup and THEN ordered the GLCD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The backlight draws ALOT of current. like 300-500ma depending on the resistor you use.
So that could be what causes your regulator to heat up if you have it hooked up.
Also, if your control lines are not hooked up and code operating properly you can have a data bus collision (both AVR and glcd trying to drive the data pins) which is not good.

For this kind of debugging, you will not be able to put debug code on top of the library code as the library code itself will likely be the place where things get stuck.
The init code resets the glcd, then spins for reset status to go away, then it sends a few commands which are going to wait for busy status to go way. If things are not hooked up properly or working properly, then the code will hang.

It is also possible that previously hooking up the display incorrectly fried it.

BTW, to get something up and operating quickly,
you may want to consider using the arduino tools and glcd library. Many arduino and teensy users are able to use the
glcd library and get something up and running very quickly.
Once the Arduino tools are in place, it only takes a few minutes to wire up the recommended connections. Then it is just a minute or so to build one of supplied demos and download it to the arduino hardware.

Some of the problems you are facing now, is that there are multiple unknowns.
- Is the display still working after being hooked up incorrectly?
- Is Sami's code operating correctly?

To help rule out the code issue,
I've attached a demo program that has been built using the arduino glcd library with the pins you specified above.
See if this works for you.
It does require the CPU be running at 16 Mz.
I guess you could run it slower and it will probably still work but the reported timing numbers in the demo will definitely be off.

If you had an arduino board, you could run the GLCD diags demo program that comes with the glcd library and it does lots of tests and spits out messages to the serial port.
while testing the GLCD module, which can be monitored by the Arduino IDE.

--- bill

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Bill.

I tried the demo code that you gave me with the 16MHz crystal and I get the same heating of the 7805 regulator and nothing on the GLCD.

I am going to try one final thing: boost the current output of my regulator.

Looks like it's time to buy a new GLCD. I know crystalfontz has tons of GLCD, but can you suggest a commonly used (KS0107) (maybe smaller dimensionally) GLCD that would be easier to use than this one?

I will also look into getting an arduino board, but for now I would like to go through the (painful) effort of hooking up a standalone GLCD with the AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Has anyone mentioned turning off jtag to free up middle pins in port c? If there major or minor diff between ks0107 and ks0108?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If there major or minor diff between ks0107 and ks0108?

Actually, KS0107 and KS0108 are used together, and the interface to the rg a microcontroller is totally through the KS0108(s). It/they in turn ontrol the KS0107.

See the attached PNG for a typical 128x64 GLCD setup. Everything but the MPU is on the GLCD module.

Attachment(s): 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Looks like it's time to buy a new GLCD. I know crystalfontz has tons of GLCD, but can you suggest a commonly used (KS0107) (maybe smaller dimensionally) GLCD that would be easier to use than this one?
I've used KS0108 based GLCD's (ie Crystalfontz).
After using this one I will NEVER return to KS0108.
http://www.lcd-module.com/produc...
It uses SPI, no busy checking and no switching btw left and right side of display. And works at 3V3.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Damn I still can't believe my GLCD is fried.I am going to buy a new GLCD.

In the meantime, I found another GLCD. This one is a Newhaven display.
NHD‐C12832A1Z‐NSW‐BBW‐3V3. This is a 128x32 3.3V GLCD which means I am going to need a 5V to 3.3V converter.

Datasheet is attached.

I will try and set it up. Looks like it has a serial interface.

Any gotchas on this one?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lennart wrote:
Quote:
Looks like it's time to buy a new GLCD. I know crystalfontz has tons of GLCD, but can you suggest a commonly used (KS0107) (maybe smaller dimensionally) GLCD that would be easier to use than this one?
I've used KS0108 based GLCD's (ie Crystalfontz).
After using this one I will NEVER return to KS0108.
http://www.lcd-module.com/produc...
It uses SPI, no busy checking and no switching btw left and right side of display. And works at 3V3.

That display is write only, so it depends on how you
write your code.
Write only displays typically require the use
of frame buffers.

--- bill

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

npat_avr wrote:
Thanks, Bill.

I tried the demo code that you gave me with the 16MHz crystal and I get the same heating of the 7805 regulator and nothing on the GLCD.

Do you have the backlight hooked up?
Is the backlight coming on?
The backlight draws all the current.
What is your supply voltage?
If it is 12v or higher you will get lots of heat.
The actual lcd chips don't draw very much.
You can see the pixels without the backlight,
so try it without the backlight hooked up
if you were using it.

The other really cheap alternative is to use AA batteries.
I run occasionally from 3 AA batteries for my
standalone AVR chips on breadboards.
I have a 3 AA cell battery holder with an on/off switch
and this works great and have used it on projects with the AGM1264.

Quote:

Looks like it's time to buy a new GLCD. I know crystalfontz has tons of GLCD, but can you suggest a commonly used (KS0107) (maybe smaller dimensionally) GLCD that would be easier to use than this one?

The lcd you have isn't really any more difficult than any other glcd module. The only type of display that is easier is an intelligent one with a backpack that you talk to with a TTL async serial interface and the backpack translates the serial commands to drive the pixels on the display for you.

ks0108 glcds are really cheap. Not sure where you are in the world (fill in your profile) but you can get them
here in the states for ~$10 USD.
http://www.bgmicro.com/LCD1030.aspx

These guys are down the road from me and is what I've done lots of testing with.

Quote:

I will also look into getting an arduino board, but for now I would like to go through the (painful) effort of hooking up a standalone GLCD with the AVR.

I'd look at a teensy board instead.
Costs about $20-24 USD.

They are much better value for breadboarding, especially the teensy++. More i/o pins, more ram, more flash, built in USB hardware support, etc...
http://www.pjrc.com/teensy/index.html
Also, it uses a bootloader so you don't need a programmer and you won't need a USB to serial adapter to talk to the bootloader as the teensy boards hook directly up to the USB.
Downloads are super fast.
It gets its power from the USB bus so you don't need a power supply either. I power my GLCDs directly from the teensy board which is powered by the USB.
Teensys can run with or without arduino.

--- bill

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks again Bill.

I did get a new AGM display module. This time I want to set it up right to check if it works.

My POA is going to be to check the backlight first, then try the .hex file that you sent followed by Sami's code.

I wanted to confirm this; based on your explanation and schematic, is it ok if I just connect the backlight pin 19 to GND and pin 20 through a 4-10 ohm resistor to supply to check only the backlight. Or do I need to hook up VSS, Vdd, Vo and VEE as well?

Thanks again for your patience.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

npat_avr:

Sorry I didn't see this thread sooner, I have been traveling.

Quote:
Could it be the contrast pin?
Yes.
Quote:
Do I need a negative power supply for the Vee pin?
Yes.
Quote:
Pin 18 (Vee) ---> GND
No.

Pin 18 (Vee) is the negative power supply that you need for the contrast pin. Connect the potentiometer between pin 18 and GND and connect the wiper to the contrast pin.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Don.

Ok I finally got Bill's GLCDDemo file to work. However it worked a couple of times and then stopped working. It is the 7805 regulator.

I have also replaced the 7805 with the LM340, but it did not improve the current. I know I could reduce the backlight current, but any ideas on how I can get more juice out of my 7805? Should I go for switched regulators?