I have an somewhat odd combination of Arduino Micro 5V (clone) and an Adafruit PiTFT 2.4" TFT touch screen with ILI9341 chip that I would like to get working together. I appreciate that PiTFT is not meant for an Arduino, and there are some limitations with buffering and memory, but that’s what I have, and I’ve seen people getting them to work in this setup.
My issue is that I cannot get it work stably with the Arduino.
My setup is as follows:
I am using the “graficstest” example from Adafruit_ILI9341 example sketch (attached). To use hardware SPI, I am using the following initialization:
#define TFT_DC 7 #define TFT_CS 10 #define TFT_RST 8 Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
Otherwise I left left the sample sketch as is.
My issues are as follows:
- On startup, I get the following diagnostics:
23:11:27.991 -> Display Power Mode: 0x0 23:11:27.991 -> MADCTL Mode: 0x0 23:11:27.991 -> Pixel Format: 0x0 23:11:27.991 -> Image Format: 0x0 23:11:27.991 -> Self Diagnostic: 0x0
- Sometimes the display works and shows correct output, but most of the time it stays white and doesn’t flicker. I can’t seem to determine what makes it work, but it seems like RST is not working. The diagnostics output stays the same whether the display works or not.
I thought that perhaps the issue is unstable voltage from the micro, so reproduced the setup with 5V, 3.3V, and GND provided by an external Power Supply Module as per below. No change.
My question is, of course, who has gotten this to work and if so how, and what may I be doing wrong?
- What is the proper RST pin to use on the PiTFT?
- Are there additional initialization strings or parameters I need to use to get it working with my Arduino?
- Are there any clock settings I need to adjust?
- For the MISO pin, do I need to level shift?
- Does 5V on PiTFT pin 2 need be a true 5V, or can it be powered from 3.3V? (I am trying to limit my connection to 8 wires to use a CAT5e cable to the screen, so the few wires the better). If 5V is needed, then I will have a voltage divider at the PiTFT screen to supply 3.3V to pin 1.
- Do both PiTFT 5V pins (2, 4) need to be connected to 5V (I am assuming that they are internally connected, so only one).
- Do both PiTFT 3.3V pins (1, 17) have to be connected to 3.3V or is one enough (I am assuming that they are internally connected, so only one).
- Do all of PiTFT GND pins (9, 25, 39, 14, 20, 30) need to be grounded, or is it enough to ground just one of them (I am assuming that they are internally connected, so only one).
Thanks in advance
arduino_code_test.ino (9.42 KB)