How to get this working:
Open-Smart 2.8" TFT LCD Shield with ILI9320 driver working now
Hello Arduino fans,
I had a problem with 2,8" TFT LCD shield with ILI9320 driver, producer /Open Smart/.
Maybe someone has the same problem and this can help…
(can operate with 5 VDC, can be plugged as Arduino UNO (MEGA) shield).
Problem: The screen of TFT LCD is still white, no matter which of (demo) programs I used.
What I tried: As I've read on few forums, or as I have seen on few websites, I did following:
I tried several libraries (original Adafruit_GFX, MCUFRIEND_kvb…). The best, with description, that it was tested with ILI9320, looks the library here:
It's bundled pack with other needed libraries like Adafruit_GFX, OPENSMART_TFT and TouchScreen.
OPENSMART_TFT is basically the good known MCUFRIEND_kbv with added examples and probably some minor changes. This library shouldn't be installed via Library manager but must be just copied into your library folder.
the library Adafruit_TFTLCD_Library must (can) be installed using the Library manager.
as I have a shield (not a wired breadboard), I've uncommented the
#define USE_ADAFRUIT_SHIELD_PINOUT 1
in the Adafruit_TFTLCD.h file from Adafruit_TFTLCD_Library.
also I checked, that the shield is really connected to correct pins of Arduino, as described in pin_magic.h from Adafruit_TFTLCD_Library
also I added in /MCUFRIEND_kbv.cpp/ support for the driver:
(for both of this drivers, as one detection program shows the ID of ILI9320, one of ILI9300).
Note - and this is important - you can't have two MCUFRIEND_kbv libraries installed. MCUFRIEND_kbv is already bundled in OPENSMART_TFT library, and if there is one more MCUFRIEND_kbv, then during linking the original MCUFRIEND_kbv is used, which won't work with this ILI9320 driver! So it's wise to move original /MCUFRIEND_kbv/ somewhere to backup folder, or delete it.
Result: Now the device works OK. Important notes are, that:
Adafruit examples which come with Adafruit libraries are not working.
the original MCUFRIEND_kvb is also not working, so modified from OPENSMART_TFT must be used
the examples which come with OPENSMART_TFT are working well.
To program the Arduino Uno, you have to unplug the display and connect the USB to the PC. Program it by running ' pio run -t upload' . Then, unplug the USB, plug the display in the Uno, then attach a power source.
The test application shows the actual temperature.
Documentation in MCUFRIEND_kbv
This text taken from https://github.com/prenticedavid/MCUFRIEND_kbv/blob/master/extras/mcufriend_how_to.txt
19. OPEN-SMART Shields have different wiring to regular Uno Shields Edit utility/mcufriend_shield.h: #define USE_SPECIAL Edit utility/mcufriend_special.h: #define USE_OPENSMART_SHIELD_PINOUT Edit MCUFRIEND_kbv.cpp: #define SUPPORT_8352B 20. OPEN-SMART Shields can not read LM75A on a Mega because there are no SDA/SCL pins next on AREF header. Uno: LM75A on pcb works. Difficult to add external I2C devices when Shield is plugged in. Uno: All use of SPI bus should use SPI.beginTransaction(), SPI.endTransaction() Leo: I do not support USE_OPENSMART_SHIELD_PINOUT_LEO Mega: Old boards do not have SDA/SCL on AREF header. Only external I2C devices on COMMS header Due: MAX809 Reset chip interferes with 3.3V RST on SPI header. Manual reset for Upload / Run.
This project uses Platformio, see platformio.ini
Use the following commands:
$ pio run $ pio run -t upload $ pio run -t monitor
See folder : TestDisplaySrc
Code at: TestDisplaySrc.ino