Hello,
I would like to use a LCD-Display and control it with I2C. So I bought a 1604 device which consists obviously
of the display itself and an attached I2C port expander MCP23008.
It took me some time to find a (at least working) library for it here:
http://www.elecfreaks.com/store/i2cspi-lcd1604-moduleblack-on-green-p-432.html
and so far it works, but the performance is unacceptable slow:
If I run this snippet, in notice an interval of 240 ms just to display "hello, word".
And if I send it twice, it also exacly doubles the 240 ms to 480 ms.
This means the sketch is blocked for this interval and it seems to me inappropriate high.
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
int oldMillis = millis();
lcd.print("hello, world!");
int newMillis = millis();
Serial.print(newMillis - oldMillis);
}
I really cannot believe that I2C is that slow.
I have the strong suspicion, that the library in combination with the I2C port expander MCP23008 might cause the problem.
But my knowledge and understanding is not deep enough to analize this in detail.
I know, I could tune the I2C-Bus Speed from 100kHz to 400kHz, and I already tried to do so, yes, improves the situation significantly, but in this case I would consider this as a workaround, I think I would rather spend the 10 or more pins
and attach the display directly.
But now my questions:
Did I buy an unsuitable hardware for my purpose ?
Is there a chance to find a library with faster performance ?
If not, is there a different LCD 1604 / 2004 that working different in principle ? (I think of maybe buffering the
received string first before putting it to the display)
If someone has an idea of which hardware to use or features I should look for, this would be very appreciated.
Best reagrds and thank you in advance.
Christoph