2.8 inch spi tft lcd ili9341 not working brands
I ordered a cheap 2.8 inch ILI9341 screen from Amazon (https://www.amazon.co.uk/240x320-Screen-Serial-Module-ILI9341/dp/B07MXH92RL/ref=sr_1_12?dchild=1&keywords=spi+screen&qid=1589230039&sr=8-12) in the hopes of using it in a custom handheld Retropie console. However, I have attempted many different methods, none of which seem to work. I have reason to believe that the screen is not faulty as, when I give power to the backlight, it lights up, so I think that this is a software issue. Does anybody know how I can configure it to work? Many thanks, Dominic.
Think is, before I try to modify any library to bend it for the STM32L0 I wanted simply to check my SPI configuration by issuing a simpliest thing, reading LCD ID registers. But that"s the thing, I do not receive any data from ILI9341. I guess all registers are accessible right after the proper reset of the ILI9341, right? So, here is my "init" procedure:
please, see attached screen from my logic analyzer. You can see, CS is brrought low followed by eight clock pulses (500 kHz period) on SCK and 0x04 MSB first on the MOSI and with the DC set low. Afterwards, there is sequence of 4 dummy 0xFF bytes to push out the desired data out from the ILI9341 SPI buffer with the DC set high. But as you can see, there are only zeros on MISO line. Of course, the CS is brought up at the end. I"ve checked the wiring 10 times and I don"t think it is the problem. Maybe, are really all register accessible right after the start of the ILI9341? Or do I have to wirte some data somewhere first?
I put in simple voltage dividers for level shifting from 5V USB to 3.3 (actually ~3.5)V output, not having anything better on hand. This made the screen dimmer, but otherwise provided no visible difference.
I rechecked my wiring compared to the sketch, and found that RST and DC/RS were swapped from the Adafruit library. However, compiling this sketch (whether default or changed to include the define call for RST) gives "Error compiling for Arduino - Exit status 1". From what I found online, this usually means there is a typo somewhere in the sketch - but this is an official sketch straight from the library. It should at least compile, whether or not the wiring is correct... am I missing a library or something? Using a different one than I should?
EDIT as of 12/29/2019 Usage with Arduino connect as usual but power your Arduino with 3.3 volts (just connect 3.3 to the 5V pin on the arduino). Alternatively you can put a 1K series resistor on all pins to drop the voltage going to the unit (and power with 3v3). THESE UNITS WILL NOT WORK IF POWERED WITH 5 AND IF THE SIGNAL LINES ARE 5 VOLTS.
Note:If you use the LCD with a 5V device like an Arduino board, it doesn’t work if without level shifting to 3.3v logic. Please use level shifters from 5V to 3.3V to ensure it works well.
The functions of our boards include, but are not limited to, adjustment of brightness, sound output, touch interface, extra data transmission, and gyroscope.
Resistive or Capacitive Touch? Well you might ask what kinds of applications can these be used in? Although there might be a preference towards a capacitive screen over the former, there are some applications where a resistive touch screen will give the end-user easier operation/maintenance. Like for example, in medical apps a user might not be able to remove gloves in order to use the device or where a touch-stylus and resistive screen is much quicker.
I am using an esp32 WROOM 32 dev kit, but you can use any esp32 as long as you configure the pins correctly. If you notice that I am using two separate SPI buses, one for the display and one for the touch interface. At first I tried to run both controllers off the same spi (as most of the instructions out there seem to implement) but was not successful. Once they were independent of each other, the system stabilized.
I had an MPU6050 so I added it to the project. Next I will add an oximeter, a MLX90640(software added 2/24/21) and SD card to the SPI bus(later). also on the horizon - a blue-tooth interface to an android device... stay tuned.