From: Michael R. <mi...@re...> - 2013-03-19 15:10:38
|
Hi Justin, > Is there a list of I2C commands that would be preferred such that I maintain broad compatibility? I'm effectively using > the 256x64 pixel screen as an 8 line character LCD. I think it would make the most sense to fall under the category of > graphic, vs text, but I know I'm ready to move forward with text mode now. It depends :-) graphical displays basically just require one command, or better one functionality: copy an area of pixels to the display. All the text and widget rendering, bar handling, double-buffering stuff is done by lcd4linux. Take a look at some of the graphic drivers, and you'll find just one blit() function you need to implement. For a text display, you need mre functions: a goto(x, y), a "put string" function, and all this "user-defined character" stuff. I am sure you don't want to do this user-defined char handling with your graphical display... as I2c tends to be quite fast, a very simple approach could be to transfer a whole line of pixels at once, passing the y coordinate as the first i2c packet byte, followed by a bitmap of all pixels in that row (I just implemented something similar with a graphical display driven by a AVR connected cia i2c to another AVR board) regards, michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |