QVGA Touchscreen TFT on TestBed

Ever wanted to program a stylish and easy to use GUI (Graphical User Interface) on mbed-powered embedded applications? Then this is for you:

/media/uploads/elmicro/mbed_tft_01.jpg

The ingredients

Let's have a look onto the requirements:

Hardware basis for the mbed

We're using our TestBed for mbed development board. This offers a socket for Arduino hardware expansions ("Shields"). As our display is actually an Arduino shield, this will fit nicely onto the TestBed.

An inexpensive and nice TFT with touch screen

Being a distributor of Seeed Studio, we got our hands on their QVGA (320x240) TFT display called "TFT Touch Shield". This is a real enjoyable LCD with bright colors, reasonable accurate resistive touch sensor and a fast, 8 bit parallel interface. The whole display comes with an Arduino footprint and all the necessary circuitry to be powered with just a 5V input voltage.

Some sophisticated masterpiece of software

Here your mbed porgramming skills come into play - we've already done the boring work for you and offer an example program with the necessary basic hardware library for free use. The pictures below illustrate the functionality of our example software:

Step 1: Calibrate touch screen Step 2: Calibration complete Step 3: Touch input test

Now what could you do with it? Perhaps creating a library for easy designing an intuitive interface with buttons, sliders, Drop-downs etc. Or hooking up a serial camera to your mbed and display the captured images.

Keen on playing around with "real" graphics? Connect mbed to external RAM (e.g. to FRAM modules from Ramtron), code some framebuffer algorithms and start displaying and rotating 3D-wireframe models onto the LCD!

Where to start

1. Get a TestBed for mbed

Locate you nearest Elektronikladen dealer here. Ask them for the TestBed for mbed development system (product nr. mbed/testbed).

2. Get a TFT Touch Shield

See 1. but ask them for the TFT Touch Shield by Seeed Studio. Our internal product nr. is s3ed/tfttsh.

3. Modify TestBed for mbed

Soldering skills required!

Please don't try to make your very first soldering exercise with your new TestBed! You'll need experience with desoldering small SMD parts from the board. If you don't feel ready for this task, please ask someone with the needed soldering skills.

As we had to make some compromises by combining the Arduino socket and the mbed module, we shared one of the analogue signals between Arduino socket and the trimmer poti. Unfortunately, this prevents the proper use of the X-axis of the touch screen. So you have to do some desoldering. By removing C3 and R34 you disable the trimmer and enable the correct X-axis readout of the TFT display. See the picture below to find the two SMD parts easily.

Location of C3 and R34

Finally, solder two 1x8 and two 1x6 female headers to make use of the TestBed's Arduino socket.

4. Put all together

Plug the mbed1768 into its socket with the USB connector facing down. Put the TFT Touch Shield in the Arduino socket. Hook up a 7,5..9V power supply with at least 1 amp of output drive capability (e.g. our acdc7510) up to the power input jack. Connect the mbed to your PC.

5. Start developing

Import the example program into your compiler and start the fun part!

Import programTFT_Touch_Shield

Library files for using Seeed Studio TFT Touch Shield for Arduino (ST7781R controller) together with ELMICRO TestBed for mbed. Featuring a short example program of how to calibrate the touch screen. Some basic drawing functions are also included (circle, rectangle, lines, text).

If you have any questions, feel free to contact us at support|at|elmicro.com. Comments are also welcomed!


Report

1 comment on QVGA Touchscreen TFT on TestBed:

14 Oct 2013

你好

Please log in to post comments.