Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Cm12864 lcd

Status
Not open for further replies.

jameske

New Member
Cm12864 lcd >> (SOLVED)

My latest project has been to try and interface an LCD to an avr! I got one from Futurlec and it is a CM12864-2 driven by two KS0108 drivers! However, I have had no success with getting it to work with an atmega164PA. (To define 'not getting it to work', the backlight and the contrast all work 100% but my code of something isn't working properly as nothing is displayed on screen - even if I adjust the contrast).

I followed the tutorial **broken link removed** which is specifically for this LCD and I made it fit the atmega164PA instead of the atmega16.

It should work and I have no idea why it doesn't! So does anyone here have maybe an idea or something I can try? Oh, what should my fuse settings be?

Thanks in advanced,
James
 
Last edited:
I currently have it running at 4MHz on the internal oscillator with 6CK + 0ms startup time.

In my code I have placed different LEDs on PORTC to turn on at different stages in the code to try and diagnose the problem. Now the code rolls through and stops at the 'DisplayString' commands as PORTC doesn't change from 0xFB to 0xF7

Code:
	Init_LCD();
	PORTC = 0xFD;
	Clear_Screen();
	PORTC = 0xFB;

	DisplayString(0, 16, "Graphics Display");
	DisplayString(1, 34, "Controller");
	DisplayString(2, 58, "on");
	DisplayString(3, 16, "AVR Project Book");
	DisplayString(5, 58, "by");
	DisplayString(6, 13, "DigiSoft Pakistan");
	DisplayString(7, 7, "www.digisoft.com.pk");
	PORTA = 0xF7;
while(1);

Any ideas? Is my uC not appropriate for this task?

When reading the datasheet I found this "1/64 duty", what is this for?
 
Last edited:
Ok so since the backlight and the contrast setting are both working I asume the LCD is working -but I'm not sure! Is there an easy way to test the lcd, just to eliminate it from the pile of problems?
 
CM12864 lcd >> SOLVED

After a long week of writing code, changing around hardware, trial and error and not alot of support I have managed to get my LCD working with and avr atmega164PA.

I am very happy now!:)

James
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top