2.8 inch spi tft lcd ili9341 not working quotation

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?

2.8 inch spi tft lcd ili9341 not working quotation

My PCB board size is about 100mm-80mm (all hand soldered with a hot air tool, soldering iron, heat bed not to blow my own trumpet, but I am very good at pcb assembly by hand + I find it therapeutic).

So after half a days soldering, I fire up the board and excellent, the ILI9341 is running at a clock speed of 100mhz (not scoped), lightning fast! Dropped the speed to a more reasonable 20mhz and left overnight for a board test (i always do this, as i have lipos connected etc and like to see if there are any heat issues etc after a 24h run). Found no issues the next morning, graphics test still running so powered off the device.

Powered back up after my return from work @20mhz and the graphics test worked fine. Enabled my SD circuitry (solder jumpers), reran the test and both the ILI9341 and SD were both running sweet.

No changes made, powered up on the third day, and nothing but a white screen on the ILI9341? So i say, must have blew the t4 some how. Hot air removed the t4, on goes the new one and again a few runs later and i get a white screen again? Checked all my pin assignments, voltages and they are all good.

I came to the conclusion that as I was forcing the T4 to be powered of of 3v3 as per (https://forum.pjrc.com/threads/64468...V-power-supply) this was somehow messing with the SPI communication. I canned the T4 and designed and built a T4-SAMD51 clone.

I picked up the project again today and de-soldered my SAMD51 T4 clone pcb as I need speed! The T4 would have been perfect, so tried a few code changes, got the screen running in the setup function (static text etc), but as soon as it enters the loop(), you guessed it....white screen. Its as if the t4 is too fast on spi or something, but I have changed the clock speeds down to 5mhz and yield the same results...

To confirm, I had the T4 intermittently working on both the adafruit ili9341 library and the optimised ili9341_t3. I"ve been through 3 T4s and I have 5 different ILI934 displays. (all give the same results, pull ups, no pullups, removed sd circuitry, ran the T4 at 5v I"ve tried it all!)

2.8 inch spi tft lcd ili9341 not working quotation

Now I am testing Back Lit. I found that my guess was wrong. The pin BL is not LED anode, but Low level on. I used a multimeter to check that the current from BL pin to ground is 2.5mA. So I now guess BL is not a signal pin but a pull down LED power pin, sinking 2.5 mA to switch on Back Lit LED. Anyway, I am glad that now I have a huge size 2.8" white LED! :)

Now I have loaded the kernel module fbtft_device name = ici9341. I can also listed the module. But I found that I made another wrong guess - four SPI signal wires are not enough, I also need 3 more GPIO wires RST, DC (select Data or Command mode), and BL (back lit), ... :(

My ICI9341 SPI cable V2.0 does not work, because the signals Touch LCD RST and RS (Register Select) or DC (Data Command Mode Select) are missing. So I have assembled V3.0.

I just found that my Rpi3B+ with Raspbian 2019Apr version already has a fbtft kernel driver which sadly is not the ici I ma using. So I need to build a driver myself. I found the following driver tutorial but found it very tedious. Trying it this Sunday afternoon might corrupt my Rpi OS. So I decided to stall this part of project for a couple of days, to allow me to go through slowly the tutorial.

2.8 inch spi tft lcd ili9341 not working quotation

Over the last few weeks I have been trying to get the TFT display to work with ESP32 and BPL. I used 4.2pre downloaded 8 Jan 2022 with VSCODE WIN10, and unmodified this works OK.

Builds and uploads with no errors BUT BPL is not working, can"t connect to web page and the OLED freezes. No TFT colour change. I have tried placing the tft.init in several places in the BrewPiless.cpp file but it still doesn"t work.

Now I am stuck! It looks as if the tft.init() under the void setup(void){, while compiling, upsets BPL operation. I don’t know enough about programming or the structure of BPL to know how to solve this problem.

2.8 inch spi tft lcd ili9341 not working quotation

ER-TFT028A2-4 is 240x320 pixel 2.8 inch IPS TFT LCD Display Panel with ILI9341 controller IC,optional capacitive touch panel and 4-wire resistive touch panel,superior display quality,super wide viewing angle and easily controlled by MCU such as 8051, PIC, AVR, ARDUINO ARM and Raspberry PI.It can be used in any embedded systems,industrial device,security and hand-held equipment which requires display in high quality and colorful image.It supports 8080 8-bit,9-bit,16-bit,18-bit parallel,3-wire,4-wire serial spi interface. FPC with zif connector is easily to assemble or remove.Lanscape mode is also available.

2.8 inch spi tft lcd ili9341 not working quotation

In this Arduino touch screen tutorial we will learn how to use TFT LCD Touch Screen with Arduino. You can watch the following video or read the written tutorial below.

For this tutorial I composed three examples. The first example is distance measurement using ultrasonic sensor. The output from the sensor, or the distance is printed on the screen and using the touch screen we can select the units, either centimeters or inches.

The next example is controlling an RGB LED using these three RGB sliders. For example if we start to slide the blue slider, the LED will light up in blue and increase the light as we would go to the maximum value. So the sliders can move from 0 to 255 and with their combination we can set any color to the RGB LED,  but just keep in mind that the LED cannot represent the colors that much accurate.

As an example I am using a 3.2” TFT Touch Screen in a combination with a TFT LCD Arduino Mega Shield. We need a shield because the TFT Touch screen works at 3.3V and the Arduino Mega outputs are 5 V. For the first example I have the HC-SR04 ultrasonic sensor, then for the second example an RGB LED with three resistors and a push button for the game example. Also I had to make a custom made pin header like this, by soldering pin headers and bend on of them so I could insert them in between the Arduino Board and the TFT Shield.

Here’s the circuit schematic. We will use the GND pin, the digital pins from 8 to 13, as well as the pin number 14. As the 5V pins are already used by the TFT Screen I will use the pin number 13 as VCC, by setting it right away high in the setup section of code.

I will use the UTFT and URTouch libraries made by Henning Karlsen. Here I would like to say thanks to him for the incredible work he has done. The libraries enable really easy use of the TFT Screens, and they work with many different TFT screens sizes, shields and controllers. You can download these libraries from his website, RinkyDinkElectronics.com and also find a lot of demo examples and detailed documentation of how to use them.

After we include the libraries we need to create UTFT and URTouch objects. The parameters of these objects depends on the model of the TFT Screen and Shield and these details can be also found in the documentation of the libraries.

So now I will explain how we can make the home screen of the program. With the setBackColor() function we need to set the background color of the text, black one in our case. Then we need to set the color to white, set the big font and using the print() function, we will print the string “Arduino TFT Tutorial” at the center of the screen and 10 pixels  down the Y – Axis of the screen. Next we will set the color to red and draw the red line below the text. After that we need to set the color back to white, and print the two other strings, “by HowToMechatronics.com” using the small font and “Select Example” using the big font.

Next is the distance sensor button. First we need to set the color and then using the fillRoundRect() function we will draw the rounded rectangle. Then we will set the color back to white and using the drawRoundRect() function we will draw another rounded rectangle on top of the previous one, but this one will be without a fill so the overall appearance of the button looks like it has a frame. On top of the button we will print the text using the big font and the same background color as the fill of the button. The same procedure goes for the two other buttons.

Here’s that function which uses the ultrasonic sensor to calculate the distance and print the values with SevenSegNum font in green color, either in centimeters or inches. If you need more details how the ultrasonic sensor works you can check my particular tutorialfor that. Back in the loop section we can see what happens when we press the select unit buttons as well as the back button.

2.8 inch spi tft lcd ili9341 not working quotation

Please see the DT028CTFT for reference designs. The schematics between the A and the C are the same with the exception that the A does not have the IPS interface.

2.8 inch spi tft lcd ili9341 not working quotation

(The following is the touch screen signal line wiring, if you do not need to touch function or the module itself does not have touch function, you can not connect them)

2.8 inch spi tft lcd ili9341 not working quotation

Could you explain why the resisters are needed? Also, How would you use the 4050 IC rather than the resisters. I just purchased two of these LCDs from Amazon and was going to return them because I didn"t think they worked. I have the resisters at home and will try the them first. It would be great to see the same schematic picture with the 4050 as well. Most importantly though is the why. I really want to understand why it"s all needed and why I"m not seeing anything wired up without the resisters. Thanks !!!!

2.8 inch spi tft lcd ili9341 not working quotation

This 2.8″ TFT LCD is a full color display with a resolution of 240 x 320 pixels or 320 x 240 pixels depending on how it is oriented.  It uses the ILI9341 controller with SPI interface.  It also includes a resistive touchscreen with built-in XPT2046 controller.

These modules are breadboard friendly with a 14-pin header on the back that can be inserted into a solderless breadboard or a 14-pin female connector can be used to connect to it if the display is to be mounted.  The display is mounted on a stiff PCB that provides good support, but be sure to press on the header pins or PCB when applying pressure to insert them into a breadboard and not press on the glass to avoid possible damage.

I’m also using the Teensy 4.1 because it is currently the fastest Arduino compatible board (600MHz 32-bit vs Uno 16MHz 16-bit) and this example application of calculating Mandelbrot fractals and updating the LCD can take a long time on an Uno (77-105 seconds) and only takes about 1.25 seconds on the Teensy 4.1.  If using a 3.3V Arduino like a Due, hookup will basically be the same.

Connect the SPI and control lines for the display.  In our example we are using hardware SPI as it gives the best performance.   The SPI pin location will depend on the MCU you are using.

If you just want to check the display functionality and speed, the ‘graphicstest’ example program installed as part of the Adafruit_ILI9341 library is a good one to run.

The program below is a modified version of the Mandelbrot example program that gets installed with the Adafruit_ILI9341 library.  It was pruned down in size and basic touch added.  The program just calculates the Mandelbrot set and draws it to the screen pixel-by-pixel as it is calculated.  The math is fairly intense for each pixel, so it is a good judge of the power of the MCU.  The display update speed is thus limited by the MCU that is doing the calculations and is not limited by the display itself.