Display hx8347l

hi, I am another unfortunate soul to possess hx8347l display. I am creating a project with the Arduino Mega 2560 to control, led, reciprocating pumps, temperature of a marine aquarium. I read the post where he describes the same problem with this bloody display that stays with white screen. I downloaded different libraries and followed the file changes but I can not make it work in any way. I kindly ask you, help explaining step by step the procedure and what libraries to use.
thank you for the time you have dedicated to me.

It "looks" as if your Display is 16-bit Mega2560 Shield.
Please confirm that the photo of the pcb matches the Display that you received.
Some of the "other" photos in the link show different items.

UTFT only supports the HX8347-A

#define ITDB32 0 // HX8347-A (16bit)

However, the HX8347-A is completely different to the HX8347-D, HX8347-G, HX8347-I.

You could probably edit the UTFT driver to suit the HX8347-I.

MCUFRIEND_kbv can support HX8347-I but you need to make several edits:

#define USE_SPECIAL             //check for custom drivers


#define USE_MEGA_16BIT_SHIELD     //RD on PL6 (D43)


#define SUPPORT_8347D             //HX8347-D, HX8347-G, HX8347-I +520 bytes, 0.27s

And since your Shield is write-only, you can not read the ID. So every sketch needs:

tft.begin(0x9595);    //force the ID for HX8347-I

The MCUFRIEND_kbv library is designed for Uno Shields. I am sorry that you have to make all the edits for a 16-bit Shield.

Please let me know how you get on. I do not own a HX8347-I. As far as I know, most HX8347-I users have got an 8-bit interface.

You can install MCUFRIEND_kbv via the Arduino Library Manager.
You can download UTFT.zip from Henning Karlsen's site and "install ZIP" from the IDE.


Edit. Add a link to the OP's Ebay item.

thanks for the info, I'll try tomorrow this procedure, correcting and making the changes. I will let you know if it works .. GitHub - arekjan/UTFT: UTFT library modified to support HX8347-I

I also tried this library, GitHub - arekjan/UTFT: UTFT library modified to support HX8347-I. I made some changes, but the result does not change ... white screen. I am wrong some step or I decided to make me mad.

I edit the file in UTF folder, open the program Arduino 1.6.10 use the library UTFT - examples - Arduino (AVR) and open the sketch UTF Demo 320x240, modify the parameter UTFT myGLCD, inputting (HX8347I, 38,39,40,41 ), click the button loads and displays the following error:

UTFT_Demo_320x240: 33: error: expected ',' or ';' before 'void'

void setup ()


exit status 1
expected ',' or ';' before 'void'

What should I change in order not to see the error?

I gave advice for "my" MCUFRIEND_kbv library. I obviously know the details of this.

I suggest that you try MCUFRIEND_kbv first. Unfortunately, this is a bit fiddly. But I do know that there are several successful HX8347-I users.

I explained that HX8347-I is different to HX8347-A. I could write the appropriate HX8347-I "initlcd.h" for UTFT on your behalf. However, Henning Karlsen is the UTFT author. It is not wise for me to change / adapt / modify his work.


sorry for yet another silly question, I downloaded the library MCUFRIEND_ KBV but I can not figure out what to enter in parameters to change.


#define USE_SPECIAL             //check for custom drivers

amend paragraph writing what?


#define USE_MEGA_16BIT_SHIELD     //RD on PL6 (D43)

amend paragraph writing what?


#define SUPPORT_8347D             //HX8347-D, HX8347-G, HX8347-I +520 bytes, 0.27s

amend paragraph writing what?
tft.begin(0x9595);    //force the ID for HX8347-I

amend paragraph writing what?

All those defines are commented out by default.
Your edit simply means removing the //

Remember to save the files after the edit.

The tft.begin() statement will be in setup() of most sketches.
You must force the correct ID. e.g. tft.begin(0x9595);


thanks for the explanation, I provide now to change. and sorry again for the stupid questions, but as you'll see I do not understand much, actually nothing. :smiley: The programming is not for me.

I made the changes to the file uploaded the sketch "graphictest-KBV and generates the error:
avrdude: stk500v2_setparm (): failed to Set parameter 0x9e
avrdude: stk500v2_command (): unknown status 0xc8
avrdude: initialization failed, rc = -1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_command (): unknown status 0x01
Error loading the sketch
avrdude: stk500v2_disable (): failed to leave programming mode

I suggest that you try the Arduino again after you and your PC have had a good night's sleep.

The Arduino and Windows are not happy if you unplug the MEGA2560 when the Serial Terminal is running.

  1. Close the Serial Terminal.
  2. Unplug the MEGA2560. Connect Shield.
  3. Re-plug the MEGA2560.
  4. Open the Serial Terminal.
  5. Upload a sketch.


I know that you were quite right, windows was already in dreamland, I continued to ask, but he did not answer. This morning I tried it on another pc and like magic the display is in color, :o :smiley: it appears drawings and lines .. I should insert the touch function?!? :confused:
Many thanks for the help. :wink:

Woo-hoo. So is everything working now?

The Mcufriend Uno Shields have a Resistive Touch Panel which shares pins with the TFT.
Your Mcufriend Mega Shield has an intelligent Touch controller chip i.e. XPT2046

You need a suitable library e.g. UTouch.h, URTouch.h, XPT2046.h, XPT2046_TouchScreen.h

The Touch should work fine.
The microSD will be UNRELIABLE.


to display it on for now only view a play of lines, tomorrow URtouch load the library from another PC, why this continues to give errors, and work there is to.
thank you

Please verify whether graphictest_kbv sketch works.

  1. readReg() will fail. you are write-only
  2. readID() will fail. you are write-only. It will always return 0xD3D3
  3. Software Scroll will fail because readPixel(), readGRAM() will fail. you are write-only.

Colours, Lines, Shapes, Rotations, Text, Vertical Scroll, Band Scroll, should all work perfectly.

There is no point in investigating Touch until the screen is displaying properly.


The display works, I Submitted The Library URTouch, and Without calibration, I can instead to distance display on screen data and now, I Uploaded the sketch DS1307 Checked the CONNECTIONS, and pins, MA compare Shield White Again, if you come delete The previous sketch. Apologizes for mail stupid and Trivial Questions, to see written, time and data display LiquidCrystal I use the library? What a load every time I see a new sketch white screen! Still excuse for Questions Trivial.
Thank you

Please attach your sketch.

DS1307 and a Touch Display are standard components.
Another member could build and run your sketch and debug it for you.

The TFT shield plugs into your Mega2560.
The DS1307 connects to the SDA, SCL pins. Use some angle header pin strip to fit between shield and Arduino to access SDA, SCL.

Oh, why not write your message carefully in Italian? Then ask Google to translate it to English for the Forum.


Ok, traducevo io il messaggio :slight_smile:

Il modulo rtc é questo: http://www.electronicoscaldas.com/temporizadores-relojes/750-modulo-rtc-con-ds1307-y-memoria-eeprom.html
Ho collegato:i pin 20 al pin SDA, il pin 21 al pin SCL , il GND al pin GND, il pin VCC al pin 5v.

Ho scaricato sia la libreria Ds1307 che la libreria RTClib.master, caricando lo sketch non da errori, visualizzo solo il display bianco.
Grazie tantissimo per la pazienza.

Google Translate says:

Ok, I was translating the message :slight_smile:

The rtc form is this: http://www.electronicoscaldas.com/temporizadores-relojes/750-modulo-rtc-con-ds1307-y-memoria-eeprom.html
I connected: pins 20 to the SDA pin, the pin 21 to pin SCL, GND to GND pin, the pin VCC to pin 5v.

I downloaded both the DS1307 library that the library RTClib.master, uploading the sketch have not errors, just the white display visualize.
Thank you so much for your patience.

That looks fine. My Shield has got a chip near the D20, D21 pins on the Mega. But I can fit some angle header pins ok. Put some plastic tape over angle pins.

Please post (or attach) your sketch.


Come si vede in foto lo sketch non da errori, a caricamento ultimato visualizzo lo schermo bianco.

Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include <Wire.h>
#include "RTClib.h"

#if defined(ARDUINO_ARCH_SAMD)
// for Zero, output on USB Serial console, remove line below if using programming port to program the Zero!
#define Serial SerialUSB

RTC_DS1307 rtc;

char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

void setup () {

#ifndef ESP8266
while (!Serial); // for Leonardo/Micro/Zero

if (! rtc.begin()) {
Serial.println("Couldn't find RTC");
while (1);

if (! rtc.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
rtc.adjust(DateTime(F(DATE), F(TIME)));
// This line sets the RTC with an explicit date & time, for example to set
// January 21, 2014 at 3am you would call:
// rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));

void loop () {
DateTime now = rtc.now();

Serial.print(now.year(), DEC);
Serial.print(now.month(), DEC);
Serial.print(now.day(), DEC);
Serial.print(" (");
Serial.print(") ");
Serial.print(now.hour(), DEC);
Serial.print(now.minute(), DEC);
Serial.print(now.second(), DEC);

Serial.print(" since midnight 1/1/1970 = ");
Serial.print("s = ");
Serial.print(now.unixtime() / 86400L);

// calculate a date which is 7 days and 30 seconds into the future
DateTime future (now + TimeSpan(7,12,30,6));

Serial.print(" now + 7d + 30s: ");
Serial.print(future.year(), DEC);
Serial.print(future.month(), DEC);
Serial.print(future.day(), DEC);
Serial.print(' ');
Serial.print(future.hour(), DEC);
Serial.print(future.minute(), DEC);
Serial.print(future.second(), DEC);


Spero di aver fatto corretti i collegamenti.