LCD interface with STK500 warning

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

Just letting everyone know of a problem that I had interfacing an LCD with an STK500 board.

I initially tried taling to the LCD via the 4-bit mode. This attempt failed. Thinking that it may have been my cabling i made a new connector using the 8 bit mode. I managed to get this working relatively successfully, however it occassionaly didnt initialise properly and had to get reset a couple times to get it working.

With this success, I then dropped back to the 4-bit mode because I knew there was no point in wasting IO's. I carefully made a new 4-bit cable. I tried using CodeVisions built in LCD library but it still didnt work, so I wrote my own routines being very generous with the delays in between the comands. I managed to initialise it but it was still unstable. At this point I was getting rather frustrated ( as you do ) but determined to get to the bottom of it, because I knew the CodeVision libraries worked.

After much checking and rechecking, I found that the data going to the LCD was switching from 0.8V to 5.8V relative the the LCD's ground. I was using a backlit LCD so i powered it seperately not wanting to overload my new STK500 board.
Upon seeing this 0.8V difference I tried powering the LCD directly from the STK500's power supply. I worked first time. Even though the specs of the LCD say that this offset voltage swing should work, it didnt. Another leson for me not to take spec sheets for gospel.

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

I have used 2 seperate power supplies for the same thing using an STK500, may I ask ? Did you connect the 2 power supply commons together ? I'm curious as to which part was running @ 5.8 volt. Were not both supplies 5 volt ?.

Dennis

admin's test signature
 

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

I have interfaced lcd's to stk500 using codevision avr library without any problems whatever. even using 8515, 8535 and atmega163 at 11.0592 mHz

Your symtoms are is most likley due to the FACT that the power input to stk500 is via a BRIDGE RECTIFIER, if you power another circuit from same 9V DC supply that feeds stk500 you will have fun.

The symptoms also come to play when using stk500 and ice20 on stk500. If both are powered from same 9v dc adaptor, power up ice20 and power to stk500 comes on even though the stk500 power switch is off, if you do not turn stk500 power switch on, you are drawing power through ic20 supply and it's bridge, regulator get hotter than normal.

It was a a nice for Atmel to have a bridge rectifier on the boards, as it protects agains reverse polarity power supply connection, but it does cause some apparently strange behaviour if YOU ARE NOT AWARE of them.

admin's test signature
 

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

You have to use a crystal in the socket to get 11mhz or is there a firmware upgrade I dont know about?

admin's test signature
 

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

To run STK500 at 11.0592 mHz insert crystal at "CRYSTAL" jumper "XTAL1" ON, jumper "OSCSEL" ON between pins 2 and 3.

admin's test signature
 

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

My problem was not with powering the STK500, rather the powering of both from the same supply. Seeing as the STK has built in rectifier, regulator etc, it created an offset between the two grounds ( the STK ground, and the power supply ground). This may not be an issue if the power supply you are using to power the LCD is independant with a floating ground as the offsets will fix themselves.

Anyway, it was just a friendly word of warning cause it caused my many hours of anguish trying to work out why my code was not working.

Chad