Hello. One of the advantages of i2c displays vs the "normal" ones is that it needs only 2 wires. I don't care about that one, but i'm looking at better speed performance. The displays are so slow with the LiquidCrystal library...
I have a project where I have one arduino i2c slave with a standard display connected to it, and the master sends over i2c the bytes to be displayed, obviously the slave takes it time to write to the lcd, but the important thing is that the master sends the bytes very fast and it continues to do it's own tasks, while the slave is writing to the lcd.
So the question is, in terms of speed, would it be the same if I used an i2c display instead of an atmega328 slave + display ?
thanks
With a normal parallel connection it is the display itself that is the weak link in terms of speed. The LiquidCrystal library is full of delays to accommodate the speed (or lack thereof) of the LCD controller.
The I2C interface has some delay of it's own and theoretically the program that drives it could probably omit many of the otherwise required delays, whether they do so or no I don't know.
The 'New LiquidCrystal' library, by Francisco Malpartida (aka fm), is currently the recommended library for use with I2C adapters and since he seems to be a speed freak I would be surprised if there are any unnecessary delays in his code. You can see some of the speed comparisons he did on his wiki page here: --> https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
Don
Hey thanks. I tested it with a 74hc595 and it's pretty fast compared to the original library!
I didn't use it with i2c because in the speeds comparision it seemed to be the slowest one, weird.
you can try if the display still works if you set I2C speed higher.
on AVR you have to tweak the TWBR variable,
you can do a quick check with my I2C scanner - MultiSpeed I2C Scanner - 50,100,200,400 KHz. - Libraries - Arduino Forum -
(inside the code you can see the TWBR settings)
In addition to increasing the bus speed, there is a fair amount of overhead in each I2C transmission, as done by the Wire library. Fill the buffer as much as possible before transmitting. The Wire library buffer size is 32 bytes.