Sainsmart 4.3" tft lcd touchscreen issues

So a while back I decided to get back into the microcontrollers and was at the store and they had a sainsmart 4.3" tft lcd, I have a mega 2560 I'm wiring it to, it has the 40 pin connector, I know they have a shield it snaps into and then pops directly on the mega but for the internal layout of the case its going into I need the flexability of wires.
Using the pinout pdf and the calibration and example libraries I think ive got the wiring almost figured out, except when I load a library I get a blank white screen.
So the wiring is as follows:
Shield/TFT Arduino MEGA pins (section)

DB0-DB7,DB8-DB15 D37-D30,D22-D29 - 16-bit data for screen
RS, WR, CS, RST 38, 39, 40, 41 (Digital) - Screen control signals
LED-A, VCC, GND 3.3V, 5V, GND (Power) - Power

SD_OUT 50 (Digital) - SD Card reader
SD_CLK 51 (Digital) - SD Card reader
SD_IN 52 (Digital) - SD Card reader
SD_CS 53 (Digital) - SD Card reader

------ 42-49 (Digital) - Free pins

D_CLK 6 (PWM -also digital) - Touch controller
D_CS 5 (PWM -also digital) - Touch controller
D_IN 4 (PWM -also digital) - Touch controller
D_OUT 3 (PWM -also digital) - Touch controller
D_IRQ 2 (PWM -also digital) - Touch controller

And the sketch I'm using is the Utouch calibration hat I was directed to use, I would post but its telling me it has a length error. I'm going o try to attach the example, not sure if it will let me.

I have already figured out the font issue with the supplied lib, and it is compiling and loading fine.
Also was wondering is there any of the pins that go to the I2C that I've stuck in the wrong place?

So as I was saying the screen is just white, and I've been tinkering wih it to try to find out if I'm missing something, like I have a "RD" on the pinout and it's excaping me as to what its for, also the documentation shows the DATA pins as I have listed above, while I see elsewhere that DB0-DB15 go to pins D22-D37 respectively in that order so not sure where my problem lies but if someone has this tft and could throw me a hint as where I goin wrong I'd much appreciate it.

UTouch_Calibration.ino (9.71 KB)

Some pictures please!

If you have a RD pin, connect it to some unused GPIO and make it OUTPUT and HIGH.

The UTFT library has no concept of reading a controller. So it has no support for a RD pin.
The docs will tell you which ports to connect DB0-DB15. And you specify the control pins in the constructor().

It should be pretty straightforward to get UTFT examples running. However life is much easier if you use the specific Adapter Shield. Then you know that your wiring is reliable and that the 3.3V TFT is being driven through the proper level translators from the 5V Arduino.

David.

Wondering if I tried for something a bit to challenging, ok so was wondering about declaring the pins, and if that is something normally done in the utft.h and utouch.h files or if I need to declare them elsewhere, otherwise if checked the wiring against what the doc is sayin to do. Heres the header.

// UTouch_Calibration
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// This program can be used to calibrate the touchscreen
// of the display modules.
// This program requires the UTFT library and a touch
// screen module that is compatible with UTFT.
//
// It is assumed that the display module is connected to an
// appropriate shield or that you know how to change the pin
// numbers in the setup.
//
// Instructions will be given on the display.
//

#include <UTFT.h>
#include <UTouch.h>

// Define the orientation of the touch screen. Further
// information can be found in the instructions.
#define TOUCH_ORIENTATION LANDSCAPE

// Initialize display
// ------------------
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino Uno/2009 Shield : ,19,18,17,16
// Standard Arduino Mega/Due shield : ,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Due : ,25,26,27,28
// Teensy 3.x TFT Test Board : ,23,22, 3, 4
// ElecHouse TFT LCD/SD Shield for Arduino Due : ,22,23,31,33
//
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(ITDB32S,38,39,40,41);

// Initialize touchscreen
// ----------------------
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino Uno/2009 Shield : 15,10,14, 9, 8
// Standard Arduino Mega/Due shield : 6, 5, 4, 3, 2
// CTE TFT LCD/SD Shield for Arduino Due : 6, 5, 4, 3, 2
// Teensy 3.x TFT Test Board : 26,31,27,28,29
// ElecHouse TFT LCD/SD Shield for Arduino Due : 25,26,27,29,30
//
UTouch myTouch( 6, 5, 4, 3, 2);

// ************************************
// DO NOT EDIT ANYTHING BELOW THIS LINE
// ************************************

That's the header of the example im trying to run and getting only a white screen, so I guess what I'm wondering besides for :
UTFT myGLCD(ITDB32S,38,39,40,41);
and
UTouch myTouch( 6, 5, 4, 3, 2);

do I need to declare the rest of the pins or is that usually done in the utft.h and utouch.h files?

david_prentice:
If you have a RD pin, connect it to some unused GPIO and make it OUTPUT and HIGH.

Or just wire directly to 3.3V.

david_prentice:
Then you know that your wiring is reliable and that the 3.3V TFT is being driven through the proper level translators from the 5V Arduino.

ALL (did I mention ALL?) signal pins MUST go through level translation...... 5V->3.3V ......

Did you overlook these 2 VERY important pieces of information David provided?

You shouldn't need to mess about declaring all of your pins, but you do need to pick a shield type that you are trying to 'emulate' through your wiring and then UTFT will deal with the rest.

For example, my cheap and nasty Sainshit MEGA shield has 32 resistors on it for level translation.... And as a side note, Saincrap is not renowned for its compatibility, maybe you wired it correct, maybe you didn't, too many variables to assist further.

Good luck!

Graham

Ah, figured out my problem, had the wrong model# in the globals.

I went thru the examples and loaded each 1 into the arduino and found the example that fit perfectly onto the screen then used the model # from the
"UTFT myGLCD(ITDB32S,38,39,40,41);" the ITDB43 and put that into the Utouch constructor, bamm all good.

Thanks for all the help you guys shot me, this is my first leap into the tft's, looks like this is going to be more fun than pain now.