Programming Due with TFT LCD issue

Hey all, new to the forum, I picked up a due and a 5" tft lcd display and I'm almost immediately running into a problem.

by itself, the Due seems to work fine, I can upload sketches, everything works fine.

if I connect the display, the computer can't detect the DUE, no Arduino found on COM3 messages. I can unplug the LCD,and then download a sketch, then plug the LCD in and hit reset and everything works. however if I hit reset again it appears that the sketch gets erased. I have to download again

I'm digging.. and I think I've found something, but need some guidance here: per the Due spec: Programming port: To use this port, select "Arduino Due (Programming Port)" as your board in the Arduino IDE. Connect the Due's programming port (the one closest to the DC power jack) to your computer. The programming port uses the 16U2 as a USB-to-serial chip connected to the first UART of the SAM3X (RX0 and TX0)"

well, the LCD display also uses RX0 and TX0 and I think what is happening is I might be hitting a situation where I'm getting the soft erase caused by the LCD resetting. I also think the fact that both are using RX0 and TX0 are causing me the upload issues.

any ideas? I'm going to dig some more but I'm wondering how hard it is to move the LCD to RX1 and TX1 aside from changing the pins which would be trivial....

well.. it doesn't appear that TX0 and RX0 actually go anywhere on the shield. Pins are there however no connectivity.. so scratch that idea... hmmm...

Suggest using AC/DC power supply, 9V/1A does the job. It would be helpful to let us know specifically what shield and TFT you are using.

UTFT myGLCD(*****, 25,26,27,28);

Would be a good place to start. Swap ***** for CTE50 or CPLD depending on which display you have.

If it is a CTE shield or cheap Sainsmart rip-off of a CTE shield, you will need to uncomment line 3 in \UTFT\hardware\arm\HW_ARM_defines.h

If you are using the Sainsmart bastardised versions of Hennings UTFT libraries, get the real ones from here. UTFT Libraries



Thanks for the reply back,

I saw it just as I was logging in to post that I read in another forum ( LCD displays ) some people with issues where the LCD drew too much current for the USB to adequately power both the Arduino and the LCD.

Turns out this was it, Added a 10.5 Volt supply to the DC input and things are working perfectly now.

It was a sainsmart due/shield/TFT combo that I grabbed. Wanted to mess with something dirt cheap before I bought the real thing. I haven't been using their libraries though, went straight to the source for UTFT and UTOUCH and those seem to be working as I'd expect.

Anyway, Thanks again for the response.

Excuse me mattnew, which controller is on your TFT? Is it a CPLD (MD050SD)?

I have a 7" Sainsmart CPLD (MD070SD) and I can't make it work with a shield and a Due, so if someone reads this message and has a similar screen working (even without shield) please let me know, I'd like to see the software.


My post on 18th December is equally relevant to you! ‘someone’ already gave you your answer!


A 5" LCD will draw FAR more power than the USB port can provide....

Regards, Ray L.


Sorry, I've read your reply only now; thnk you for your post, but I have some doubt about the fact that my problems depend only on the applied power.

In fact, I tried to connect the screen directly to the Sainsmart Due (excluding the shield) and I provided the power via a programmable PSU (5 VDC, 3.3 VDC and GND to the screen via its pins, 9 VDC and GND to Due), and it behaves as usual (a mess).

Anyway, can you confirm that a SainSmart CPLD (MD070SD or MD050SD, NOT SSD1963) CAN be driven by the original UTFT library?


apaolini: Anyway, can you confirm that a SainSmart CPLD (MD070SD or MD050SD, NOT SSD1963) CAN be driven by the original UTFT library?

Actually, no, sorry, I CAN however confirm a CTE 5"CPLD and CTE shield work with unmodified UTFT library and DUE pefectly as expected.



Thank you anyway; as you can see in my original post Sainsmart CPLD screen, Due and UTFT the CTE 7" works perfectly (by the way, with the USB 5VDC only), but the Sainsmart screens don’t. I’d like to know if anyone ever succeeded in this.

A friend of mine had a Sainsmart 7" CPLD display, the LCD worked fine, the touch did not. Sainsmart is more trouble than it is worth! Return your display.



Edit: I just read your original (long) post, you have had quite a time of it! My advice stands, return the display and get a CTE display, that will resolve ALL of your current problems. It is annoying/amusing/frustrating the number of newbies that end up in these forums AFTER they bought some Sainshit product or other… And all to save a few dollars (28th Jan price on $69.98 inc p&p for CTE or $63.99 for Sainsmart CPLD 7") all this time and effort is simply not worth your $6!

Thank you Graham,

the problem is that being in Italy I prefer buying from european eBay sellers to avoid customs expenses, so at that time there were no CTE, only Sainsmart. Moreover, I need two screens for my project (a billiard scoreboard), and now I got both for the price of one... if only I could make them work :D

I'm late to return them, so if you could ask your friend what libraries used with his screen, I'd really appreciate. Then, if he confirms he used the original UTFT (in which case I'd like some details), or if I'll have troubles with the touch part, I'll throw them through the window!

Regards, Andrea

Hi Andrea,

I don't need to ask him, as I helped him from the start when his display first arrived. Originally he was using the Sainsmart modified UTFT libraries, I suggested he download the genuine UTFT libraries, we got the display working fine, but the touch functions were inverted and as such, UTFT_Buttons would not work properly.

I am sorry to hear you now have 2 of the Sainsmart displays, but could you not advertise them on ebay at a reduced rate to move them on, and then when you get some money back, get 1 genuine CTE display from wkws20 (Coldtears ebay name)?

I live in the UK and have ordered plenty of stuff from Hong Kong and China, and touch wood, so far I didn't pay any customs fees, maybe I have just been lucky? Very often the customs declarations just say value $10 gift, even though that is clearly not the case :P.



Dear all, I know this is an old post but I thought I would provide an update. I would agree with others that probably best to go for the more expensive, and likely more reliable options.

If you have bought a Sain"Smart" (You may want to replace Smart with shi%^#...) these are the steps to get the screen AND touch working (well, it worked for me with 7" display) with Arduino Due:

1/ Ensure Arduino environment is installed 2/ Plug in the DUE only (do not connect the shield or lcd screen) via the programming port 3/ Windows may fail to install driver, but you can help it out as per instructions at 4/ Once driver installed, disconnect the usb from programmin port and connect to native usb port. Follow the same process in step 3. Now you have both usb ports ready to use 5/ Download the UTFT and UTouch libraries from and install in libraries folder. 6/ Go to folder: [arduino sketches]/libraries/UTFT/hardware/arm 7/ Open file HW_ARM_defines.h 8/ Uncomment the line: #define CTE_DUE_SHIELD 1 9/ Save the file 10/ Go to folder: [arduino sketches]/libraries/UTFT/ 11/ Open file: memorysaver.h 12/ Uncomment all the lines except #define DISABLE_SSD1963_800 (5" display) or #define DISABLE_SSD1963_800_ALT (7" display) (this will save you memory space) 13/ Assemble your Due/Shield/TFT display 14/ Connect the Due to a power source via the power plug! Do NOT expect the USB to be able to deliver enough current to drive the Due and LCD! 15/ Connect usb to Due programming port 16/ Open arduino environment 17/ Open Examples/UTouch/Arduino/UTouch_Calibration 18/ Change line: #define TOUCH_ORIENTATION PORTRAIT to #define TOUCH_ORIENTATION LANDSCAPE 19/ Change line: UTFT myGLCD(ITDB32S,38,39,40,41); to UTFT myGLCD(CTE50,25,26,27,28); for 5" display UTFT myGLCD(CTE70,25,26,27,28); for 7" display 20/ The line UTouch myTouch( 6, 5, 4, 3, 2); does not need to be altered! 21/ Upload the program and follow the calibration sequence 22/ Open folder [arduino sketches]/libraries/UTouch 23/ Enter the calibration figures in file UTouchCD.h

You should now be able to use any of the examples. But remember to always change the line UTFT myGLCD(ITDB32S,38,39,40,41); to your correct display.

I hope that helps others and let me know if I forgot something.

Hi I need help. I am a new in this. I have bought a diplay from

3.5" inch TFT LCD Resistive Touch Shield for Arduino Due,MEGA 2560 w/Library TFT controler is ILI9488 Shield is ILI9341

and I have run UTouch_Calibration and result is :

define CAL_X 0x00000000UL //ER-TFTM035-6

define CAL_Y 0x00000000UL //ER-TFTM035-6

define CAL_S 0x801DF13FUL //ER-TFTM035-6

Display is working but touch feature is not. HELP me to fix.