Author Topic: I2C LCD connected to a PIC16F micro  (Read 1064 times)

0 Members and 1 Guest are viewing this topic.

Offline Alexandros81Topic starter

  • Contributor
  • Posts: 45
  • Country: gr
I2C LCD connected to a PIC16F micro
« on: October 10, 2018, 05:17:31 pm »
Hi!
I have recently purchased an LCD Display from here:
https://www.ebay.co.uk/itm/LCD-Display-Module-LCM-blue-blacklight-Character-1602-16x2-HD44780-3-3V-5V-UK/152214576387?ssPageName=STRK%3AMEBIDX%3AIT&var=451404694759&_trksid=p2057872.m2749.l2649

I also got the interface board that lets you use the display via I2C.
Do you know if thereis  a user guide for the interface board?
What is the I2C Interface protocol for the interface board?

I am connecting the LCD with a PIC16F15345.

Thanks
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5022
  • Country: ro
  • .
Re: I2C LCD connected to a PIC16F micro
« Reply #1 on: October 10, 2018, 05:44:06 pm »
As the ebay sale says, that's a HD44780 based lcd, so you use those commands.

You can see the name on the chip, PCF8574.... here's datasheet: http://www.ti.com/lit/ds/symlink/pcf8574.pdf
That's a basic  I2C port expander, it creates 8 i/o pins which are most likely connected to your  LCD's RS , RW, EN and probably 4 i/o pins.

So you send the i2c commands to the chip to set some i/o pins as input, some i/o pins as output , then set the pins to some values...  the same commands you'd send if you connected the lcd display directly to a bunch of i/o pins on your micro, you will send them through i2c formatted as the chip wants.

If you don't have documentation, you can use a multimeter to figure out which i/o pins from the io expander IC go to which pins of your lcd display.
you also have on the board pads labeled A0 , A1 and A2 .... those allow you to configure unique i2c address for your board, probably some default address is set if those 3 pins are floating (and if you put a blob of solder on one of those pairs of pads you basically set one bit of the 8 bit i2c ID to 1 or something like that)

 

Offline Alexandros81Topic starter

  • Contributor
  • Posts: 45
  • Country: gr
Re: I2C LCD connected to a PIC16F micro
« Reply #2 on: October 10, 2018, 06:09:36 pm »
@mariush
Thanks. Just a few minutes ago I discovered it was the chip PCF8574T by looking at the picture.
I'll give it a go then!
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: I2C LCD connected to a PIC16F micro
« Reply #3 on: October 12, 2018, 02:39:44 am »
For about $5 USD, you should be able to find an LCD display that speaks I2C directly.  The actual protocol seems to be "shared" so finding a driver might not be that hard.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf