Fundino LCM1602

Hi All. I have just joined this group & I am sure there is someone out there who can help me with a little problem.... I have just bought a 16*2 LCD module with a I2C 'backpack' modification. The backpack board is marked Fundino LCM1602. I have found several sources of info about this board here and elsewhere on the net, but not the details I need. I intend to use this display with PICs which I program in assembly code. I have a lot of experience with parallel forms of the LCD display, and also with I2C interfaces. But I need these details to succeed with this serial device...

  1. the slave address of the I2C device. I think this might be 20hex, but it might vary according to jumper settings. On my board 3 links are all open.

  2. Clocking characteristics - minimum clock-hi time, and minimum clock period (overall)

  3. the data format. i.e. how does the serial data which I send to the device relate to the logic states of the pins of the display module ? I need to control 8 (or maybe only 4) data pins, E, R/W, & RS. I believe that the backlight can also be contrrolled from the serial interface. I can imagine that 11 bits might be sent to control D0-7, E, R/W, & RS, but this is just a guess, and in any event I would need to know the order in which the bits should be sent.

Any help with this would be much appreciated ... Andy G4OEP

  1. the slave address of the I2C device. I think this might be 20hex, but it might vary according to jumper settings. On my board 3 links are all open.

Judging from what Terry says here [SOLVED] "LCM1602 IIC A0 A1 A2" (+OTHERS) I2C Controller working with 20x4 LCD - Displays - Arduino Forum I suspect that the address may be 0x27.

You will also have to determine the actual connections between your PCF8574T pins and your backpack pins (see below).

  1. Clocking characteristics - minimum clock-hi time, and minimum clock period (overall)

The AVR datasheets have a pretty good explanation about how their TWI interface functions (which is essentially I2C) so if your PIC datasheet doesn't have the information you could look there.

  1. the data format. i.e. how does the serial data which I send to the device relate to the logic states of the pins of the display module ?

This is determined by what the LCD requires and by the relationship between your PCF8574T pins and your backpack pins. If you want to use your Funduino module, which has an 8-bit chip you will have to use the 4-bit LCD interface. This will leave the other four bits for the LCD control pins and the backlight. You will have to deal with the LCD R/W line, even though you are not reading from the LCD, since the backpack implements this line instead of grounding it.

73 Don

Hi Don... Thank you for your reply. I was hoping that someone who has actually programmed this device might be able to give authoritative answers, but your comments have set me on a journey of discovery, and were most helpful in pointing me in the right direction.

I have found a data sheet for the PCF 8574, and it has allowed me to answer all of my questions. Here is what I have discovered so far - it might be helpful for others.

  1. For the PCF 8574 the slave address is 20h ORed with A0, A1, A2 where A signifies the logic state of the jumpered connections, A0 being on the left, A2 on the right when the board is viewed with the writing upright. For the PCF 8574A the address is 38h ORed with the As. This makes the address 27h when all of the jumpers are open (PCF 8574).

  2. By tracing the connections between the port I/0 pins (P0... P7) of the chip & the LCD module's pins, I can deduce the data format. As you suggest, the LCD is used in 4 bit data mode. R/W is supported:

P0 = LCD4 = RS
P1 = LCD5 = R/W
P2 = LCD6 = E
P3 no connection yet found. Visual inspection of the board suggests that this is not connected to anything.
P4 - P7 = LCD D4- D7
The serial data is sent MSB (i.e D7) first.

  1. The maximum I2C clock frequency is 100kHz, with a minimum Ck-high time of 4.7us and a minimum low time of 4us. This doesn't quite add up, but you can get the idea.

The anode of the backlight diode is jumpered to Vcc, so there is no software on/off control. The jumper pins are confusingly labelled Vcc (correct) & Gnd (incorrect). The latter is actually joined to LCD pin 15 (anode). If my interpretation of the data sheet is correct, the maximum I/O current of the port pins is +/-20mA, so P3 could be used to drive the led, allowing it to be switched on or off under software control. It seems odd that this has not been exploited, but it would not be difficult to modify the board by connecting pin 7 of the chip to pin 15 of the LCD and removing the jumper. There might be a reason for this omission, however, so it might be worth thinking about this more carefully.

http://www.nxp.com/documents/data_sheet/PCF8574.pdf

I thought I would update this thread with information I have on this specific board. I will post a link to a thread I started on electronicspoint.com