Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interfacing to Graphic TFT display
08-01-2014, 01:10 AM,
#1
Interfacing to Graphic TFT display
Hi all, until now i used only common LCD 2x16 displays but now i would like to go graphic and use a tft graphic panel. For a few euro on ebay i got a 3.5 tft display but i lack documentation.

The tft diplay is marked "shanyan qq:895838470 TFT bottom v5.1"
There are also two numbers 02245x and 025231H2
Looking in the board i found the controller XPT2046 which is the touch screen controller, so
the panel should have also this function.
There is a connector with 34 pins in two rows of 17 marked in this way

SCK,NC,S1,+5V,GND,VDD,GND,D14,D12,D10,D8,D6,D4,D2,D0,RD,RS
TCS,PEN,S0,GND,VDD,BL,D15,D13,D11,D9,D7,D5,D3,D1,RST,WR,CS

it seem to have a 16 bit interface with chip select, register select, may be rd is read
BL should be backlight

I googled for info but most of the documents found are on chines websites and my chinese understanding is void. Browsing i found reference to the panel ILI9481 but the datasheet shows different pinout.
Since most of this interfaces are standard my question is .. somebody already know this interface ?? where i can pick some documentation about this board. Tnx
Reply
08-01-2014, 10:59 AM,
#2
RE: Interfacing to Graphic TFT display
You can translate Chinese using google or other translators and get quite good results. You can go direct from PDF.

John
Reply
08-01-2014, 12:13 PM,
#3
RE: Interfacing to Graphic TFT display
First thing to check would be whether it has a graphics controller (with frame buffer RAM) and if so, which one. If NOT, then good luck, you would either need a lot of extra components and electronics knowledge (like shown here: http://www.mikrocontroller.net/topic/281513, look for the posting by Uwe Kunze (bitmaske)) OR a very clever and tricky SW/HW-blending solution like the "Color Maximite" look here: http://www.heise.de/hardware-hacks/artik...68793.html (reminds me a bit of the "slow mode" of good old ZX81, where it took 80% of its CPU time just to help shifting out pixels). All links in german, sorry.
Reply
08-01-2014, 01:44 PM,
#4
RE: Interfacing to Graphic TFT display
I googled the shanyan website and found the version 7.0 of the board. (My one is V5.1) Here is reported that the controller is R61509V for the panel, the touch screen controller is XPT2046.
The pinout of this board is a perfect match of my one.
i grabbed the R61509V datasheet and found that this is a powerfull component that can be configured either in parallel or serial interface. The parallel interface che be 18, 16, 9, 8 bit and this is an hardware selection through the pin IM0-IM2 which are not present on my board. So the choice has already been made. I believe that is 16 bit in my case but would be nice to have 8 pin to reduce final bord tracks.
I guess i've identified the pinout meaning.


SCK is SPI Clock
SI is SPI MOSI
SO is SPI MISO
TCS is Touch Panel Chip Select
PEN is PENIRQ (interrupt when panel touched)
D0-D15 are 16 bit bus to the microcontroller
CS is R61509V Chip Select
RD Read signal for R61509V
WR Write signal for R61509V
RS is Istruction or Data Select bit for R61509V

BL is related to backlight controll. In some documents i found that backlight controll is achieved with a PWM waveform and duty cycle controls the fade. I'm not sure what happen if i connect this to Power Supply.
I'also not sure for the pin VDD. May be that powering the board with 5V here is the 3.3 Supply out for the micro .. or that VDD is the power input for TFT. Dunno the Volt value to be used should be this case.

Maybe the SPI interface can be used for both TFT and touch panel with differen addressed or is hard wired only for touch controller, since XPT2046 can be accessed only via a SPI interface.

I guess I need some more info before to assemble a minimum hardware testebed to power the board and see what happen ... it should be nice if some other people has already used this board that was pretty common seen on ebay in the last few month.

Any help will be much appreciated.
Tnx, Fabio.

(08-01-2014, 12:13 PM)trollpatsch Wrote: First thing to check would be whether it has a graphics controller (with frame buffer RAM) and if so, which one. If NOT, then good luck, you would either need a lot of extra components and electronics knowledge (like shown here: http://www.mikrocontroller.net/topic/281513, look for the posting by Uwe Kunze (bitmaske)) OR a very clever and tricky SW/HW-blending solution like the "Color Maximite" look here: http://www.heise.de/hardware-hacks/artik...68793.html (reminds me a bit of the "slow mode" of good old ZX81, where it took 80% of its CPU time just to help shifting out pixels). All links in german, sorry.
Reply
20-01-2014, 06:43 PM,
#5
RE: Interfacing to Graphic TFT display
I Fabio, I have the same problem And i think that the LCD don't work whit serial interface, about the bl command you can use an high level to turn on the baklight, I have tryed And work fine. Have you solved other problem?
Reply
04-05-2014, 10:56 PM, (This post was last modified: 04-05-2014, 11:07 PM by fcapozzi.)
#6
RE: Interfacing to Graphic TFT display
Back again with some news.

I've built a test board to interface this display and see what happen.
The board is based upon PIC16F874

This chip is 40pin dip has only 4k flash 192 RAM byte and 128 byte eeprom so is not powerfull but my goal was to have a simple test-bed without using any smd processor.

PORTD and PORTB are the system bus for receiving and trasmitting data and commands. PORTC carries the driving criteria (RD, WR, CS, and so on)
PORTA interface the touch controller.

I used the UART on board to build a simple terminal interface that allows me to connect to pc and send commands and print response from the TFT device.

I was supposing that TFT controller was R61509V so i grabbed the controller pdf and i implemented the signals handshaking upon the data sheet timing description

On my terminal i gave the command

R0000

which is Read Instruction Register 0000h
Response was "B509"
This confirm that this TFT board has R61509V as controller.

Then i played around with different registers on board following the data sheet since my terminal allows me to send command in the form

W0102:F9B0

which is Write 0xF9B0 on register 0x0102

The TFT is 240x400 and is quite complex since it allow to regulate many features about voltage level to drive lcd panel, image data format, bus lenght windowing and so on. After some experiment i've been able to have a clean and nice behaviour, with this command sequence

W0003:5030
W0007:0100
W0010:0010
W0103:1F00
W0280:CDFF
W0401:0001
W0102:F9B0

I implemented two function, the first F0202:xxxx
that fill the whole screen with the color xxxx in 16 bit RGB format 565
and the second function BARS that display standard color bars image

At this point i can say i am able to draw on display. To do something usefull now there is a need for some graphic library expecially to handle text fonts and draw primitives. It is simple to draw a line or to fill a region but to implement something complex we need many efficient routines.

My test board doesn't have enough memory space to store fonts tables and draw routines so my next goal is to use this board as an interface and leave complex task to some external processor PIC maybe pic32.

If someone is interested to have more information about the board or the display let me know.

:-) Enjoy, Fabio.

(20-01-2014, 06:43 PM)Morale64 Wrote: I Fabio, I have the same problem And i think that the LCD don't work whit serial interface, about the bl command you can use an high level to turn on the baklight, I have tryed And work fine. Have you solved other problem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)