0

I'm building a new device with 1.44" TFT LCD and ATMEGA328.
I'm using the Arduino library.
There are several features like a logo, a button image, and a graph.
But I have an issue when text or line display on the TFT LCD.
After displaying, and then, refresh and overwrite a text or graph.
In this time, there is blinking on the screen, so text and graph are blinking.
How can I display statically text and graph without blinking?

if (count >= 100)
{
  for (uint8_t x = 20; x < 120; x++)
  {
    tft.drawPixel(x, vol_1[x - 20] * 1 / 5, TFT_BLACK);
  }
  uint16_t tmp[99];
  memcpy(tmp, &vol_1[1], sizeof(uint16_t) * 99);
  memcpy(vol_1, tmp, sizeof(uint16_t) * 99);
  vol_1[99] = voltage1 / 10;
}
else {
  vol_1[count] = voltage1 / 10;
  count++;
}

for (int16_t y = 0; y < tft.height(); y += 10) {
  tft.drawFastHLine(0, y, tft.width(), color1);
}
for (int16_t x = 0; x < tft.width(); x += 10) {
   tft.drawFastVLine(x, 0, tft.height(), color2);
}
for (uint8_t x = 20; x < 120; x++)
{
  tft.drawPixel(x, vol_1[x - 20] * 1 / 5, TFT_GREEN);
}

  • why did you include the code snippet and the small portion of a schematic diagram? – jsotola Jun 20 '18 at 17:13
  • what happens if you write the same text (and draw the same logo) using a different color? – jsotola Jun 20 '18 at 18:51
  • Do the examples from the library blink? – Craig Jun 20 '18 at 19:11
  • 1. I mean you review code to find the solution. 2. there is blinking yet. 3. I do not want to flicker. – Aaron Jun 21 '18 at 2:51
  • some tft libs allow you to use a buffer, which typically gives higher FPS at a cost of more RAM. That would at least reduce the flicker duration and lead to a better UX. – dandavis Jun 21 '18 at 5:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.