Close

efficiency improvement with up to 64 pixel writes.

A project log for spi write up to 64 colors at a time on Arduino!

amg8833 equivilent sensor thermal cam is a perfect example of how to write faster with spi lcd displays. 128x128 sample fast on Arduino.

jamesdanielvjamesdanielv 09/12/2018 at 03:160 Comments

efficiency improvement with up to 64 pixel writes. the issue with pixel performance beyond 16 at a time  was  most likely do from loading and unloading of stack for function. the goal of the new commands was to reduce command overhead. this is accomplished by slightly changing how the pixel command functions.

//this is start, required to init display mode, x y address and size of display area

 fillRectFast64colorStart(int16_t x, int16_t y, int16_t w, int16_t h,
 uint16_t color0, uint16_t color1, uint16_t color2, uint16_t color3,
 uint16_t color4, uint16_t color5, uint16_t color6, uint16_t color7)

//this command below sends 8 colors or 16 bytes to stack at a time

fillRectFast64color(uint16_t color0, uint16_t color1, uint16_t color3, uint16_t color4,
uint16_t color5, uint16_t color6, uint16_t color7, uint16_t color8),

 tft.fillRectFast64colorEnd();  //finishes end of command and releases lcd to allow other devices

so a single 64 color write would look something like this

fillRectFast64colorStart(displayPixelWidth *j,displayPixelHeight* i, displayPixelWidth, displayPixelHeight,color, color, color, color,color, color, color, color); //first 

fillRectFast64color(color, color, color, color,color, color, color, color);

fillRectFast64color(color, color, color, color,color, color, color, color);

fillRectFast64color(color, color, color, color,color, color, color, color);

fillRectFast64color(color, color, color, color,color, color, color, color);

fillRectFast64color(color, color, color, color,color, color, color, color);

fillRectFast64color(color, color, color, color,color, color, color, color);

fillRectFast64color(color, color, color, color,color, color, color, color);//last

fillRectFast64colorEnd();  //we close the lcd write and free up data lines for other communcations.

Discussions