Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

LCD drives man insane, film at eleven

LCD drives man insane, film at eleven

2004-05-07 by John Johnson

I've been working on an LCD project for two (3?) days now, and still 
have nothing to show for it. I'm trying to use 4 bit mode. I was 
originally driving a PCF8754AN using I2C, which was in turn connected 
to the LCD. I gave up on that this morning and switched over to driving 
it directly from PORTB. Still no joy. Used someone else's library, 
nothing. I've looked at the signals using DigiTrace, and they're doing 
exactly what they're supposed to. Tried another LCD, still nothing. The 
LCD stays blank, although at times I see garbage characters, and once a 
flashing cursor. I've tried code written in WinAVR, and even tried 
BASCOM, which is my emergency backup language just to see the hardware 
is sound. Nothing.

My initialization sequence is right out of the 44780 data sheet.

wait
3		// 8 bit mode
wait
3		// 8 bit mode
wait
3		// 8 bit mode
wait
2		// 4 bit mode
28		// 4 bit mode, 2 line display
08		// display off
01		// clear display
06		// Entry mode, increment, no shift
0C		// Display on, cursor off, blink off
02		// return home (added out of desperation)
80		// Set DDRAM address to 0 (again, out of desperation)
48 'H'	// Sent with RS high, should display an H

I've also added lots of delays so everything is nice and slow, also 
didn't help.

I uploaded the waveforms in the Photos section, under the Waveforms 
folder.
I can also upload the DigiTrace file is you need it.

Thanks for any advice that might save my sanity!

Regards,
   JJ

Re: [AVR-Chat] LCD drives man insane, film at eleven

2004-05-07 by David VanHorn

At 08:38 PM 5/6/2004 -0400, John Johnson wrote:

>I've been working on an LCD project for two (3?) days now, and still 
>have nothing to show for it. I'm trying to use 4 bit mode. I was 
>originally driving a PCF8754AN using I2C, which was in turn connected 
>to the LCD. I gave up on that this morning and switched over to driving 
>it directly from PORTB. Still no joy. Used someone else's library, 
>nothing. I've looked at the signals using DigiTrace, and they're doing 
>exactly what they're supposed to. Tried another LCD, still nothing. The 
>LCD stays blank, although at times I see garbage characters, and once a 
>flashing cursor. I've tried code written in WinAVR, and even tried 
>BASCOM, which is my emergency backup language just to see the hardware 
>is sound. Nothing.

Did you try this LCD on another working system?

When in doubt, stretch the delays to double.

RE: [AVR-Chat] LCD drives man insane, film at eleven

2004-05-07 by Alex Shepherd

> I've tried code written in WinAVR, and even tried 
> BASCOM, which is my emergency backup language just to see the 
> hardware is sound. Nothing.

I've always used BASCOM to build little hardware test routines to check
new hardware and it is usually the easiest way to go although I normally
use WinAVR AVR-GCC.

If you cannot get the module going with BASCOM I would suspect your
hardware or LCD is not right.

Maybe you have got some/all the lines swapped over on the ribbon cable
if you're using the 7x2 ribbon cable connector. One of my projects I had
to swap the data bit lines over as they came out of the cable in the
wrong order... YMMV

Good luck

Alex

Re: LCD drives man insane, film at eleven

2004-05-07 by Phil

Your problem sounds a lot like one I had once.  Do you have E and RS 
on the same port as D4-7?  If so, you might want to make sure you're 
not glitching the data lines when you output the control signals.  I 
wound up using a shadow for the port so that the data lines wouldn't 
change. 

Phil

--- In AVR-Chat@yahoogroups.com, John Johnson <johnatl@m...> wrote:
> I've been working on an LCD project for two (3?) days now, and 
still 
> have nothing to show for it. I'm trying to use 4 bit mode. I was 
> originally driving a PCF8754AN using I2C, which was in turn 
connected 
> to the LCD. I gave up on that this morning and switched over to 
driving 
> it directly from PORTB. Still no joy. Used someone else's library, 
> nothing. I've looked at the signals using DigiTrace, and they're 
doing 
> exactly what they're supposed to. Tried another LCD, still nothing. 
The 
> LCD stays blank, although at times I see garbage characters, and 
once a 
> flashing cursor. I've tried code written in WinAVR, and even tried 
> BASCOM, which is my emergency backup language just to see the 
hardware 
Show quoted textHide quoted text
> is sound. Nothing.
> 
> My initialization sequence is right out of the 44780 data sheet.
> 
> wait
> 3		// 8 bit mode
> wait
> 3		// 8 bit mode
> wait
> 3		// 8 bit mode
> wait
> 2		// 4 bit mode
> 28		// 4 bit mode, 2 line display
> 08		// display off
> 01		// clear display
> 06		// Entry mode, increment, no shift
> 0C		// Display on, cursor off, blink off
> 02		// return home (added out of desperation)
> 80		// Set DDRAM address to 0 (again, out of desperation)
> 48 'H'	// Sent with RS high, should display an H
> 
> I've also added lots of delays so everything is nice and slow, also 
> didn't help.
> 
> I uploaded the waveforms in the Photos section, under the Waveforms 
> folder.
> I can also upload the DigiTrace file is you need it.
> 
> Thanks for any advice that might save my sanity!
> 
> Regards,
>    JJ

First Avr atmega32 circuit!

2004-05-07 by Capricon

Hi Avr lovers,
I have a Stk500. I am using ATMega32. I want to create the simplest circuit that would just flick leds on port b.
I want to hook up this circuit without Stk500.
I don't want to use an external crystal. I want to use the internal oscillator (if I can).
I want to use AVR assembly not c.
Does anyone have the simplest circuit or link?
Capricon

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.