EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: Robert.Adams on April 26, 2014, 06:54:41 pm
-
Hello all,
I'm trying to branch out into displays and mobile devices and I'm working on setting up a 400x240 TFT (Sharp Memory LCD). For writing the data to the display is there a way to compress the data from the 96000 pixels that are on a frame? It would be a drag to put a 512kB EEPROM and only get ~5 frames out of it.
-
Its a 1bit display so you can store 8pixels in a byte. I make that 42 images in 512kb uncompressed.
-
You can also do some sort of RLE compression on the image data, to shrink the images with minimal decompression time : http://en.wikipedia.org/wiki/Run-length_encoding (http://en.wikipedia.org/wiki/Run-length_encoding)
Depending on the TFT screen and the controller driving it, you may also be able to send sprites (think of an icon or each letter in a font as a sprite) or update just regions of the screen, or upload bitmap fonts into the tft screen..
-
In case it's not clear, I meant uploading sprites and bitmap fonts in the internal memory of the tft controller and then just reference them (for example tell the controller to draw sprite 5 out of 40 loaded inside it at coordinates x,y).
For a black and white display, jpeg compression is really too complex and unsuitable). If you're really keen on compressing stuff, look for RLE, LZ77, huffman, (http://bcl.comli.eu/home-en.html) or other algorithms like
https://hg.java.net/hg/solaris~on-src/file/tip/usr/src/uts/common/os/compress.c (https://hg.java.net/hg/solaris~on-src/file/tip/usr/src/uts/common/os/compress.c)
http://oldhome.schmorp.de/marc/liblzf.html (http://oldhome.schmorp.de/marc/liblzf.html)
that are relatively easy to port to microcontrollers