PCF8574 I2C LCD


Author Message
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 06:20am 28 Mar 2012      

Hi

So in the current trend of I/O saving I decided to buy one of these PCF8574
8 bit I2C I/O boards from Ebay Ebay PCF8574





This simple code flash's a LED connected to any of the I/O pins
I2caddr = &h20 ' PCF8574 I2C address
I2CEN 100,100 ' Enable I2C

Test:
I2CSEND i2caddr, 0, 1, &B00000000
Pause 500

I2CSEND i2caddr, 0, 1, &B11111111
pause 500
GoTo Test


A real good use for this device is to drive a Character LCD
like this



Many thanks to http://letsmakerobots.com/node/4240
for the PixAxe code


Code attached
2012-03-28_161915_I2CLCD.zip Edited by jman 2012-03-29