Newhaven Display Forum

Newhaven Products => Character LCDs => Topic started by: ABSysacom on November 08, 2016, 03:56:00 PM

Title: Using NHD-C0216CiZ-FSW-FBW-3V3 on I2C on Linux
Post by: ABSysacom on November 08, 2016, 03:56:00 PM
I am using the NHD-C0216CiZ-FSW-FBW-3V3 LCD on a custom board connector to a CPU with I2C. The CPU run a linux software. On the user sapce, I open the device the open command on /dev/i2c-1 and use the ioctl() function to write to the I2C port.

I am having difficulty to initilize the LCD. Sometime it work and sometime it does not work. When it does not work, at the 8th byte, the SDA pin is stuck at 1.1v and I am not able to write to the port anymore. It always return an error "Bus is busy".
In the code example at the end of the datasheet, there is some delay added between some write of byte. If I try to do it on linux, the driver will automatically add the start/stop/slave addr write sequence. Then the LCD never work.
Anyone have ever tried to use this LCD with Linux?