Digole
©DIGITAL
SOLUTIONS

Serial Display emulator    New Display User manual

Forum login or
Login:
Password:
  
Forum Catagory
Digole Serial Display (210)
  12864 LCD/OLED module (22)
  24064 LCD module (3)
  Color LCD Modules (28)
  Color OLED module (20)
  Online Emulater (5)
  Universal GLCD module (1)
  Universal Text LCD module (2)
Mini Display Panels (0)
  Mini LCDs (0)
  Mini OLEDs (0)
Pattern Drive Module (0)
~Buy & Sell on Digole (2)
~Others~ (5)
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

4.3" Display - odd behaviour when filled rectangles are drawn to the perimeter of the screen.

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);

}

 

RE:4.3" Display - odd behaviour when filled rectangles are drawn to the perimeter of the screen.

1) Download the latest Arduino lib from: https://www.digole.com/forum.php?topicID=1

2)Add : 

#define _Screen_Over_511_


at the top of the sketch. This will affect the function of write2B() in lib:

#ifdef _Screen_Over_511_

//for 4.3" high definition module only    
void write2B(unsigned int v) {
        write(v / 256);
        write(v);
}
#else
    void write2B(unsigned int v) {  //for all screen matrix less than 512
        if (v < 255)
            write(v);
        else {
            write(255);
            write(v - 255);
        }
    }
#endif
 
Or, simply modify the function to:

void write2B(unsigned int v) 
 
        write(v / 256);
        write(v);
}
 
If this still not solve the issue, then contact us.
 
Happy New year,

RE:4.3

Yep - both steps done.
 
1) Download the latest Arduino lib from: https://www.digole.com/forum.php?topicID=1 2)Add :  #define _Screen_Over_511_?
 
 
Incidentaly - and separelely DrawCircle has a bug. The last f parameter (used to define if the circle is to be filled or not) is sent by the library a byte which can't be correctly resolved until a subsequent command is sent. You can clear the problem either by converting F to be sent using write2B, or in the sketch by issuing a write(0) command using the digole class. Either way and leaving that problem to one side, filled circles and filled boxes leave pixel litter all over the screen and generally in random places. I have photos that show the problem but can't upload them here as the user interface complains "the connector is disabled". My two display boards do much the same thing. 
 
If you have a direct email I can send pics as attachments. 
 
I'm using your digole class as a child class in the main sketch - but even if I strip all of that out and simplify everything right down, drawing ops still leave pixel debris where they shouldn't. 
 
This feels more like the CPU on the LCD is getting its address timing wrong.
 
Ciaran

RE:4.3

Hi Ciaran,

We fixed the filled/Not filled circle issue in the Arduino lib, please download it online again.

We will check the random pixels problem later.

You can contact us at: question@digole.com directly.

RE:4.3

Hi there

Many thanks for replying and you were right about the library. Somehow I made a mistake and was using an older version... not sure how that happened. I've updated now and the fill/nofill circle bug is properly cleared in the class. Many thanks

However I do still have the pixel debris problem on screen (on both my displays). I've emailed (with pictures and some test code) to illustrate the problem.

Note that in my emailed test code you'll need to have one definition for XOR drawing mode. My drawing modes are defined as follows

    #define DRAWMODE_RPL    'C'         // Replace (copy) mode
    #define DRAWMODE_NOT    '!'         // Invert mode
    #define DRAWMODE_OR     '|'         // OR(A,B) mode
    #define DRAWMODE_XOR    '^'         // XOR(A,B) mode
    #define DRAWMODE_AND    '&'         // AND(A,B) mode

 

Otherwse, let me know your thoughts.

I'm not convinced the boards are faulty but rather think there is some kind of timing glitch in the way the board works internally

Ciaran (UK)

Copyright Digole Digital Solutions/Digole Technologies Inc., 2008-2024. All rights reserved.
Powered by Digole