You are viewing an older revision! See the latest version

TFT LCD with HX8347

The 3.2” inch TFT LCD module integrated a Himax HX8347-A TFT LCD controller.


#include "mbed.h"
#include "LCDTFT.h"

BusOut     MyBus(p13,p14,p15,p16,p17,p18,p19,p20,p30,p29,p28,p27,p26,p25,p24,p23);
LCDTFT     MyLCD(p5,p6,p7,p22,p21,&MyBus);

int main(){
    MyLCD.printf("Hola mbed!!!");


Import programLCDTFT_Library

Example of using library LCDTFT



  • FillScreen
  • Point
  • Line
  • Rectangle Filled/No Filled
  • Circle Filled/No Filled
  • Text, font 5x7
  • Printf
  • Draw Image BMP24-bits

Import libraryLCDTFT



26 Feb 2011


03 Mar 2011

Hi, which pins in shield correspond to RD, WR, RS, CS and RESET? Tanks

03 Mar 2011

Vitor M wrote:

Hi, which pins in shield correspond to RD, WR, RS, CS and RESET? Tanks

/** Crea LCDTFT interface
         * @param RD    
         * @param WR     
         * @param RS
         * @param CS
         * @param RESET
         * @param BusLCD (16-bits) 
        LCDTFT(PinName PIN_RD,PinName PIN_WR,PinName PIN_RS,PinName PIN_CS,PinName PIN_RESET, BusOut *BUSLCD);
05 Mar 2011

Hi, my question are the fisical pins in the shiel, I bought one of this but seems to have diffenrent configuaration on pins . Pins 21 to 26 are for the touch control, from 27 to 34 are DB0-DB7 and 38 RD Can you confirm this? I´ve connected my tft but it´s happening something strange, when I do a reset on mbed TFT goes black, that it starts slowly to become withe, than stays withe

Any ideia? Tanks

20 Mar 2011

Hi, it is the same for me, LCD is not working. checked my connections as well

20 Mar 2011

Hi Vitor, I believe your LCD has a different controller, although they look similar.

check this link*240-With-Touch-Shield-%28Arduino-Compatible%29

23 Apr 2011

So, where can this particular LCD be purchased?

18 May 2011

May you send me the PCB drawing, please?

12 Sep 2011

Hey There's a new GREAT serial LCD board for development, doesn't require all the 16-24 pins of the mbed like the LCD mentioned here, it just need TX and RX, and could be mounted on a standard breadboard!, VERY EASY!

Check out more here:

Some Features:

• 2.4“ LCD capable of displaying 262,144 colors. • Easy 5 pin interface to any host device: VCC, TX, RX, GND, RESET. • On-board uSD/uSDHC memory card adaptor compatible with FAT(windows PC), Support up to 4GB for storing images and text. • Integrated Touch screen driver(controller), 10 bit accuracy touch. • Sleep mode. • 2 General purpose Digital Output pins on board. • BaudRate speed up to 2Meg bps, 8 bits, no parity, 1 stop bit. • 5V and 3V3 I/O compatible,3V3 power supply. • External reset switch

13 Sep 2011

Hello Emmanuel,

thanks for promotion of new homepage. It seems this is your product and homepage. Please promote some real view picture of display, so that I can see qualitity of display and resolution. Have you realized some menues or pictures on display? Thanks.

16 Sep 2011

Hi Dirck

Of course I have pictures and menus and all kind of applications, check our cookbook page and there's a video of an ipod like application made on SMARTGPU, all the source code and library are available too!

16 Sep 2011

Another option is to use eg the MCP23S17 in the data bus, allowing work to 10MHz Clock in SPI. It greatly reduces the number of pins used and you get good data transfer speed. Cheapest option.

30 Oct 2011

Unable to get this to work. Using a 3.2" lcd display with a HX8347A controller and verified my connections.

14 Dec 2011

Looks like this library is actually for the SSD1289, judging by the init code. Luckily my LCD is an SSD1289. Funny thing is that the eBay auction I got it from claimed it to be a HX8347.

I couldn't get it to work without a delay between the WR toggle:

void LCDTFT::vLCDTFTWriteData(unsigned short Data){
    short i;
    for(i=0; i<9; i++) {
    LCD_PIN_CS =1; 

.. probably because I am using a breadboard, which has unwanted capacitance etc. It won't work for any loop value less than 9!

04 Apr 2012

I have the same tft with controller SSD1289, its working fine with the library when trying to write text,drawing circles or rectangles , but unable to display bitmap image. i tried to copy the bitmap image with name "IMG0.BMP" into the mbed usb folder.

but i did n`t get any image displayed. if anyone know how to display image please guide me.

25 Aug 2013

Sorry, someone already put the lcd working properly? My lcd is used in the same image, is connected in the same way and no sign ... Please someone who has already achieved to help me. Thank you