After learning a bit with a PIC18 on a EasyPIC Pro V7 (MikroC + Visual TFT) I have moved to an EasyPIC Fusion V7 (MikroC for PIC32 + Visual TFT) with a P32MZ2048EFH144 MCU to start actually coding for my project.
On the previous system using a Riverdi Click and 7" TFT (MIKROE-2288) the combination worked quite well. For the last 3 days I have been unable to display anything on the Fusion/Riverdi combo. It is plugged in to MikroBus 1.
The project for testing this is a simple circle drawn on the screen with VisualTFT. At the moment the Riverdi does not even flicker and remains black.
The first issue was with building a new pattern for the Riverdi and TFT. Several attempts failed at finish saying the file was corrupt. It appears if any config item is left blank or 'todo' this happens. I have since gotten it to create a new pattern based on the working settings from the FT812 pattern used with the PIC18:
I have tried FT800 through FT813, SPI1,2,3 and several frequencies/prescaler values.
These are the settings being used for the fusion similar for different FT8xx attempts :
Code: Select all
// TFT module connections
sbit FT812_RST at LATC1_bit;
sbit FT812_CS at LATC2_bit;
sbit FT812_RST_Direction at TRISC1_bit;
sbit FT812_CS_Direction at TRISC2_bit;
// End TFT module connections
const TFT812Display VTFT_FT812_CONFIG_DISPLAY =
{
48000000, // 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
1, // PClockPolarity = clock polarity: 0 - rising edge, 1 - falling edge
2, // PClock = clock prescaler of FT812: - 0 means disable and >0 means 48MHz/pclock
};
The SPI initialization is as follows and is based off of the FT800 from the BoardDefs patterns:
Code: Select all
SPI1_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, 8, _SPI_SS_DISABLE, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_IDLE_2_ACTIVE);
// I have tried SPI1, 2 and 3
In experiments with the onboard EasyTFT320x240 board set to 80Mhz it ran so slowly it took many seconds to draw a screen. Setting the MCU to 4MHz the screen redraw was less than a second. The EasyTFT is still far to slow for my purposes and I haven't seen any way of speeding it up in the forums.
Searches through the forum for Riverdi and Fusion have shown a couple topics with similar issues but none that helped so far.
Any help/advice getting this screen running is appreciated.
Thanks