i2C LCD Controller PCF8574 Address

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

i2C LCD Controller PCF8574 Address

Post by Jay Dee »

Hi Guys,
The i2C to LCD controllers available via eBay, they are great for controlling LCD displays via just 2 wires + power but little usefull info is given.
A few tips that I've found when playing with them.

Address
The boards main i2C chip, PCF8574 actually comes in two flavours, PCF8574T and PCF8574AT and they have different fixed addresses.
On my board it has three links to set the hardware address. Un-connected, these pins are pulled high (check, some other boards pull them low!)
You can of course set any address via the links but most people either have all links open or closed for simplicity.

The address is 7 bits long, the lowest bit defines if its a read of write request, Flow code handles this so you only need to enter the required address in Decimal.

PCF8574A (Address pins Pulled High) 0111 111 R/W = 0x3F = 63 dec
PCF8574A (Address pins Pulled Low) 0111 000 R/W = 0x3F = 56 dec

PCF8574 (Address pins Pulled High) 0100 111 R/W = 0x27 = 39 dec
PCF8574 (Address pins Pulled Low) 0100 000 R/W = 0x20 = 32 dec

Flowcode
Ensure you add an I2C master component and initialise it first.
Then Add the i2C LCD component and start that.
Then its the same as all the other LCD devices..

Hardware.
Use 4K to 10K pull ups on SCL and SDA lines
If the lines are long and noisy place a low value resistor in-line near the receiving device (LCD) this helps damp spikes and ringing.
Once I found the damn alternate addresses everything work just great! J.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: i2C LCD Controller PCF8574 Address

Post by medelec35 »

Hi John,
Thanks for this useful information.
I have moved topic to Tips and Tricks section where it should be easier to find.

Martin
Martin

siliconchip
Posts: 392
Joined: Wed Jan 05, 2011 11:24 am
Has thanked: 101 times
Been thanked: 24 times
Contact:

Re: i2C LCD Controller PCF8574 Address

Post by siliconchip »

jay dee
thanks for the information on the I2C lcd controller absolutely brilliant thanks for posting

bob

Post Reply