Go Down

Topic: Sainsmart CPLD screen, Due and UTFT (Read 2004 times) previous topic - next topic


Hi all, I'm having big troubles trying to program a Sainsmart 7" CPLD (MD070SD) touchscreen. Let me clarify that I have only a little experience on Arduino (not Due, anyway) and none on TFT screens, which doesn't put me in an optimal position.

First, I bought a 7" CTE CPLD screen from one ebay seller, and a Sainsmart Due and a Sainsmart shield from another seller. I downloaded the Henning Karlsen's UTFT library, and following the instructions I defined CTE_DUE_SHIELD and instanced the library as follows: myGLCD(CTE70CPLD,25,26,27,28). I programmed the Due and the screen worked perfectly (no external power applied, only the USB cable connected to the programming port of the Due).

Unfortunately, I had to return the screen because - despite the description - it was not the touchscreen version.

Then, since the first seller had no more touchscreens, I bought one from the second seller (the one who provided the Due and the shield). I got a (damn) Sainsmart.

This screen "almost" worked: you can see the Henning's demo running, but the screen is messy (full of wrong-colored dots forming a figure repeated over and over on the whole screen).
The seller tried to send some example code presumably got from Sainsmart, but it was useless (it was for SSD1963 models, not for CPLD).
In the end, I had a second screen for free from the seller (who at least was very honest), to try if it was a malfunction of the first screen.

It wasn't. The second screen is even worse: the image is completely altered, somewhere you can read some text but it is misplaced and the colors are wrong.
I also tried to connect the screen to the Due without the shield and even applying external power, but nothing changed.

The strange thing is that some functions work: for example, I could revert the x-y and top-bottom axes acting on the MD070SD Display mode register (0x0C). Also, some text is displayed now and then, which makes me think the data lines work correctly.
Instead, I couldn't alter the brightness level (tried to turn on the screen at half power (0x08), but the result was the same as with 0x10).

I'm not even sure the initial reset is performed correctly. I wonder if it could be a timing problem; could the Due be too fast when writing data on the bus? If yes, how can I introduce the correct delays (which are ns, not ms)?

Did anyone ever get a screen like this working?

Thanks in advance for any ideas, suggestions, help or demo code.



Is there any progress?Also did you try to do without using shield? How the connection type?


I am not sure how I missed this thread? But I am usually quite good at fielding these types of requests!  :smiley-wink:

The CPLD displays both 5" and 7" work absolutely fine using Henning's UTFT libraries, and either a MEGA2560 or a DUE.

The larger TFT panels require an additional power source as they take more than USB can supply. A good choice is 500mA-1A 9v AC/DC Adaptor.

If you have the CTE Due shield, you must ensure you have uncommented line 4 in the HW_ARM_defines.h in UTFT\hardware\arm folder.

Besides that, it should be plain sailing.


UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

Go Up