I am really struck hard with integrating Arduino Mega 2560 board and 2.8 ITDB02 Shield.
The shield is connected to board such that the SD cad slot with it is on the USB connector side. I believe that shield is properly plugged in at least. The first 2 pins (on USB connector) of Arduino is not used
Right Side Left Side
Reset 13
............ .....
A5 0
Now I am using ITDB02 library where the first thing I have to initialize the data pins and others:
ITDB02::ITDB02(int D8,int D9, int D10,int D11, int D12,int D13, int D14,int D15,int RS, int WR,int CS, int RST)
So in my code I have something like below:
ITDB02 lcd(0,1,2,3,4,5,6,7,A2, A1, A3, A4);
Cause TFT-Shield-Example-Code/mega_24_shield.h at master · Smoke-And-Wires/TFT-Shield-Example-Code · GitHub states:
// Smoke And Wires 2.4 Shield pin usage:
// LCD Data Bit : 7 6 5 4 3 2 1 0
// Digital pin #: 7 6 5 4 3 2 9 8
// Uno port/pin : PD7 PD6 PD5 PD4 PD3 PD2 PB1 PB0
// Mega port/pin PH4 PH3 PE3 PG5 PE5 PE4 PH6 PH5
#define LCD_CS A3 // Chip Select
#define LCD_CD A2// Command/Data
#define LCD_WR A1// LCD Write
#define LCD_RD A0// LCD Read
#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin
Further I have to initialize the touch screen PINS, which as per document:
void ITDB02::Touchpin(int tclk,int tcs,int din,int dout, int irq)
I am a bit confused here about the PINS I have to use but as mentioned the TFT shield is connected properly to Arduino - my first aim is to print a char on screen - so:
//lcd.Touchpin(6,5,4,3,2);
I have commented it cause I understand that it is wrong.
Uploading the program does not displays simple text on screen - which makes me understand that the lcd() params are wrong:
ITDB02 lcd(0,1,2,3,4,5,6,7,A2, A1, A3, A4);
Please let me know what should be my params fof the ITDB02::ITDB02(int D8,int D9, int D10,int D11, int D12,int D13, int D14,int D15,int RS, int WR,int CS, int RST) constructor and Touchpin(int tclk,int tcs,int din,int dout, int irq) methods - it has been two days I am struggling to find unfortunately the screen is not displaying any text out put.
I believe that if I have these two method rightly set my display function will print character cause above are the methods to initialize and use the TFT.