TFT controller with CPLD (UART interface) >>>> WARNING: very poor translation!!! <<<<
All previous experiments
with TFT patterns generators were just TFT communication tests. The main goal was to make
controller with video-RAM.
Because I was too lazy to wire full parallel bus to the MCU I've decided to use serial port
for my first experiment. 1. TFT and UART interface 640x480x18-bit TFT module is connected to the CPLD with 100R damping resistors to reduce high slew rate. Optimal resistance depends on cable type and its length. In my case the cable is 10cm long, 1.27mm flat cable.
TFT is connected with static ENABLE signal so visible area is fixed according to datasheet.
Color data lines are connected in 16-bit mode only because the video memory is organized as 16-bit too. 2. SRAM interface 640x480 image in 16-bit color depth requires 600kiB frame memory so I'm using two 8-bit 512kB SRAM chips connected as one 512k x 16-bit SRAM. Speed grade is 10ns, it's not so expensive and the timing is much easier. Memory is connected to port B of the kit where is only one special function I/O (GSR).
Since the PCB routes are short enough it works without pullup or damping resistors this time.
3. CPLD configuration
There are two possible ways how to implement controller. The simpler method requires two independent RAMs where
one is used for refresh and the second one can be freely accessed by MCU without need for WAIT signal.
Once the drawing is done both memories can be switched (double buffering). This solution is easy to program but
it requires large PLD with lot of I/Os and those are quite expensive. Theoretical SRAM and TFT timing:
I have no idea how it looks like in real but it seems it works with no errors. It's quite surprise to
me because I'm using very inaccurate timing that definitely doesn't meet datasheet requirements. For final version
I'll rather use at least 75MHz master clock which should be enough to set timing correctly. WebPack 9.1i project to download: CoolRunner2_TFT_serial.zip (1524kB). 4. Demo
Some pictures displayed on Sharp's LQ064V3DG01 TFT: And short video: (c) 2012, Stanislav Mašláň - All rights reserved.
|