PDA

View Full Version : AVR and LCD



thevikas
01-31-2006, 01:38 PM
Hi All,

I have tried lcd "hello world" for past 3 weeks with no success. Im using winavr to compile and run on the circuit. circuit has 2 line lcd with atmega8535. the data lines on portD, RW/E/RS on first 3 bits of portC. I never know what is the problem. The init has no output so show it suceeded. the contrast pin changes also never show anything when i change the resistance on VR. Is there anyway i can get out of this misery.

Im not a pro. learning avr programming and electronics from scratch.
Im a too good software developer from gurgaon. I need assistance in this matter badly.

Any kind of help will appreciated.

regards,
vikas

vikas
01-31-2006, 03:45 PM
http://www.roboticsindia.com/modules.php?name=News&file=article&sid=75

thevikas
01-31-2006, 03:55 PM
thanks. i checked many resources including this one.

is there a way to know that my circuit is basically working. like if the VR could show somehting changing?

thevikas
02-01-2006, 09:20 AM
the lcd im using is "ccm1620 csl ls", if that helps.

ice
02-02-2006, 02:00 PM
is there a way to know that my circuit is basically working. like if the VR could show somehting changing?

Is your basic avr circuit working..like for example is it able to blink an LED?

I just checked the datasheet of your LCD.
Looks like its controlled by the Hitachi HD44780 controller or a compatible one..

Post your lcd code here..Ill try to help out.

ashu
02-03-2006, 05:46 PM
hey ,
Is ur Program ok ? make sure ur are pulsing the Initial state 3 times
with Proper delays of 40ms each and then of 100us and then of 15ms
and make sure u r adjusting the Contrast pin so that the Black
Matrices disappear !

Rupin
02-04-2006, 12:50 AM
do one thing try to incorporate simple delays all lcd trouble starts when delays are not long enough.also see to it that the lcd does get on
and set contrast to 0 V.

thevikas
02-04-2006, 12:42 PM
chat transcript with admin....

i was always noticing that LCD used to black out when i used to put GND on VR(3rd pin), so I put soldered GND to 3rd lcd pin and and used the backlight ON and started the chip...

only when i was running the backlight at aroung 6~9 volds from adapter, the blackout used to fade out to my "hello" and displayed on my LCD but only when i ran the backlight!!!!
but its very very unstable. i lost it again.

is my arranged a permement one? i.e, putting GND on VR pin and running backlight at all times to see my program work? i don't feel its normal...
contrast thing never worked the way i read it. the VR resistor never shows any change in the LCD, its white allways. but when i put a GND directly to my pin, at least i see blacked out boxes in the LCD. and the boxes are permement at all times. only when i loose power with backlight on, the boxes fade out since baclight consumes huge power for the curcuit and shows the leter on the LCD.
LCD never even shows up with just the VR
VR pins :
1->VCC
2-> 3rd pin of LCD
3->GND
the VR max resistance is about 8K in my meter
that arrangement never shows any boxes in my LCD.
therefore i had to put GND on the center pin and at least saw boxes (u know, something is beter than nothing. )
what options i have without using VR?

LCD is 16 pins with with baclight.
AVR is on 8mhz directly from adapter power of aroung 6~9volts

thevikas
02-04-2006, 12:58 PM
Is your basic avr circuit working..like for example is it able to blink an LED?

i had done lots with just single LEDs and even 7-segment as output on AVR. that worked great! next i wanted to take input from ADC, which failed; input from PC-rs232, failed again and output to LCD, failed. im in hell! :cry: