Hello, I have a problem using my 2.4" tft ili9341 display. I am using the Adafruit_ILI9341 and Adafruit_GFX libraries. I am trying to fill the screen with a color (using the fillScreen() function) and a part of the display remains as is. When I rotate the display and use the same function is fills the previously unchangeable part but leaves another part behind. Also text behaves the same way (as if that line was the end of the display). Thanks for your time.
Hi, could you also post a picture of what happens when you rotate, that may (or may not ) help ...
In any case, did you print out the following data, possibly with rotation set to 0 and to 1? Just to see if the driver has got the correct data for width and height ...
This is a video of what happens. Unfortunately I can't show you what happens when it rotates because I accidently shorted the nano that I was using and blew the usb diode. I will post another video when I get a replacement.
R4 is resistor
U1 is (unmounted) XPT2046 Touch Controller
U2 is 3.3V voltage regulator
Q1 is transistor (for switching the backlight on)
C1 is a 100nF capacitor
SD1 is the SD socket.
You can generally read part numbers that are printed on transistors and integrated circuits. Or resistor codes printed on resistors. Capacitors you identify by sight.
There is no level shifting circuitry. Which means that you have to provide 3.3V logic signals.
The Ilitek ILI9341 will not work with 5V logic. I am surprised that you saw any pixels at all !
Most TFT controllers are not 5V tolerant according to their datasheets.
Which is why respectable manufacturers like Adafruit provide 3.3V level shifters on their displays.
If you believe in Jewish Space Lasers you can put your trust into Ebay shops.
Incidentally, there are Red SPI displays with HC245A level shifter chips. But your photo has no 74HC245A chips.
Going from 5V to 3.3V can be solved by a simple resistor divider ... Unfortunately the other way depends on the threshold that the 5V electronics accepts as HIGH ...
There is a comprehensive article on this topic here
Ok thanks for the heads up, I will use level shifters. This setup (with the arduino nano) is temporary. I will be using a 3.3V board (Seeeduino XIAO) for my final implementation.
It is very simple to just put a few resistor dividers on your breadboard. Ensure that you have 3.3V logic signals. All of the Adafruit_ILI9341 example programs should work 100%.
I am a little surprised to see RED pixels being plotted from the bottom upwards. Especially when the screen is in PORTRAIT rotation and BLUE pixels were specified.
And of course, I was mostly surprised to see anything at all !!
So when you have 3.3V logic, please copy-paste the result from reading the "ILI9341" registers. Especially the ID. Perhaps you have a different controller.
setRotation(0) is landscape. Text appears landscape as well although I don't have a picture of it. It is, of course, entirely possible the aliexpress seller send me a different controller.
How text would look (with the help of some good old paint magic๐):
Seriously, for a handful of resistors you can connect your display properly. Then you can use the display for real projects i.e. why you bought it in the first place.
The Mcufriend-style parallel displays come with random controllers.
I have never seen a Chinese Red 2.4 inch Touch SPI display with anything other than ILI9341. But with component shortages anything is possible.
Ok I got a proper 3.3V board connected to the display. It appears to be able to control the full display. I tried the same program as I did with the arduino nano and this time it just shows a blank white display. Good news: backlight works. Bad news: the actual display doesn't. Full disclosure, its the first time I use this 3.3V board so idk whose (display, program or board) fault it is. I ran the adafruit graphic test and all it does is change between different shades of gray.
NO. The ILI9341 is always 3.3V logic. If you short J1 you can connect VCC directly to a 3.3V supply.
If you connect VCC to a 5V supply with J1 shorted then you will destroy the display.
Seriously, you must make good connections to your Xiao board. e.g. soldered pin header.
You might be able to stuff a dressmakers pin into the holes to force a mechanical / electrical connection.