Simple TFT wiring question

I’m a little stumped here. So I found a TFT that was compatible with the UTFT library. This is the first TFT I’ve ever wired up so I was taking it slow. Anyway, first things first I started looking over the schematics for the 16-bit 4.3” screen. See the Diagram attachment.

Simple enough right, 16 Data bus lines and then the required init pins(RW,RD,CS, etc)? So I then started looking in the code for some sort of macro or defines that tell me what pins DB0-DB15 on the TFT are supposed to correspond to on my Arduino DUE. I didn’t find anything in the code in that respect so then I started looking over the API for UTFT. I Found the init definitions and such but still no reference to where these DB pins go. Yes, there’s a handful of tutorials online but I just can’t get a grasp on it. I then did a search on the site and found an Arduino DUE pinout thinking maybe there was something I was missing but still, nothing that strikes me as a lead.

I Found a tutorial for an 8-bit 5v screen with these instructions but again, why 22-29. Is it defined somewhere or just something specific to the platform.

• DB0 to DB7 > Mega D22 to D29 respectively
• RD > 3.3 V
• RSET > D41
• CS > D40
• RW > D39
• RS > D38
• backlight 5V > 5V
• backlight GND > GND

I’ve wired up an LCD display before but I specified the pins explicitly when I created an instance of that LCD.

Can someone steer me in the right direction? Sorry for the noob-ness and thank You


You'll find the necessary information in the file HW_SAM3X8E.h in the UTFT directory. For the 16bit interface pins 22-37 are used.

Thanks a lot pylon. I looked at HW_ARM_defines but must have skipped over HW_SAM3X8E. I appreciate it, here it is for the next person who gets stuck.

//DB00 on PIN37 → PIO_PC5
REG_PIOC_SODR=(VL<<5) & 0x20;
//DB01 on PIN36 → PIO_PC4
REG_PIOC_SODR=(VL<<3) & 0x10;
//DB02 on PIN35 → PIO_PC3
REG_PIOC_SODR=(VL<<1) & 0x08;
//DB03 on PIN34 → PIO_PC2
REG_PIOC_SODR=(VL>>1) & 0x04;
//DB04 on PIN33 → PIO_PC1
REG_PIOC_SODR=(VL>>3) & 0x02;
//DB05 on PIN32 → PIO_PD10
REG_PIOD_SODR=(VL<<5) & 0x400;
//DB06 on PIN31 → PIO_PA7
REG_PIOA_SODR=(VL<<1) & 0x80;
//DB07 on PIN30 → PIO_PD9
REG_PIOD_SODR=(VL<<2) & 0x200;
//DB08 on PIN22 → PIO_PB26
REG_PIOB_SODR=(VH<<26) & 0x4000000;
//DB09 on PIN23 → PIO_PA14
REG_PIOA_SODR=(VH<<13) & 0x4000;
//DB10 on PIN24 → PIO_PA15
REG_PIOA_SODR=(VH<<13) & 0x8000;
//DB11 on PIN25 → PIO_PD0
REG_PIOD_SODR=(VH>>3) & 0x01;
//DB12 on PIN26 → PIO_PD1
REG_PIOD_SODR=(VH>>3) & 0x02;
//DB13 on PIN27 → PIO_PD2
REG_PIOD_SODR=(VH>>3) & 0x04;
//DB14 on PIN28 → PIO_PD3
REG_PIOD_SODR=(VH>>3) & 0x08;
//DB15 on PIN29 → PIO_PD6
REG_PIOD_SODR=(VH>>1) & 0x40;