TFT LCD displays - Serial Driven ?

srnet

Senior Member
There are quite few cheap TFT LCD Colour touch screens appearing these days in the 2" - 4" sizes on eBay.

No doubt because they are manufactured in such large volumes for modern mobile phones.

Does anyone know if there are any that can accept serial (RS232\TTL) input as a means of using these displays as text displays ?

Not so much interested in the graphics\colour side, but a portable and battery operated screen that can display a fair amount of text would be good.
 

eggdweather

Senior Member
I know that many are formatted to fit an Arduino shield and UNO pin-out. Also that many use the SPI protocol that the PICAXE can provide, but I think the biggest problem is getting a reliable pin-out of the display. I'm sure the displays used with the RPi use the RPI bus, so perhaps worth a look.
 

geoff07

Senior Member
I'm working on a driver prog that allows you to send serial commands (similar to the RevEd displays) to write text in various sizes and shapes and colours. It uses a 28X2 to drive an SP! tft display (240 x 320). The 28x2 has spare capacity so could be used for other things as well. Some info with pics is on my blog. The prototype works, I'm in the process of optimising a small pcb for a dedicated driver, though life keeps interfering.

The ones that I use have an ILI9341 driver within them (it must be very tiny) and are driven by SPI. They don't have fonts built in but my driver has a 5 x 8 font that can be used in various sizes, and it would be easy enough to make a bigger font if you had additional eeprom to put it in.
 

srnet

Senior Member
Not cheap but should do what you want. Considering the features, the price really is not that bad.

http://www.4dsystems.com.au/product/uLCD_24PTU

Currently out of stock at manufacturer, but there could be distributor stock somewhere.
I came across that in my searches, but I had the impression it was more a development system and that to make it do what I wanted, a simple serial text type LCD, I would need to develop the code myself.
 

geoff07

Senior Member
I use slot 0 for the font data and code that loads the shared scratchpad, and slot 1 for the driver code. Plus there are about 10 i/o pins not used. I wanted the 28x2 part for the large scratchpad. It might be possible to use a smaller chip if the font was in an eeprom, which I have tried but that was slower than the scratchpad.

One of the issues with the ILI9341 seems to be the lack of examples of efficient coding. The only examples I have found, and my own code too, works on a pixel by pixel basis. This makes large graphics very slow, though fine if used for background and not changed much. The datasheet teases a little about images but it isn't clear that anything faster is possible. The C library that can be searched for is very basic.
 

Goeytex

Senior Member
I came across that in my searches, but I had the impression it was more a development system and that to make it do what I wanted, a simple serial text type LCD, I would need to develop the code myself.
I don't think so. Certainly there are some initialization commands . But after that you can just send serial commands to print the text on the screen. Not much more difficult than a simple LCD display. However, if you choose to use the development environment you can do all kinds of fancy stuff, like save lines or pages of text on an SD Card and call them up with simple commands. You just have to read the datasheet to see various modes and possibilities.
 

MartinM57

Moderator
Even more expensive the e.g EA eDIPTFT43-A from mms-e.co.uk (under the "LCD Displays" tab)

In fact so expensive, they don't even put the prices on that site any more - budget around £200+ for a 4.3" touch sensitive version. Other suppliers are available (just Google)

They are very good though....
 

geoff07

Senior Member
Whereas my approach can be done for a few dollars! 320 x 240 is QVGA, and the code is of course scaleable as dimensions increase, so before long we will have VGA screens and 260,000 colours on a picaxe. Then it will be time for a much faster Picaxe (if it isn't already).

The SD card thing is interesting, as the cheap displays come with an SD card slot but we don't have code that can handle the filing system.
 

Goeytex

Senior Member
Whereas my approach can be done for a few dollars!
With all due respect, it does not appear that you have a tested product that is ready to ship.

"...Then it will be time for a much faster Picaxe (if it isn't already).
As long as Picaxe uses interpreted basic it will never be "much faster" no matter what PIC is used. I would not hold my breath waiting.

Any "fast" graphics display solution for a Picaxe now and into the foreseen future will require a separate graphics engine to attain good speed.
 
Last edited:

geoff07

Senior Member
I'm not trying to make a tested product to ship or do anything terribly fancy. But you could have, today, a multiline text display with colour graphics that works easily with a Picaxe, has completed and working code, and just needs your hardware implementation (simply a 28X2 and a few components). I can even supply an Eagle schematic and board design. When I have made a couple more prototypes I will be putting all this on my blog in case of interest to anyone.
 

srnet

Senior Member
Geoff,

Do you have a feel for how fast you can wirte to the display, in baud, if you were using it as a serial type display ?
 

srnet

Senior Member
There are similar demonstrations for most of the platforms.

However, you still need to write the routines that allow the dispaly to be used as serial input one, cursor move commands, font changes and the like.
 

Goeytex

Senior Member
It appears that Matherp is proselytizing for Micromite. (Again)

For clarity ... the display demo provided by Matherp is with a Micromite and apparently uses C Code functions to get the speed. The Picaxe does not support C functions or in line assembly, so the demo is irrelevant to this thread.

I'm pretty sure that this thread is about interfacing a display with a Picaxe.
 
Last edited:

matherp

Senior Member
=Converted preaching ...?
Perhaps a little bit :) The video is showing a demo I wrote for the Micromite.

However, if you follow the links under the video there is full code available. The important bits are in C but I write C as Basic with C syntax so it should be easy enough to follow and port to Picaxe.

The display in the demo is SPI so it should run fine from the Picaxe - it runs write-only at 12Mbs with no wait states needed.

The important bits for speed are in the colourrect routine. Basically, on the ILI9341 (and most of the other TFT controllers around) you can set a sub window within the main display, for example a 8x6 pixel area (a character). Then you can write the colour codes within this area without any further cursor positioning. My routines do this by preparing the character in memory as a sequence of pixels (16-bits each for RGB565 colour) with either the foreground or background colour set. These can then be written out continuously and will fill the pre-defined area top-left to bottom right, with the cursor wrapping to the next line automatically.

The same technique is used to draw filled rectangles and horizontal and vertical lines and fill circles and triangles. For diagonal lines and circle outlines there is no alternative to individual pixel addressing.

There is a lot of code in my routines allowing for screen rotation and character rotation. If you only allow text to be written upright then it can be hugely simplified.

The display in the video also has an SPI touch controller chip (XPT2046) which makes touch input very easy - the code for this is written in Basic so easily portable.
 
Top