VisualTFT FT812/FT813 display corrupted with many objects

General discussion on Visual TFT Software.
Author
Message
mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

VisualTFT FT812/FT813 display corrupted with many objects

#1 Post by mynos » 21 Jul 2016 16:41

Hi all,

I'm using STM32F407VG mcu on EasyMX PRO v7 for STM32 ARM and Riverdi 5" capacitive (800x480) display with FT813.
I developed a project where in a screen I have about 90 overlapping objects (of course in the program I show/hide them).

The unexpected problem is a corrupted image on display with a lot of noise and interference lines.

See attached images (up the saved screen from VisualTFT, down the photo of the result).
I tried to do a test, adding objects to see if the problem was a problem of objects limit number.
I noted that up to about 30 objects there aren't problems, from 30 to 40 objects (depending on dimension of object or if it overlaps other objects) there are some corrupted lines, adding objects the corrupted lines increase.

With same mcu and a Riverdi 4.3" (480x272) FT801 display, same project with 90 overlapping objects works well.

Is a problem of VisualTFT with FT812? or is there a problem on FT812 library? (because we know that there is already a problem on FT812 library that doesn't work without an external oscillator ... maybe the library has many other troubles).

Of course all connections are corrects, all parameters on VisualTFT are corrects, etc etc.

Best regards,
Vadiliano
Attachments
test.jpg
test.jpg (161.97 KiB) Viewed 27364 times
screen.jpg
screen.jpg (152.79 KiB) Viewed 27364 times

mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

Re: VisualTFT FT812/FT813 display corrupted with many object

#2 Post by mynos » 21 Jul 2016 17:43

I found the way for a possible solution. The problems aren't in the FT812 library or VisualTFT (I think).

Usually in my projects I worked well with following parameters for display:

Code: Select all

// Default configuration parameters
const TFT812Display VTFT_FT812_CONFIG_DISPLAY =
{
  30000000,        // Frequency          = main clock frequency
  0,               // OutRenderMode      = 0 normal, 1 write, 2 read
  0,               // RenderReadScanLine = scanline for read render mode
  0,               // RenderWriteTrigger = trigger for write render mode (read only)
  928,             // hCycle             = number if horizontal cycles for display
  88,              // hOffset            = horizontal offset from starting signal
  800,             // hSize              = width resolution
  40,              // hSync0             = hsync falls
  48,              // hSync1             = hsync rise
  525,             // vCycle             = number of vertical cycles for display
  32,              // vOffset            = vertical offset from start signal
  480,             // vSize              = height resolution
  13,              // vSync0             = vsync falls
  3,               // vSync1             = vsync rise
  0,               // Rotate             = rotate display
  0x01B6,          // OutBits            = output bits resolution
  0,               // OutDither          = output number of bits
  0x0000,          // OutSwizzle         = output swizzle
  0,               // OutCSpread         = output clock spread enable
  0,               // PClockPolarity     = clock polarity: 0 - rising edge, 1 - falling edge
  1,               // PClock             = clock prescaler of FT812: - 0 means disable and >0 means 48MHz/pclock
};
30MHz of frequency and 1 of prescaler.

I solved (almost) now the corrupted problems on display changing frequency and prescaler: 60MHz with 2 prescaler (always 30MHz at final).

Display shows all objects without any corrupted lines or other.
The only problem now is an annoying flickering on display.
I'm using 5000 as PWM frequency.

How can I solve the flickering problem?

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: VisualTFT FT812/FT813 display corrupted with many object

#3 Post by Aleksandar.Mitrovic » 22 Jul 2016 15:32

Hi,

Can you please share with me your project. I would like to test it on my hardware.

This should work without any problems.

Kind regards,
Aleksandar

mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

Re: VisualTFT FT812/FT813 display corrupted with many object

#4 Post by mynos » 23 Jul 2016 08:50

Hi Aleksandar,

attached you find the project (VTFT and MikroC). It is only one screen with about 100 objects (an example of GUI for my device).
Maybe you will find a discrepancy between VTFT settings of display and the code in *driver.c file, because I found better parameters for V/H cycle, offset, sync and I changed them manually in code.

All is displayed well, but there is a strong flickering on display.
You note it overall with scale grey colors and also if you watch the display not perpendicularly but in the direction where all colors become dark.
For that I think my problem is some frequency (mcu, ft81x, spi, pwm of backlight?).

I tried with Riverdi 5" 800x480 resistive FT812 and capacitive FT813, with 12MHz external oscillator and problems there are with both.
My configuration is:
- STM32F407VG at 168MHz on EasyMX PRO v7 for ARM
- Riverdi 5" 800x480 capacitive FT813 display connected on SPI3 (PC10-11-12) and DIV from 2 to 16 problems still remain (no matter how long are wires, problem remain. And also I'm using a simple SPI with miso mosi, not quad spi)
- pwm frequency for backlight is 5000 (if I use a value under 1000Hz I see on display a shadowed wave, like I reported in another thread some days ago. If I use an intermediate value from 1KHz to 10KHz, as in the FTDI manual, this shadowed wave disappears)
- frequency and prescaler of FTDI are 60MHz and 2. If I use different values (30MHz and 1 or other) the flickering is big and also there are corrupted lines on image (problem of first post)

This the parameters structure:

Code: Select all

// Default configuration parameters
const TFT812Display VTFT_FT812_CONFIG_DISPLAY =
{
  60000000,        // Frequency          = main clock frequency
  0,               // OutRenderMode      = 0 normal, 1 write, 2 read
  0,               // RenderReadScanLine = scanline for read render mode
  0,               // RenderWriteTrigger = trigger for write render mode (read only)
  1056,            // hCycle             = number if horizontal cycles for display
  46,              // hOffset            = horizontal offset from starting signal
  800,             // hSize              = width resolution
  0,               // hSync0             = hsync falls
  10,              // hSync1             = hsync rise
  525,             // vCycle             = number of vertical cycles for display
  23,              // vOffset            = vertical offset from start signal
  480,             // vSize              = height resolution
  0,               // vSync0             = vsync falls
  10,              // vSync1             = vsync rise
  0,               // Rotate             = rotate display
  0x0000,          // OutBits            = output bits resolution
  0,               // OutDither          = output number of bits
  0x0000,          // OutSwizzle         = output swizzle
  0,               // OutCSpread         = output clock spread enable
  0,               // PClockPolarity     = clock polarity: 0 - rising edge, 1 - falling edge
  2,               // PClock             = clock prescaler of FT812: - 0 means disable and >0 means 48MHz/pclock
};
This flickering is very annoying, I can't propose to customers a project with this artifact.

Thanks for help,
Vadiliano
Attachments
SYNTH_5.rar
(684.57 KiB) Downloaded 536 times

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: VisualTFT FT812/FT813 display corrupted with many object

#5 Post by Aleksandar.Mitrovic » 26 Jul 2016 15:14

Hi,

I have tested your example code on the EasyMX PRO v7 for ARM board, STM32F407, Riverdi click and Riverdi Display 7".
And everything was working good.

No flickering, no lines.
Can you please attach here or send me on PM your hardware picture and schematic?
Maybe there is some hardware or bus problem.

Kind regards,
Aleksandar

mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

Re: VisualTFT FT812/FT813 display corrupted with many object

#6 Post by mynos » 28 Jul 2016 10:45

Hi Aleksandar,

as you see in attached pics, I use the Riverdi Break Out board 20 pin connected on MikroBus 1 socket.
I'm using same connections of 4.3" FT801 Riverdi display:
- 3.3v for display
- gnd
- miso
- mosi
- clock
- rst
- cs
- 3.3v of MikroBus 2 for backlight

Is it correct?
Or do I need other connections like INT, other vdd, etc?

Display and touch work well, the only problem is the flickering effect (of the backlight I think), very ugly.

Thank you,
Vadiliano
Attachments
mikrobusb.jpg
mikrobusb.jpg (227.82 KiB) Viewed 26810 times
mikrobusa.jpg
mikrobusa.jpg (153.2 KiB) Viewed 26810 times
board display.jpg
board display.jpg (347.83 KiB) Viewed 26810 times

User avatar
uros.cvetinovic
mikroElektronika team
Posts: 803
Joined: 14 Dec 2015 09:24

Re: VisualTFT FT812/FT813 display corrupted with many object

#7 Post by uros.cvetinovic » 29 Jul 2016 11:19

Hi Vadiliano,

It could be that the SPI lines are too long.
We are using Riverdi click for testing it, so it is plugged directly to mikroBUS,
and it shortens the lines a bit in compared to your connections.

I will try to connect Riverdi click to mikroBUS via wire jumpers to try to recreate your problem, and get back to you.

Best regards,

Uros

mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

Re: VisualTFT FT812/FT813 display corrupted with many object

#8 Post by mynos » 29 Jul 2016 11:53

Hi Uros,

I thought the same about long wires. But I used this kind of connection to emulate a long cable with some disturbs, because the final machine should have the display fixed on cover of openable electric box and the electronic device fixed inside the box, with a 20-30cm cable.

For that I also used a slower SPI (div 4 or 8 ).
In each case, with same long wires, the Riverdi 4.3" FT800/801 worked without flickering.

Thank you,
Vadiliano

User avatar
uros.cvetinovic
mikroElektronika team
Posts: 803
Joined: 14 Dec 2015 09:24

Re: VisualTFT FT812/FT813 display corrupted with many object

#9 Post by uros.cvetinovic » 01 Aug 2016 11:29

Hi Vadiliano,

I have tested your project with similar connections that you have.
I connected Riverdi click to mikroBUS via wire jumpers to extend the length of the SPI lines.
The display worked without problem.

Can you tell me which oscillator, and capacitors did you solder on your riverdi?
Also, you can try to change PWM used for backlight, try changing values and tell me what happens.

Best regards,

Uros

mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

Re: VisualTFT FT812/FT813 display corrupted with many object

#10 Post by mynos » 01 Aug 2016 12:17

Hi Uros,

I used 12MHz external oscillator and n° 2 18pF capacitors (as indicated in FTDI datasheet).
Oscillator: TXC 7A-12.000MAAJ-T XTAL, 12.000MHZ, 18PF, SMD, 5,0X3,2
Capacitors: WALSIN 0805N180J500CT SMD, 18 pF, ± 5%, C0G / NP0, 50 V, 0805

Oscillator is accurate, I verified with oscilloscope the 12MHz frequency.

About PWM of backlight, I tried many values and I verified that:
- increasing from 250Hz to about 1KHz, flickering effect goes from very strong flickering to flickering
- from 1KHz to 10KHz, flickering is the same

I think the problem is the backlight, because image and colors are good; the flickering effect concerns overall the grey scale colors.
In my example I have an EveGradient as background with gradient from grey to white. Over the EveGradient I have other colored objects. Flickering is only in the grey area, not in colored objects.
And you can see the flickering also in the area of gradient from white to the first step of grey.
I have also different colored buttons, the only button with flickering is that one grey.

May PWM be affected from something other than the PWM value?

Best regards,
Vadiliano

User avatar
uros.cvetinovic
mikroElektronika team
Posts: 803
Joined: 14 Dec 2015 09:24

Re: VisualTFT FT812/FT813 display corrupted with many object

#11 Post by uros.cvetinovic » 02 Aug 2016 16:51

Hi,

The only odd thing is that I don't get any flickering with my hardware, which is almost the same as yours.
You can try changing PWM duty cycle, 0 to 128 is the range (0 is darkest, and 128 brightest).

Also, can you send me only hex file of your project.
First try to load that hex file to your MCU, and make sure that the display is flickering with it, and after that send it here.

Best regards,

Uros

vne147
Posts: 51
Joined: 20 Jul 2007 21:23

Re: VisualTFT FT812/FT813 display corrupted with many object

#12 Post by vne147 » 02 Aug 2016 20:08

I have also been noticing the flickering. Like Vadiliano said, it happens mostly with the gray colors. I have tried many combinations of frequency and duty cycle but I haven't found one combination yet that completely eliminates it.

It hasn't been too much of an impact for me because I'm just not using the colors that look bad.

I'm using a Riverdi Click adapter and the short FPC cable that it came with.

mynos
Posts: 78
Joined: 30 Oct 2015 17:22
Location: Venezia (Italia)

Re: VisualTFT FT812/FT813 display corrupted with many object

#13 Post by mynos » 04 Aug 2016 07:51

Hi Uros,

attached you find HEX file.

I tried with different PWM frequency and duty cycle:
- duty cycle: with brightest display, flickering is less visible (if you watch the display perpendicularly, otherwise you see immediately the flickering overall in grey colors).
- frequency: 250-1000 Hz display has ugly shadowed waves and big flickering; 1000-10000 Hz shadowed wave disappears

I also tried different capacitors, with 18pF or 22pF the result is the same flickering.
I'll buy the Riverdi click and check if something changes.
But I'm sure connections are correct because with 4.3" FT801 Riverdi display all works well.

I noted different intensity of flickering when I change frequency and prescaler of display.
Following the "RGB PCLK frequency" table 4-11 of FT812/3 FTDI datasheet, the better combination is 60MHz and prescaler 2 (= 30MHz).
If I go down a little, flickering increases.
Over 60/2 there is 36MHz and prescale 1, but flickering is huge.
It is like if the correct values was a little more than 60/2. I tried also non-standard frequency values, like 64MHz and prescaler 2 but it is the same.

Best regards,
Vadiliano
Attachments
hex.zip
(67.82 KiB) Downloaded 322 times

User avatar
uros.cvetinovic
mikroElektronika team
Posts: 803
Joined: 14 Dec 2015 09:24

Re: VisualTFT FT812/FT813 display corrupted with many object

#14 Post by uros.cvetinovic » 04 Aug 2016 17:44

Hi,

I have tried your hex file on two different hardware.
One is riverdi screen 7 inch, sane as yours, and the other one is FTDI's hardware with FT813 and 5 inch display on it.
5 inch and 7 inch have same resolution, so same code should work on both on them.
Your hex file worked with both displays without any problem.
I didn't have any flickering.

But, since you wasn't the only one reporting this, I will investigate this little bit further.
I will try to reproduce this flickering effect by changing parameters, and some connections, and I will get back to you.

Best regards,

Uros

marke
Posts: 32
Joined: 28 Jan 2014 05:59

Re: VisualTFT FT812/FT813 display corrupted with many object

#15 Post by marke » 05 Aug 2016 00:28

Could it be a power supply issue??

Post Reply

Return to “Visual TFT General”