First post here =] - I picked up a 20x4 LCD from sparkfun (http://www.sparkfun.com/commerce/produc … cts_id=256). The page states that the LCD is HD44780 compatible however I’m not having any luck getting this thing working. I’m using an ATMega16 with avr-gcc and I seem to be able to get the screen to initialize with a cursor but nothing beyond that.
I ran some searches prior to asking but didn’t come up with any results. Does anyone have any experience with this LCD that would be willing to share their code?
First post here =] - I picked up a 20x4 LCD from sparkfun (http://www.sparkfun.com/commerce/produc … cts_id=256). The page states that the LCD is HD44780 compatible however I’m not having any luck getting this thing working. I’m using an ATMega16 with avr-gcc and I seem to be able to get the screen to initialize with a cursor but nothing beyond that.
I ran some searches prior to asking but didn’t come up with any results. Does anyone have any experience with this LCD that would be willing to share their code?
Thanks!
Ben
I have the same module, and it seems to be easy to program. The easiest thing is to use Procyon AVR Lib, which includes support for the HD44780:
Note that using this “library” is tricky. It’s not actually a library, but a collection of source code. The latest build of AVR Studio has a bug that it cannot compile c files that are not in the project’s directory, so to use parts of the AVR lib it’s easiest to copy the files you think you need one by one and add them to your project (until you stop getting error messages). The download also includes a sample program for the HD44780.
AVR lib also includes “drivers” for various other modules that are available from Sparkfun. It’s worth a look.
Something else that may save someone some time—I at first connected the “V0” contrast pin straight to VCC, which makes the contrast 0. Then I connected it to ground, which makes all the characters solid black. In other words; there’s no way around using a proper voltage divider to see stuff on the display.
Currently, I’m using it with the same display and an AVR644. Unfortunately, I get garbled output. All the other stuff I have is 3.3V, so I decided to use the TXB0104 level translators to boost to the 5V this thing needs. Unfortunately, I am getting some noise in the signals which cause the output of the TXB0104 to turn on and off when it’s not supposed to so I get garbage on the display. I’m hoping it’s because of the prototyping jumper wires (versus PCB) that I’m using, but I’ve been unable to get around the problem even in trying to use filtering capacitors.
pelesl:
Currently, I’m using it with the same display and an AVR644. Unfortunately, I get garbled output. All the other stuff I have is 3.3V, so I decided to use the TXB0104 level translators to boost to the 5V this thing needs. Unfortunately, I am getting some noise in the signals which cause the output of the TXB0104 to turn on and off when it’s not supposed to so I get garbage on the display. I’m hoping it’s because of the prototyping jumper wires (versus PCB) that I’m using, but I’ve been unable to get around the problem even in trying to use filtering capacitors.
and tried running the display with no level translators. At first I thought I needed them because of the output logic levels (from the display module) for checking the busy flag. Anyway, it seems to work just fine driving it from the processor running at 3.3V.
I’m also using a TXB0104 to do 3.3 to 5V conversion, and I’ve found the same problem— this chip seems incredibly sensitive to power supply noise.
Anyone figure out a way to make this chip actually work? I’ve tried all kinds of bypass caps, including .1uF, .01uF and 33pF caps in parallel at the chip itself— no joy.
I wasn’t talking to you our ignorant friend. And you probably are missing something, it probably is a software issue and the code does tell you all the pins you need to hook up and it doesn’t mention capacitors so that should have been some hardware help.
Freak Nigh:
I wasn’t talking to you our ignorant friend. And you probably are missing something, it probably is a software issue and the code does tell you all the pins you need to hook up and it doesn’t mention capacitors so that should have been some hardware help.
bgat, if you’re still reading this, I’d like to help but I haven’t used the specific chip you’re asking about. Can you tell us more about the conversion you are doing? Is this for a I2C or TWI bus? Or is it for some other situation?
Without more details, I can’t offer any suggestions.