MoonWatcher
|
4.3" Display - odd behaviour when filled rectangles are drawn to the perimeter of the screen.Posted at:2022-12-30 11:59:17
|
Running a brand new pair of Digole 4.3" displays with touch screen on Arduino using UART7 on a Teensy 4.1 board clocked at 600Mhz. The Digole is being powered from its own LM33CV regulator with suitable smoothing. Everything basicaly works and for example rotating the display by 90 degrees and line drawing from (0,0) to (799,0) to (799,447) to (0,479) and back to (0,0) ie: around the outside perimeter of the display while using different colours works well. However if I try to draw filled rectangles at the four corners of the display - the drawing operations fail, leaving pixel and line artifacts on screen. If I reduce the drawing width by 33 pixels, the artifacts mostly (not fully) disappear. The following illustrates the bug by running an example that will obviously fail and then 5 seconds after, runs another example that appears to be better - but if you look closely you'll still find odd pixels appearing between the white and red boxes. Both my displays exhibit this problem. Note I am deliberately using 9600 BAUD to exclude fast comms issues. void loop() { delay(2000);
DigoleSerialDisp Display(&Serial7, 9600);
Display.begin();
delay(1000);
Display.backLightOn(); // Make sure the backlight is on
Display.displayConfig(0); // Switch the status display off.
Display.clearScreen();
Display.setRot90();
Display.setMode( DRAWMODE_RPL );
Display.setColor(RED);
Display.drawBox(0,0,100,100);
//
Display.setColor(GREEN);
Display.drawBox(800-100-1,0,100,100);
//
Display.setColor(BLUE);
Display.drawBox(800-100-1,480-100-1,100,100);
//
Display.setColor(WHITE);
Display.drawBox(0,480-100-1,100,100);
delay(5000);
//
// This works - but only by making the screen width artificially smaller.
Display.clearScreen();
Display.setColor(RED);
Display.drawBox(0,0,100,100);
//
Display.setColor(GREEN);
Display.drawBox(800-100-1-33,0,100,100);
//
Display.setColor(BLUE);
Display.drawBox(800-100-1-33,480-100-1,100,100);
//
Display.setColor(WHITE);
Display.drawBox(0,480-100-1,100,100);
// LOCK UP
while(1==1);
}
|