262k-color qvga tft lcd screen pinout free sample

You may have noticed that I have a bit of a ‘thing’ for the little TFT displays that you can commonly get on ebay. There’s something satisfying about writing your own driver code and seeing one of these little panels come alive with your graphics.

I hand-routed the traces and designed it so that the FPC cable from the 24-pin connector would wrap-around the board so that the LCD could be mounted on the opposite side to the LED driver components, with the 2.54mm MCU interface pins sticking up next to it.

Whatever you do, do not connect this circuit directly to a device with 5V levels such as the Arduino. The inputs and voltages are not 5V tolerant. An Arduino could be used to interface with this LCD with the addition of a level converter.

So far so good. No reason to get too excited though, in the above photograph all that I’ve done is test that the backlight circuit works and that the LCD powers up. Clearly it’s working so far.

You can also see four white LEDs wired in series in a breadboard behind the LCD. I used this LED string to test the output of the constant current driver before actually connecting the LCD. That’s why my development board exposes the V+ and V- output and feedback pins from the LED driver.

With the LCD mated snugly to the development board using double-sided sticky pads that keep it clear of the traces on the back of the PCB we’re ready to start reverse engineering the bus protocol.

Right away we’re on to something. Trawling through my collection of datasheets for TFTs I can see that the Leadis LDS285 uses 04h as its read device identifier (RDDID) code. The first byte returned by these controllers is always a dummy read, the real data is the values 54h and 80h, with 54h being the manufacturer code.

A quick search of the online list of MIPI manufacturer ids shows that 54h belongs to Arasan Chip Systems, Inc. Arasan is not a familiar name to me but their website reveals that they are engaged in making vertically integrated MIPI chipsets, i.e. the LCD controller, camera, file system etc. that you’d need if you were building a phone. The worrying news is that Leadis, whom we suspect of being the controller manufacturer have gone bust. I’m guessing that there is some kind of licensing agreement going on whereby Arasan and Leadis have collaborated to create an integrated controller.

Some random googling shows that there is someone else who’s experimented with LCDs from similar models to this one and determined that they tend to be command-compatible with a controller called the Magnachip MC2PA8201. This controller is itself a cut-down version of the LDS285. I’m going to assume that this is the one and see how far I get. Now it’s time to write an stm32plus driver for it and see if we can it to work!

The controller is documented to support colour depths up to 24-bit but this LCD will not go higher than 262K colours. Attempts to use 24-bit mode results in display corruption. This is not surprising given that the phone specifications are for a 262K colour display. Colours transferred in 262K mode must have their lower 2-bits zeroed.

Either some of the colours are verboten or this cheap LCD has problems with a very small subset of colours. Very rarely an attempt to write a run of a certain solid colour will result in weird corruption. This is odd because adjusting the colour by only 1-bit will correct the problem.

stm32plus 1.1.2 comes with drivers for the 64K and 262K colour modes for this LCD. You can see my usual demo sequence that exercises the capabilities of both the LCD and my graphics library in the video below.

The key to getting any of these TFT devices up and running is the initialisation sequence, i.e. what you have to do after power-on in order to get the display powered up and ready for commands. To help you on the way, this is the basic sequence for this controller. The extract is from the stm32plus driver, but the code should be self-explanatory.

262k-color qvga tft lcd screen pinout free sample

In this guide we’re going to show you how you can use the 1.8 TFT display with the Arduino. You’ll learn how to wire the display, write text, draw shapes and display images on the screen.

The 1.8 TFT is a colorful display with 128 x 160 color pixels. The display can load images from an SD card – it has an SD card slot at the back. The following figure shows the screen front and back view.

This module uses SPI communication – see the wiring below . To control the display we’ll use the TFT library, which is already included with Arduino IDE 1.0.5 and later.

The TFT display communicates with the Arduino via SPI communication, so you need to include the SPI library on your code. We also use the TFT library to write and draw on the display.

In which “Hello, World!” is the text you want to display and the (x, y) coordinate is the location where you want to start display text on the screen.

The 1.8 TFT display can load images from the SD card. To read from the SD card you use the SD library, already included in the Arduino IDE software. Follow the next steps to display an image on the display:

In this guide we’ve shown you how to use the 1.8 TFT display with the Arduino: display text, draw shapes and display images. You can easily add a nice visual interface to your projects using this display.