3.2" SSD1289 LCD with offset pixels on Due board

I have a Due with a LCD shield and Sainsmart 3.2" LCD that I have running the UTFT 320x240 ARM demo.
The problem I have is that there is a sideways one pixel offset on pretty much everything from rectangles, circles, fonts and lines. Has anyone using the Sainsmart SSD1289 3.2" LCD with a Due encountered this problem?.

After researching Sainsmart products and their reputation, I'm beginning to wonder about alternative brands. My Due shield was set for 5V I/O and 5V LED initially and I did power them up for a minute or so like that before selecting 3.3V for both voltages. I guess that would be enough to damage the SSD1289 enough to cause my problems?.

It is reassuring to know that Sainsmart are consistent with supplying badly configured Due Adapter shields.

The official UTFT does not support the ILI9341. There are various "modified" UTFT libraries e.g. one from TFTLCDCyg.

I do not possess your display. I have not looked at TFTLCDCyg's modifications. I would assume that he has done everything correctly. i.e. it should display perfectly.

Judging by some of the "other" modified libraries, they sound completely wrong. e.g. adapting the totally unsuitable ILI9327 entry.

Many people have your ILI9341 display. I presume that they are happy.
I presume that you have a correct Due driver for your Due Adapter.


Hi David, yes it's the black Arduino Due specific shield marked as a CTE V1.04 board and also labelled with Sainsmart's URL. Is there driver software I have to use for this board??, I haven't set anything up along those lines.

Interestingly the Ebay seller is not Sainsmart and once they worked out that I didn't buy it from them they cut all contact.

I have a copy of the latest Sainsmart copy of UTFT and the Ebay seller profit_vanity version of UTFT and both didn't work until I modified the HW_ARM_defines.h to uncomment the relevant line:

#define CTE_DUE_SHIELD 1

and modify the 320x 200 UTFT demo code with:

UTFT myGLCD(ITDB32S,25,26,27,28);
UTFT myGLCD(SSD1289,25,26,27,28);

The info I have is that it's a SSD1289 controller, should the ILI9341 controller configuration work?.

We have no idea what actual display that you have bought. Please post a link to the shop / Ebay / ...

My apologies. It is extremely unusual to find a SSD1289 display nowadays. ILI9341 is more common. Which is why I mentioned TFTLCDCyg's library.

The SSD1289 is completely different to most other controllers. So if you get "something" from the "ITDB32S / SSD1289" model, you must really have a SSD1289. No, it will not work with any other "model"

You have enabled the correct hardware driver with: #define CTE_DUE_SHIELD 1
And used the correct constructor with: UTFT myGLCD(SSD1289,25,26,27,28);

I would guess that the current official UTFT library (v2.81) should work perfectly.
Note that the Due is very fast with this Adapter. So you might need to slow down the hardware driver.

Even though UTFT is fairly SLOW, the "rectangle fill" looks ok i.e. _fast_fill_16(). So the driver must have got the correct timing. Your text and "angle lines" use drawPixel(). It looks as if you should add some delays here. i.e. LCD_Writ_Bus()

I know that Graham Lawrence has a 16-bit SSD1289 display with a Due Shield.
He should be able to advise you.


Thanks for the assistance and the tip about Graham, here’s the links to the items I bought:

Due shield:


3.2" TFT LCD:


It appears to draw everything with sideways offset pixels: fonts, line objects or solids. I’ll attach a few more samples below. I’ll give the latest UTFT a try as well and report back on it.

The problem has been resolved by the Ebay seller providing a modified version of UTFT which I’ll attach below. I received an email from Sainsmart telling me to work through the Ebay seller and not long after I received a link to a version of UTFT with most files dating to 7/11/13 but with a version of initlcd.h dating from 18/5/16 being the only new file I could find. If you copy this initlcd.h into the SSD1289 directory found in the tft_drivers directory of the latest version of UTFT the display works fine.

So the only issue remaining is the shield boards being supplied with the wrong voltage jumper 1 & 3 instead of 2 & 4.

I’d like to thank David Prentice for his help with this particular hardware combination, it was greatly appreciated.


initlcd.h (882 Bytes)

Many thanks for posting this and sharing the revised include file. I've been battling with the supplier (eBay: trade_spotting) to get my 3.2" display working for a week now, and your post's got it resolved for me.