Hi there,
Sorry if this is not in the correct forum, I wasn't quite sure where to put it.
Basically I'm running into an issue where my LCD screen is loading images too slowly so I have been trying to make the drawing method more efficient. As it stands right now, it draws one pixel at a time - which is quite slow. I would like to send it much more data at once, say for an example an entire row of data from a BMP image. Below is the current drawing method - which works but is slow.
void TFT_SetXY(uint16_t poX, uint16_t poY) { TFT_SetCol(poX, poX); TFT_SetPage(poY, poY); TFT_SendCMD(0x2c); } void TFT_SetPixel(uint16_t poX, uint16_t poY,uint16_t color) { TFT_SetXY(poX, poY); TFT_SendData(~color); }
However, if I am reading the data sheet correctly (see attached image), it seems to me like it says that you can simply send the 0x2C command once and then just keep sending color data and it will automatically increment forward to the next pixel, or am I reading it wrong? I'm referring to the part where it says that the "column register and page register incremented". Am I crazy or is the text here just very unclear?
My idea was to simply create a new function which loops through an array of colors to send to the LCD as follows:
void TFT_SetPixelRow(uint16_t startX, uint16_t startY,uint16_t* color) { TFT_SetXY(poX, poY); for(int i=0; i<header.imageSizeX;i++){ TFT_SendData(~color[i]); } }