I'm trying to interface with an LCD screen, via my arduino using i2c by integrating a port extender (mcp23017). I did use the tutorial of "Nick Gammon" well known on this forum of course. (this tutorial: http://www.gammon.com.au/forum/bbshowpost.php?id=10940&page=1 )
I've connected everything as described by Nick, but my lcd screen uses slightly different pin configuration then commonly used lcd's. I've taken these difference into account and adapted my circuit.
Unfortunately i'm not able to get my lcd up and running. I'm however able to change the contrast of the display with the potmeter, which results in a dark background or of course, an empty one.
I´ve also tried to connect the display directly to my arduino. By using the glcd library I was able to at least test the display itself, with succes.
I did check my wiring several times using the mcp23017 but can´t find a problem... I guess it´ll be something I need to change in the "i2c lcd" library in order to adapt to my lcd pin mapping (Though this, sounds very unlogic. Since I did adapt the wiring going from lcd to mcp23017, according to the different pin mapping).
hi, i too am facing the same problem with Pcf8574 I2C interface. did u entered the correct address of the I2C device?
there is a sketch called I2c scanner which will provide you with the correct address of the device. here is the linkhttp://arduino.cc/playground/Main/I2cScanner
Oke, I’ve taken a look in the library of Nick gammon in which I found something which could cause my problem.
void I2C_graphical_LCD_display::cmd (const byte data)
{
startSend ();
doSend (GPIOA); // control port
doSend (LCD_RESET | LCD_ENABLE | _chipSelect); // set enable high (D/I is low meaning instruction)
doSend (data); // (command written to GPIOB)
doSend (LCD_RESET | _chipSelect); // (GPIOA again) pull enable low to toggle data
endSend ();
} // end of I2C_graphical_LCD_display::cmd
The code before the comment on the 5th line is what takes my attention. When I look at the lcd’s database the pin mapping port D/I is at pin 16, but the comment which follows tells me that low is meaning Data and high is instruction.
Anyone who can tell me how to swap this?
Probably there are more problems in the code in relation to my lcd screen.
Regards,
Niels