Pjrc

Status
Not open for further replies.
Hi,

I have this DISPLAY_ILI9341_TOUCH_32 with the red PCB from the PJRC store. I use it together with a Teensy4.1 board.
Now I'm unsure how to hook it correctly up. Because there are different information available. On the PJRC website it is mentioned that Reset should be connected to 3V3 and T_CS to Teensy4.1 Pin8.

I use it together with the Library: ILI9341_t3n library.
In the examples of this library there are always the ILI_9341_RST pin defined as pin 8 which is already occupied by T_CS according to the PJRC Website.

Code snippet from the examples folder:
Code:
#define ILI9341_CS 10
#define ILI9341_DC 9
#define ILI9341_RST 8
ILI9341_t3n tft = ILI9341_t3n(ILI9341_CS, ILI9341_DC, ILI9341_RST);

So I'm confused what's correct for the Reset pin. Should it be connected to 3V3 or to pin 8?
I have also read on the adafruit website that reset should be connected to a pin so that the library can take care of the reset function.
But I'm not sure if this is specific to the adafruit displays or if this is in general.

I have also drawn a schematic and attached it with above the information from the PJRC website and one how I think it should be connected according to the examples.

Therefore much apprechiated if somewone could give me advice for the hookup.

Best regards

Simon
 

Attachments

  • PJRC tft.pdf
    97.7 KB · Views: 100
So I'm confused what's correct for the Reset pin. Should it be connected to 3V3 or to pin 8?

Either way is fine.

If you use RST and T_CS, it doesn't matter which digital pin you use. Just make sure to edit the number in the code to match where you connected each wire.

Both are optional. The display works fine if you connect RST to 3.3V.

The 5 T_xx signals are only needed if you want to access the touch / stylus sensing. If you only want to display info and not have touch, you can just leave those 5 pins unconnected.

If you do decide to use both RST and T_CS, they need to connect to different digital pins on Teensy. Don't wire them both to pin 8. Again, for those signals it doesn't matter which pins you choose. Just edit the numbers in the code to match where you connected the wires.
 
Dear Paul

Have many thanks for your reply.
I have decided to use the touch function and the lcd function as well. I design some kind of shield / backpack for the teensy.
This is how it looks:
Greenshot 2021-09-29 16.35.18.jpg

I have already recognized that the library must be programmed somehow that it can recognize which setup is connected. Either
with #define TFT_RST 8 in conjuction with:
ILI9341_t3n tft = ILI9341_t3n(TFT_CS, TFT_DC, TFT_RST);

or without TFT_RST 8 and with this line.
ILI9341_t3n tft = ILI9341_t3n(TFT_CS, TFT_DC);

But what I still don't get is, why the reset pin is optional. I mean there must be a benefit to spend a pin for the RST pin instead simply tie it up to 3V3?
Do you have any information how to choose one way to hook it up over another?

Best regards
Simon
 
Last edited:
But what I still don't get is, why the reset pin is optional. I mean there must be a benefit to spend a pin for the RST pin instead simply tie it up to 3V3?
Do you have any information how to choose one way to hook it up over another?

Sorry, I am not Paul ;), but...

It is optional, as it is optional... :D

Reason for using it. I find it helps at times to make the setup more reliable, especially in cases where you restart your program without turning you board on and off. This could be because your program crashed, or there was some method to reset the Teensy... Harder on T4.x as there is not a reset line, but can be done. Also if you load a new program

Why: without resetting the display, the display could be in any random state. And some of these states, the startup sequence may fail and/or may not reset that state to the default values. That way the startup code should work the same each time.

With the T3.x at times would instead tie this pin to the Teensy reset signal. That way whenever the teensy goes into a reset state, so does the display.

Hope that makes sense.
 
Have many thanks not Paul :), KurtE :)

That makes perfect sense.
Yes I have read this on the adafruit site but I wasn't sure If it is compareable respectively if it is the same technique with this display.
And it helps me a lot, because before I had always felt that I'm doing something wrong.

Cheers
Simon
 
May I ask another question?
Is there a function to turn off the tft somehow?
To save a bit power. Or could I hook up the LED to a MOSFET and turn the LED off with a digital pin?
Or are there already built in methods to turn off the display?
Would like to prevent that colors could burn in. Or is it sufficient to just display no text?
 
I don't do as much as others here on the power management stuff, as most of the time I don't leave any of my boards running.... Just a hobby.

Software only you could clear the screen... But does nothing for power usage...

But more hardware/software wise, on some boards I have done, I have used a couple of transistors, that connect from an IO pin to the Backlight pin, which I first saw on a board by Frank B...
Note: some other higher priced displays, like ones from Adafruit may already have their backlight pin connected to one or more transistors.

With the backlight pin connected through a circuit like that you can then turn on and off the backlight by setting that IO pins value.

And if the pin you use for this has PWM capability you can use that to control it to dim it... For example I have one sketch that over time it steps down the brightness to just barely on, and if you touch the screen it brings it back to full value.
 
Thank you Kurt

Okay that I have guessed. Good Idea with the PWM pin. Thank you.
My dad is the electronics technician. I'm more the programmer :). Then I let do him this stuff and I do more the coding :).
He told me he would use a FET transistor instead of a normal one. But reason I don't remember actually.
 
From my diptrace file, my circuit is like:
screenshot.jpg

Where I think Q2 was something like a digikey: BC850CLT1GOSCT-ND
and Q1 something like a BSS138CT-ND

But your mileage may differ. Also remember I am a software guy who dabbles with electronics. So trust your dad!
 
Status
Not open for further replies.
Back
Top