LCD garbage / noise in power line?

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

Hi all again!

Now i'm having a strange issue with a character LCD display. Everything works fine most of the time, but sometimes, when both the AVR and LCD are idle, the LCD shows garbage in the display. The AVR is connected to the LCD, and it's a few cm's from it.
The AVR keeps working, but the LCD remains showing garbarge (which changes when the AVR writes to it, but it's still garbage).

I can only imagine PowerLine noise, even thou there is a LM7805 just for the LCD, with filter caps and all that stuff. Maybe LCD is more sensitive to noise? Maybe RF noise?

I'm thinking of "plugging" a pull-up to the R/W line, as near as the LCD's controller as possible, to prevent unwanted writes.. but don't know.

any ideas?

Thanks a lot!

Carlos

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

Hi,
we have no code, (AVR type, port initialisation, timing, "write" code, "IDLE"-code)
we have no schematics.... (4 bit mode, 8 bit mode, external memory bus, other periferals...)

the only "good" information is the "LM7805" - but i think it is not the problem.

so how can we help you?

Quote:

"plugging" a pull-up to the R/W line,

toggeling the "R/W" line does NOT affect the display as long as the "E" line is stable.

Klaus
********************************
Look at: www.megausb.de (German)
********************************

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

Do you have backlit LCD? If so, try to switch off light power completelly and do a deep test again to see if your problem dissapeared.

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

MegaUSBFreak is right.. I forgot to post some details..
I'm using 4-bit mode. There are other peripherals connected to the AVR (mainly a 24LC256 EEPROM).
It's an ATMEGA32, and in regards to init and write code, I'm more than sure those are alright.
Idle code is just a for(;;) loop and some ints (timers) running.

It happened to me once here at home, and I once found that plugging another device near this one could thrash the LCD, but the AVR would continue running. Since that I added some more filtering, but it seems to be that it's never enough!!

Maybe the backlight could be the problem.. I should try powering it independently, and also insert a pullup or pulldown (don't remember polarity) in the E line.

So far, thanks a lot to MegaUSBFreak and avra!!

Thanks!

Carlos

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

Hi,

do you have a scope to watch the activity at the "E" line?
If you don´t have: check VCC and the value on "E".
AFAIK "E" is high active, so it should be low when not acessed.

Maybe there are timing problems. have you seen that you need to set DATA, "/RW" and "RS" BEFORE you activate "E" - maybe additional NOPs are required.

How is your wiring.
Code and schematic needed for furher help.

Klaus
********************************
Look at: www.megausb.de (German)
********************************

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

As I said before, I'm more than sure that the code isn't the problem, since I've been using these routines for a long times. Yes, I use a Delay routine inside the LCD funcs, since I'm using an atmega32@16MHz.

About the schematics, the LCD goes directly to the AVR's ports.

I will check (physically) for E to be inactive when LCD is not accessed. I haven't done that yet, but the code is supposed to do it!

thanks a lot again,

Carlos

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

this sort of problems is usually caused by glitches in the E line. a small cap (~47pF) to ground at the display end of cable might help, as well as a series resistor ~100R. however, I'd expect setup and hold times to be too short when using only a few cm of cable.

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

That sounds like a possible solution for this. Thanks!

When you say 100R for the resistor, you mean 100 ohm?

I will try it, it should fix it!

Thanks!

Carlos