K
K
Kalombyr2018-05-11 10:34:53
Arduino
Kalombyr, 2018-05-11 10:34:53

i2c speed for lcd screen?

Good day!
There is a 12864j LCD display (manufacturer unknown), we managed to connect it with an 8-bit interface, the GLCD library is used, everything works quickly.
I decided to transfer to i2c, since almost all Arduino legs were occupied, I took the pcf8574 mikruhu, connected only the data lines (D0-D7), left the rest (E, RW, RS, DI, etc.) connected to the Arduino. I figured out the library code,
redirected the output via I2C (both writing and reading, the Wire library) everything works, but it works Sooooo slow.
Previously (with a direct connection) the display was completely updated in less than a second, but now it takes at least 3 seconds to completely redraw.
Writing and reading occurs on all ports at once, and not one at a time.
Wire speed set to 400 kHz. - more apparently can not atmega.
I played with the screen timings, but only achieved an even greater delay.
Tell me, please, where I could do something wrong and where to dig?
What speed does he need i2c then?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2018-05-11
@Kalombyr

The i2c speed must be at least 8 times faster than the parallel interface speed.
Atmega can jerk pins at 8 Mhz with 16 Mhz quartz. The rest of the brakes are created for you by a software implementation with a bunch of abstractions. If you want a drive, rewrite everything in C, without abstractions and with bunches in asm.
Or change the controller to ARM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question