HELP:Anyone used AVR with graphic LCD and avrgcc

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

Hi!

I have trouble getting my Seiko G1216 128x64 dot LCD to operate. I am proramming it with avrgcc, but i dont seem to get anything from it. Has anyone done any projects with similar LCSs, and are able to give some hints, documentation, samplecode, tutorial....I am desperate!

THANKFUL FOR ALL HELP

admin's test signature
 

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

Hi Jakob:

My last big project had a Mega103 driving a G1216. I use ICCAVR but that should make no difference. Are you turning on your both segments and setting start lines as in: (if this gets trashed in transit I will email it to you)

if(!bDisplayStatus) //if LCD has not been turned on
{
bSegment = CS1; //select left segment
WriteLCDControl(DISPLAY_ON); //turn on left segment
WriteLCDControl(STARTLINE0); //set left start line to 0
bSegment = CS2; //select right segment
WriteLCDControl(DISPLAY_ON); //turn on right segment
WriteLCDControl(STARTLINE0); //set right start line to 0
bDisplayStatus = ON; //and set flag accordingly
}

where these are the #defines:

#define E 0x08 //E stobe line to LCD
#define DI 0x10 //DI! data/instruction line
#define RW 0x20 //RW! read/write line
#define CS2 0x40 //Chip Select 2 (controls right half of LCD)
#define CS1 0x80 //Chip Select 1 (controls left half of LCD)

#define DISPLAY_ON 0x3F //instruction byte
#define DISPLAY_OFF 0x3E //""
#define STARTLINE0 0xC0 //Set display start line to 0
#define XSET0 0xB8 //Set X page 0
#define YSET0 0x40 //Set Y address 0

check that, and if that doesn't help we can check the WriteLCDControl(xxxx), and if necessary WriteLCDData(xxxx).

Regards,
Clark

admin's test signature
 

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

Thanks, it really helped. Aside from me not setting the RESET to high...I also missed init on both CS1 and CS2...

admin's test signature