TFT colour display development - TftAVR

We now have a fully working 480x272 colour TFT display with touch panel..

The TrxAVR code to drive these display was developed using an eDIPTFT43-ATP 480 x272 intelligent
colour display from Electron Assembly. These cost 200ukp.

The initial development using the EA display is described further down this page

Achieving a low cost TFT display

We have developed our own driver board in order to reduce costs and use the 480x282 colour TFT
displays which can be abtained on eBay for as little as 20ukp. Such displays are of identical size
and resolution to the EA display and have a touch panel. They are mass produced for use in GPS
navigator units etc. The total cost depends on eventual pcb costs but could be as low as
20ukp + PCB cost + display cost.

This controller board project is named TftAVR.

There is the need to load fonts etc into the flash memory on the controller board (both for EA and TftAVR).
This can be done in a single operation from Hobcat.
                                
(route is:   PC file > Hobcat > USB > TrxAVR > I2C > TftAVR )
This has removed the need for a separate programmer (thus keeping costs down)

Epson S1D13781

TftAVR uses Epson's latest display driver chip, the S1D13781. The development was done one samples
which were begged from Epson agents before the chips were commercially available. (there was a non-fatal
bug in Epson's initial production run and so these were made available as samples for developers.
We had some anxiety concerning when the chips would be commercailly available.
However, in early Decemeber, Ian was informed that Rutronic had 200 avaiable in Germany and so bought
the first 30 to arrive in the UK (5.70ukp). They were distrubuted them amongst the developer group members.
We are certainly using state-of-the-art technology!
The photo below was viewed with a great sense of relief that we could in fact get hold of these chips!!!:

      

 

TftAVR controller board

The images below are of the prototype TftAVR board.
Its componets include:

When will it be available ? ... not sure - maybe 3 months ???

There are residual problems with touch panel noise whcih may influence design of the
production board.
Final decisions on whether to have multiple display connectors have not yet been made.
(some displays have a 45 way ribbons cable rather than 40 way)

 


TftAVR top-side. ATXmega128A1 on the left. Epson S1D13781 on the right

 


TftAVR underside - 4Mbyte flash memory on the left

 


TftAVR driving a Truly 480x272   4.5inch display panel. (button background colours need modification)
Recently, Glenn has noted that the appearance is much better with the display upside down.
Fortunately, the S1D13781 has a switch to rotate the image through 180deg without the need of any other
programming change!!

 

Initial development


The display above shows most of the TrxAVR-Picastar display features.
It is shown mounted on an optional USB programmer back-board from EA.

For more screenshots from TrxAVR-Picastar see:   Colour TFT screenshots.

This display is an eDIPTFT43-ATP 480 x272 intelligent colour display.
It was purchased in the UK from MMS Electronics (supply of displays from Electronic Assembly).
The cost is 180ukp + VAT (plus 20ukp for the USB programmer ... if purchased with the display)

A blank (unpopulated) backboard - (same as the USB programmer) can be purchased for  11ukp.

This web page describes:

eDIPTFT43-ATP 480 x272 intelligent colour display.

The display data sheet is: http://www.lcd-module.de/eng/pdf/grafik/ediptft43-ae.pdf

This is an excellent piece of kit ... and I cant find anything else like it on the web.

Hardware:
Most colour TFT panels (including those on offer on eBay) have a RGB scanning interface - typically
a 6 bit connection for each of Red green and Blue.
They are not intended to be connected direct to a microcontroller.
An interface chip is needed with an 8 bit microcontroller interface, display memory and scanning hardware.
Epson provide a range of such controllers.
TrxAVR-Picastar could drive such a controller .... but the eDIPTFT43-ATP makes things much easier.

The eDIPTFT43-ATP hardware includes:


Rear view of display. The chip with the label is an ATmega1280.

It has interfaces for:

TrxAVR-Picastar uses the I2C interface.
I2C allows bidriectional inter-processor communication using a simple two wire connection.
Eight devices can be paralleled on the bus. TrxAVR's 24LC512 eeprom is hard-wired to address 0.
The EA display defaults to address 7.

In my test rig, I interposed an additional turned pin 8-way DIL socket beneath the 24LC512 eeprom
and soldered wires to the clock, data and ground pins.
Glenn's boards provide a four pin socket for I2C.

Interfacing

The display is driven by simple ESC command sequences which can be ASCII text or binary.
I have chosen the use ASCII text.

For example:

TrxAVR-Picastar code contains functions to generate these commands from the C code:

Display Flash memory:
The display's 4Mbyte flash memory can be used to store fonts, macros (command sequences), fill-patterns, images etc.

Macros
Macros are command sequences that are programmed into the display flash memory.
The macro language supports C type arithmetic manipulations.
There are no loop structures, but the use of the i++ structure as in C allows repetive tasks to be generated
quickly by copy and paste. eg: from file trxavr.kmc

   ;DSP monitor cailbration mark, two pixel vertical lines
   ; top and bottom of each bar
   i=1
   #GD L+X2+20*i,y,L+X2+20*i,y+2
   #GD L+X2+20*i,y+GS-2,L+X2+20*i++,y+GS-1
   #GD L+X2+20*i,y,L+X2+20*i,y+2
   #GD L+X2+20*i,y+GS-2,L+X2+20*i++,y+GS-1
   #GD L+X2+20*i,y,L+X2+20*i,y+2
   #GD L+X2+20*i,y+GS-2,L+X2+20*i++,y+GS-1
      
etc.......

The above is a sequence of identical command pairs.
The i++ increments i for the next pair and so simulates the effect of:    for i = 1 to n

For illustration purposes, links to the two macro-language files are here.
( Do not use these links for flash programming as they might not be the latest)
     trxavr.kmc          trxavr_font.kmi       ( *.kmi signifies a file 'included' in a *kmc file)

In the TrxAVR-Picastar C code, a macro sequence is simply called by:

         etcMacro(n)      where n s the macro number.

Fonts
The display comes loaded with eight fonts - two of which are big fonts for numerics (and +/- ) only.
The EA software kit includes   FontConvert.kmc   which will convert any Windows font into a *.FXT bitmap file
for use in the display.

TrxAVR-Picastar uses Arial14, Arial16, Arial18 and Arial20 for most of the text
and OldSansBlack 42 and 28 for the frequency display.

Programming the display flash memory

The flash programming code is in a zip file on the downloads page. This is also distributed by HobcatSetup.exe.

The picture below shows the display mounted on EA's USB programmer board which is mounted on my
test rig. This USB board is unsuitable for use in a rig because it is taller than the display and has a USB-B
connector sticking up from the top. USB programming required that the dipslay be disconnected for I2C
and a hard reset was then needed.


Display mounted on USB programmer mounted on my DS PCB test rig.
(That's reflection on the screen - no a blister!!)

It is possible to program the display via I2C.
I have therefore added a TFT flash programming option to Hobcat.

   

The flash file    travr.DF   is generated by the compile button in the EA Kit Editor software.
(An error report occurs because te USB programmer is not found)
trxavr.DF is currently 109kbyte. Hobcat transmits it to TrxAVR via USB and then TrxAVR
send it via I2C to the display.
- so you dont need the USB programmer and there is no interface mode switching needed.

TrxAVR-Picastar home page