Problem with TFT 3,2"

hello!
I have a problem with TFT
I have bought a lcd TFT 3,2" on ebay with shield for MEGA 2560
http://www.ebay.com/itm/131136941282?rmvSB=true

i try some drivers like SSD1289 in UTFT library but only one worked it's ILI 9341

After downloading exemple code on arduino, the display shift to the left, like on picture

(
#include <UTFT.h>
extern uint8_t SmallFont[];

UTFT myGLCD(ILI9327,38,39,40,41);

void setup()
)

are changes driver? do you have a solution for this ?
Thanks a lot in advance
Nicolas

I apologise, the driver is ILI 9327 and not ILI 9341

Nicolas

See: TFT LSD 3.2 " 16bit chip ili9341. - Displays - Arduino Forum

Does the label on the back of the board end in "9341"? If so then is using the ILI9341. The ILI9327 controller in UTFT is 240x400 16bit. The ILI9341 is 240x320 16bit. The UTFT ILI9327 driver works but the display is offset because the ILI9327 is for a wider display. Can either modify the ILI9327 driver in UTFT for the narrower display or create another driver based on ILI9327 as described in the other thread.

Your photo looks as if you are running the 320x240 Demo on a 320x240 screen. But the left hand 80x240 strip is hidden.

Since you got a display at all, your setxy() function is correct. i.e. it is a 9327, 9341, 9481, 9486, 9488, ... style of controller.

The easy kludge is to display in LANDSCAPE_REV instead of LANDSCAPE. If the display has been incorrectly configured in hardware, I think you have little choice. e.g. a ILI9327 is designed for 240x320, 240x400, 240x432. So if you have it configured for 240x400 on a screen that is only 240x320 you will get this "feature".

Your photo looks like an 80x240 strip. i.e. the difference between a 320x240 and a 400x240. Life would be so much simpler if your Adapter implemented the RD pin (that is present in your display). Then you could read the ID of the controller, and the contents of the important registers.

David.

Edit. My Maths has improved. I was thinking of 60x240 when it should be 80x240.

I have the same board/shield with the mega2560 and get the same missing strip with the ILI9327 driver in UTFT. As mentioned above, the ILI9327 driver in UTFT is configured for 240x400, not 240x320 so the display is shifted. If I modify the dsy[] value for the ILI9327 entry in UTFT.cpp (i.e change to 319 from 399), then the display is properly centered and scaled with the ILI9327 driver. Alternately can copy or rename the ILI9327 entries UTFT to create a driver for ILI9341 with the correct dsy[] value. David gives the procedure for creating another controller entry in the other thread.

PS the ILI9341_SxP drivers do not work because they are serial. The shield is configured to use 16bit parallel.

The initialisation for a parallel display or a Serial display is identical. Only the "interface driver" changes.

You are far better off with using LANDSCAPE_REV and being honest with the screen geometry. It is just a different initlcd.h sequence.

I am amazed that the Chinese make this sort of mistake. In another thread, there is a ILI9327 configured for 432x240 on a 400x240 screen. I have an ILI9361 configured for 160x128 on a 128x128 screen.

Of course, it might account for why some of these displays appear on Ebay so cheaply.

David.

Hi!
Thanks a lot for yours answers and for the fast!! it's perfect!
My display work perfectly after change to 319 from 399

Nicolas

Glad it worked. I spent a couple days just trying to figure out which controller chip it used.

BTW I sent my ebay seller a message to tell them to update their item description to include the correct controller chip, so it will at least give other buyers a chance to get it working (the data sheet and driver link they provided was the same as for your seller which is still for the SSD1289).