BRT Community
General Category => Discussion - EVE => Topic started by: JuSil on August 26, 2020, 12:37:01 PM
-
Hi,
I have an issue with gradient.
CMD_GRADIENT(400, 380, 0x336372, 400, 100, 0x84A3B2)
Looks nice in a Eve screen Editor, but in the display there are stripes about every 4millimeter. Gradient is a background, 800x480.
If I use gradient picture ARGP1555.raw, it looks ok.
I have Riverdi 7" eve3 BT815
//EVE 70
#define DWIDTH 800
#define DHEIGHT 480
#define PIXVOFFSET 0
#define PIXHOFFSET 0
#define HCYCLE 928
#define HOFFSET 88
#define HSYNC0 0
#define HSYNC1 48
#define VCYCLE 525
#define VOFFSET 32
#define VSYNC0 0
#define VSYNC1 3
#define PCLK 2
#define SWIZZLE 0
#define PCLK_POL 1
#define HSIZE 800
#define VSIZE 480
#define CSPREAD 0
#define DITHER 1
-
Hello,
The behaviour you are seeing can be attributed to how the CMD_Gradient command actually produces a gradient, this potentially mixed with poor viewing angels on the LCD can make the steps between colours more apparent.
We observed in some cases (depending on the LCD panel being used), the banding effect is related to LCD quality and configuration. In some cases, we found if we set:
REG_OUTBITS = 0x1B6 and REG_DITHER = 0x1
the banding effect is mitigated. These registers will set the RGB signals to 6 bits per channel and enable dithering.
Some other proposals would be to (1) Change the colour values from point a to b in the background gradient (2) Use a single line bitmap and repeat y to get the gradient effect. (3) use a full screen bitmap to produce the background image.
The following application uses a single line bitmap to create gradient background:
Example 8 – FT App MainMenu(+EVE2) (https://brtchip.com/SoftwareExamples-eve/#Example%208%20-%20FT%20App%20MainMenu(+EVE2))
Best Regards,
BRT Community
-
This REG_OUTBITS = 0x1B6 command fixed the problem, thanks.