Versione italiana qui
I bought a 2.4” TFT LCD shield on ebay
The characteristics declared are
· 4-wire resistive touchscreen
· spfd5408 controller with built in video RAM buffer
· 8 bit digital interface, plus 4 control lines
It is marked [u]www.mcufriend.com[/u]. It is a shield and all communications are done using 4+8 pins.
As you can see there is an ILI after the name of the shield and there is a “9325” printed with a timbre.
[u]http://www.mcufriend.com/[/u] is down.
Using archive.org I found the download page but unfortunately the library
[uno242628.rar](http://"http://"http://"http://"http://"https://web.archive.org/web/20141126174431/http://www.mcufriend.com/download.htm uno242628.rar""""")
was not archived.
Then I went here
[u]http://misc.ws/2015/01/24/lcd-touch-screen-information/[/u]
downloaded the LCD_ID_Reader Version 1.2 sketch and run it on Arduino UNO R3.
I got ILI9325 as ID and a red screen so the Justin drivers should works. It seems that spfd5408B is compatible with ILI9325 but I don’t know if they have the same ID.
Downloaded and tested Justin libraries they work with the exception of the bitmap example: i get wrong colours.
Original Adafruit library identify the chipset as ILI9325 but doesn’t work, only a blank screen.
Then I downloaded the driver modified by buhosoft
[u]http://forum.arduino.cc/index.php?topic=292777.0[/u]
They works but it seems that there is an error since the same sketch use the double of flash than using the Adafruit library. The bmp example doesn’t fit on a UNO.
I removed all unused code and I got the same flash bytes occupation. Doing a comparison between libraries I found that it seems that the only difference is in the ccp file in the reset routine.
*******************ORIGINAL ADAFRUIT******************
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
digitalWrite(5, LOW);
delay(2);
digitalWrite(5, HIGH);
#else
if(_reset) {
/*
digitalWrite(_reset, LOW);
delay(2);
digitalWrite(_reset, HIGH);
*/
digitalWrite(_reset, HIGH);
delay(50);
digitalWrite(_reset, LOW);
delay(100);
digitalWrite(_reset, HIGH);
delay(50);
CS_ACTIVE;
RD_ACTIVE;
WR_ACTIVE;
delay(10);
}
#endif
*****************MODIFIED BUHOSOFT*******************
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
digitalWrite(5, LOW);
delay(2);
digitalWrite(5, HIGH);
#else
if (_reset) {
digitalWrite(_reset, LOW);
delay(2);
digitalWrite(_reset, HIGH);
}
#endif
Edit: I made the change in the Adafruit library and it works.
I still have the same problem wit bitmaps.
Next library tested was the one by Smoke and Wires.
[u]http://www.smokeandwires.co.nz[/u]
[u]https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code[/u]
This library works but I still have the same problem with bitmaps.
Next library tested was the samuraijap’s one
[u]https://github.com/samuraijap/TFTLCD-Library[/u]
It works with errors, it seems a memory location error since I get only partially coloured screen. All drawing are in the wrong position.
Next library tested was the one by ruelj2
[u]http://forum.arduino.cc/index.php?topic=221685.msg1981235#msg1981235[/u]
It works but there is a noise that appears as blank lines in the screen during communications. Same wrong colours in bitmaps.
Next library tested was the one by goltermc
[u]http://forum.arduino.cc/index.php?topic=288475.msg2021775#msg2021775[/u]
It works.
Library made by David Prentice
http://forum.arduino.cc/index.php?topic=286790.msg2477797#msg2477797
Tested only graphictest_kbv ant it work!!!
Doesn’t work:
Library by andreword
[u]http://forum.arduino.cc/index.php?topic=221685.msg1877644#msg1877644[/u]
blank screen
Library by JoaoLopesF for SPFD5408 (need to change #include "pin_magic.h" into #include "pin_magic_UNO.h" in SPFD5408_Adafruit_TFTLCD.cpp to compile) EDIT:Joao fixed the error!
[u]https://github.com/JoaoLopesF/SPFD5408[/u]
blank screen
Library by acharis
[u]http://forum.arduino.cc/index.php?topic=221685.msg1698653#msg1698653[/u]
blank screen
Old library from SeedStudio where in tft.h is written (don’t know were I got it)
SPFD5408A or ST7781R TFT Library
blank screen so SPFD5408A should be different from SPFD5408B
The new one is here
[u]https://github.com/Seeed-Studio/TFT_Touch_Shield_V1/blob/master/TFT.h[/u]
but the .h file says that is only for ST7781R.
I din’t test UTFT library since it use different pins for 8bit communications and it seems that can't be changed.
Most libraries need a const added just before
static unsigned char font[] PROGMEM = {
in file glcdfont.c instead you get an error in IDE 1.6.5
In most bitmap examples you must add
#include <SPI.h>
for the same reason.