You are viewing an older revision! See the latest version

4D SGC TFT Screen

In construction

Presentation

This page presents a library to use a 3,2" touch screen from 4D Systems (http://www.4dsystems.com.au/) in Australia. The screen details are :

  • Low-cost LCD display graphics user interface solution.
  • 240 x 320 QVGA resolution, 65K true to life colours, TFT screen.
  • Display Viewing Area: 48.6 x 64.8mm
  • Integrated 4-Wire resistive Touch Panel.
  • Easy 5 pin interface to any host device: VCC, TX, RX, GND, RESET.
  • Asynchronous hardware serial port, TTL interface, with 300 baud to 256K baud.
  • Powered by the 4D-Labs PICASO-SGC processor (also available as separate OEM IC for volume users).
  • On-board micro-SD memory card adaptor for multimedia storage and data logging purposes. HC card support is also available for cards 4Gb and larger.
  • DOS compatible file access (FAT16 format) as well as low level access to card memory.
  • Dedicated PWM Audio pin supports FAT16 audio WAV files and complex sound generation.
  • On-board audio amplifier with a tiny 8 Ohms speaker for sound generation and WAV file playback.
  • Comprehensive set of built in high level graphics functions and algorithms that can draw lines, circles, text, and much more.
  • Display full colour images, animations, icons and video clips.
  • Supports all available Windows fonts and characters (imported as external fonts).
  • 16 x General Purpose I/O pins. Upper 8 bits can be used as an I/O Bus for fast 8-bit parallel data transfers.
  • 2 x 30 pin headers for I/O expansion and future plug-in daughter boards.
  • 4.0V to 5.5V range operation (single supply).
  • Module dimensions: 55.1 x 77.0 x 13.8mm (not including mounting tabs).
  • 4 x snap-off mounting tabs with 3mm holes for mechanical support.
  • RoHS Compliant.

/media/uploads/Kerpower/p1254239816.jpg /media/uploads/Kerpower/p1254239844.jpg

Connecting the sreen

You will need to power the screen with 5V. Beware some screens need more power than the computer USB can provide. For my screen, I had to use an external 5V source. If you use an external power source, make sure the mbed ground and external power ground are linked otherwise the serial commands will not be received correctly by the screen. Use one of the three Serial pairs of pins (p9, p 10) (p13, p14) or (p27, p28) from the mbed to connect them with the screen Use one pin for reseting the screen

4DGL Library

You can import the 4DGL library from here :

To use it, you just have to insert the header file TFT_4DGL.h in your main.cpp and create an object using the TFT_4DGL class.

#include "mbed.h"
#include "TFT_4DGL.h"

TFT_4DGL my_screen (p9, p10, p11); // serial tx, serial rx, reset pin;

All wikipages