This library implements a driver for HD44780 lcd connected through PCF8574 port expander.
Data is transmitted using only 2 wire over i2c with the PCF8574.
This library can drive up to 8 LCD concurrently.
Lcd driver is based upon Peter Fleury's lcd driver
HD44780 to i2c library its based upon this library: http://davidegironi.blogspot.it/2013/06/an-avr-atmega-library-for-hd44780-based.html
Each PCF8574 needs to have a different address selected, this can be done by the A0,A1 and A2 pins.
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 8MHz.
Code
Notes
- read risk disclaimer
- excuse my bad english
You can double that up to 16 by allowing for both pcf8574 and pcf8574A chips. They are identical except for their base address so you can have 8 of each on a single i2c bus. I did this same thing 10 years ago by modding Peter Fleury's LCD library with his i2c library.
ReplyDeleteHello, thank you for this tips!
DeleteInteresting, Thank You Davide
ReplyDeletei am complete new in avr i was programming in arduino.....can you please help me how to use this library.
ReplyDeleteHello, i suggest you to start at small step. The first one could be blinking a led with plain avrgcc. You will find many tutorial online.
DeleteI see you are using p0-p3 as your data pins. And p4-p6 as your conrol pins for the 1602 LCD.
ReplyDeleteInexpensive 1602 LCD and pcf8574T I2C boards on Ebay are using p4-p7 as data pins and p0-p2 as control pns for the LCD.
Do you have anything written for the 2nd configuration?
Hello, you just can remap the configuration file for your device.
Deletehello,
Deletei just tried to remap the data (p4-p7) pins in your h file, but i can't seem to get it to work...can you get more specific where the adjustments have to be made and how? any help would be greatly appreciated!
Nevermind, got it. Made an error when I did the multimeter routing. Works like a charm, thank you!
DeleteHello Tommi, that's great! Happy to hear this!
Deletecould this be reconfigured to work with atmega328p?
ReplyDeleteHello, yes it can.
Delete