I2C PCF2119RU LCD Controller lib

05 May 2011

Hi All,

Anyone aware of an mbed LCD lib available for the Philips PCF2119 LCD controller? I just bought one of these

http://ch.farnell.com/productimages/farnell/standard/122040906-40.jpg

Which uses the PCF2119 controller over I2C. Before I start writing code for it I wanted to see if someone else had done some work on it. I did try searching the mbed site and found nothing but the problem is that the uploaded libs and progs are not indexed.

I noticed that often the supported controllers are only mentioned in the code or header file so difficult to know...

Thanks, Serge

05 May 2011

The PCF2119 is very similar to HD44780. It has the same registers and commands as the HD44780 and some extended register (eg to control the internal Vlcd and bias generator). The difference is that you use the I2C bus instead of a parallel databus and controlbus. You should be able to modify some of the HD44780 code on this site. You will need to modify the low-level data and command write operations. Perhaps you can even make the existing HD44780 libs more generic so that you can select direct parallel control, control through an I2C port expander (eg PCF8474 or MCP23017 or MCP23S17) or use the I2C bus like in your case. I have done similar stuff in the past using 8051 assembler code, but that wont help you much now.

Regards, Wim

05 May 2011

Thanks Wim,

I will try and get some code working and then see how I can integrate it with and existing lib or write a new one.

I did find some bits of code for this LCD in the i2c routines here

Import programdiags

test code for our MBED board

But have not been able to get it working yet.

Serge