Author Topic: Data for TFT Screens  (Read 1298 times)

0 Members and 1 Guest are viewing this topic.

Offline Robert.Adams

  • Contributor
  • Posts: 17
  • Country: us
  • Automotive Hardware Engineer
Data for TFT Screens
« on: April 27, 2014, 04:54:41 am »
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.

 

Offline hagster

  • Frequent Contributor
  • **
  • Posts: 253
Re: Data for TFT Screens
« Reply #1 on: April 27, 2014, 06:03:01 am »
Its a 1bit display so you can store 8pixels in a byte. I make that 42 images in 512kb uncompressed.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3232
  • Country: ro
  • .
Re: Data for TFT Screens
« Reply #2 on: April 27, 2014, 06:19:49 am »
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

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..
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3232
  • Country: ro
  • .
Re: Data for TFT Screens
« Reply #3 on: April 27, 2014, 12:08:50 pm »
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, or other algorithms like

https://hg.java.net/hg/solaris~on-src/file/tip/usr/src/uts/common/os/compress.c
http://oldhome.schmorp.de/marc/liblzf.html

that are relatively easy to port to microcontrollers 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf