Help using Tennsy4.0 with ILI9341

Status
Not open for further replies.

bavareze

Member
Hi.

I have a cute project running called AYP that is currently running on Arduino UNO: www.autoyoke.com

As I'm trying to switch to Teensy4.0, I started with implementing this example:

https://www.pjrc.com/store/display_ili9341.html

However, the diagram is for Teensy4.0. Does anyone have a diagram for how to use an ILI9341 with Teensy4.0?

Furthermore, is there any way to communicating with the display using less than 15 different wires? I'm just trying to get this done the easiest way so I can focus on writing the code.

Thanks
 
Are you using the 2.8" TFT that is shown on that page? If so, the connection is and SPI and the same for a Teensy 3.2 and 4.0.

display Teensy
Vcc to 3v3
GND to GND
CS to pin 10
RESET to either pin 8 or 3V3, if using Pin 8, you will need to create the object with the 3rd argument your_display_object(Chipselect, D/C, RESET),
D/C to pin 9
MOSI to pin 11
SCK to pin 13
LED to 3v3
MISO to pin 12

If you need touch you must connect these pins (assuming you are using the XPT2046_Touchscreen library)
T_CLK to pin 13
T_CS to say pin 2
T_DIN to pin 12
T_DO to pin 11
T IRQ to say pin 1

if you are hurting for pins connect RESET to 3v3 and you can omit MISO.
 
Are you using the 2.8" TFT that is shown on that page? If so, the connection is and SPI and the same for a Teensy 3.2 and 4.0.

display Teensy
Vcc to 3v3
GND to GND
CS to pin 10
RESET to either pin 8 or 3V3, if using Pin 8, you will need to create the object with the 3rd argument your_display_object(Chipselect, D/C, RESET),
D/C to pin 9
MOSI to pin 11
SCK to pin 13
LED to 3v3
MISO to pin 12

If you need touch you must connect these pins (assuming you are using the XPT2046_Touchscreen library)
T_CLK to pin 13
T_CS to say pin 2
T_DIN to pin 12
T_DO to pin 11
T IRQ to say pin 1

if you are hurting for pins connect RESET to 3v3 and you can omit MISO.



it's exactly the same 2.8 TFT.

are you sure it's the same pinout as 3.2? The 4.0 teensy seems to have different pinout diagram from pins 0 to 12.

Thanks
 
Reviving old thread, as I had no time to work on this in the past few months. The test code runs, the display stays blank and the output shows like this.

It seems bizarre that all diagnostic values are 0xA8. But I can't find a table showing what these codes mean, so I can troubleshoot.

Any ideas?

Thanks!

START
ILI9341 Test!
Display Power Mode: 0xA8
MADCTL Mode: 0xA8
Pixel Format: 0xA8
Image Format: 0xA8
Self Diagnostic: 0xA8
Benchmark Time (microseconds)
Screen fill 205451
Text 9318
Lines 70391
Horiz/Vert Lines 17466
Rectangles (outline) 11202
Rectangles (filled) 427139
Circles (filled) 67203
Circles (outline) 48587
Triangles (outline) 16541
Triangles (filled) 146009
Rounded rects (outline) 17825
Rounded rects (filled) 472617
Done!
 
Hard to know for sure without seeing your actual code, and wiring. Like which library are you using? the main page for the display shows starts for Adafruit version or Paul's version of library.
What pins are you using? How are they connected? to breadboard? If so are your pins to teensy soldered in? ...

Most of your display stuff is just how long in microseconds each test took... And it does not know if the SPI data actually made it to your display or not...
 
I'm using this library:

https://github.com/PaulStoffregen/ILI9341_t3

And I'm running the graphictest demo included with it, without any modifications

I connected RESET to 3V3.

The display is blank i.e. white (the LED backlight turns non)

I understand that most of the response is about speed. But I need to understand what those 0xA8 codes mean. Where can I look that
up? Is it documented somewhere?

Thanks


IMG_6864.jpgIMG_6865.jpg
 
The object is being created like this:

#define TFT_DC 20
#define TFT_CS 21
#define TFT_RST 255 // 255 = unused, connect to 3.3V
#define TFT_MOSI 7
#define TFT_SCLK 14
#define TFT_MISO 12
ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCLK, TFT_MISO);
 
Status
Not open for further replies.
Back
Top