Hello!
I was using an Arduino Mega2560 in a project which included, among some other sensors and actuators, a 3.5" 16bit 320x480 LCD TFT shield with a ILI9486 driver. That screen, however, got damaged, and a colleague gave me a 3.5" 8bit ILI9488 320x480 shield which he had laying around.
The new one is a UNO shield, which I planned to connect to my Mega using the USE_MEGA_8BIT_SHIELD pinout from MCUFRIEND_kbv. Since I wasn't the one who bought it, I don't know the exact model, but here is a picture:
I have been trying to get this screen to work for the whole week, but aside from the backlight, I get no response from any of the examples I tried (the ones from the MCUFRIEND_kbv library and these ones, which were used in this PDF I found from a similar shield), even when using it as intended on an UNO.
Has anyone worked with a similar shield before? I first thought it might be broken, but had the same problem with an identical one which my colleague also had.
You can plug it into a Uno, Leo, MEGA2560, Zero, ... just as Nature intended.
MCUFRIEND_kbv will compile and upload out of the box. i.e. you do not need any USE_SPECIAL define or any special wiring.
If your old display was "USE_MEGA_16BIT_SHIELD" i.e. had 18x2 header you will need to remove the USE_SPECIAL define. Otherwise it will expect to see a MEGA style shield if your IDE is configured for a MEGA2560 Board.
Simple answer is: the library was intended for Uno-style shields.
David.
p.s. your Uno shield will run on the MEGA2560 but it will be slower than on a Uno.
Still can't get the screen to work, so I've decided to post some more info, in case somebody goes through the same problems. This is a video of me running graphictest_kbv, and these are all the compiler warnings I get after loading:
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\examples\graphictest_kbv\graphictest_kbv.ino: In function 'void runtests()':
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\examples\graphictest_kbv\graphictest_kbv.ino:268:26: warning: unused variable 'cnt' [-Wunused-variable]
uint8_t i, len = 24, cnt;
^~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'uint16_t MCUFRIEND_kbv::readReg(uint16_t, int8_t)':
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:165:13: warning: unused variable 'lo' [-Wunused-variable]
uint8_t lo;
^~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'uint16_t MCUFRIEND_kbv::readID()':
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:264:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (ret == 0x1526) //R61526 [xx 06 15 26] if I have written NVM
^~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:266:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if (ret == 0x89F0) //ST7735S: [xx 7C 89 F0]
^~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:197:19: warning: unused variable 'ret2' [-Wunused-variable]
uint16_t ret, ret2;
^~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'int16_t MCUFRIEND_kbv::readGRAM(int16_t, int16_t, uint16_t*, int16_t, int16_t)':
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:300:22: warning: unused variable 'tmp' [-Wunused-variable]
uint8_t r, g, b, tmp;
^~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'virtual void MCUFRIEND_kbv::setRotation(uint8_t)':
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:361:29: warning: unused variable 'REV' [-Wunused-variable]
uint16_t GS, SS_v, ORG, REV = _lcd_rev, NL;
^~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'void MCUFRIEND_kbv::begin(uint16_t)':
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1295:30: warning: unused variable 'SSD1963_NHD_50_regValues' [-Wunused-variable]
static const uint8_t SSD1963_NHD_50_regValues[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1310:30: warning: unused variable 'SSD1963_NHD_70_regValues' [-Wunused-variable]
static const uint8_t SSD1963_NHD_70_regValues[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1352:30: warning: unused variable 'SSD1963_800NEW_regValues' [-Wunused-variable]
static const uint8_t SSD1963_800NEW_regValues[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1376:30: warning: unused variable 'SSD1963_800ALT_regValues' [-Wunused-variable]
static const uint8_t SSD1963_800ALT_regValues[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1400:30: warning: unused variable 'SSD1963_480_regValues' [-Wunused-variable]
static const uint8_t SSD1963_480_regValues[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1638:31: warning: unused variable 'ST7781_regValues' [-Wunused-variable]
static const uint16_t ST7781_regValues[] PROGMEM = {
^~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1738:30: warning: unused variable 'ST7789_regValues_arcain6' [-Wunused-variable]
static const uint8_t ST7789_regValues_arcain6[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2657:30: warning: unused variable 'ILI9341_regValues_ada' [-Wunused-variable]
static const uint8_t ILI9341_regValues_ada[] PROGMEM = { // Adafruit_TFTLCD only works with EXTC=0
^~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2737:30: warning: unused variable 'ILI9481_CPT29_regValues' [-Wunused-variable]
static const uint8_t ILI9481_CPT29_regValues[] PROGMEM = { // 320x430
^~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2749:30: warning: unused variable 'ILI9481_PVI35_regValues' [-Wunused-variable]
static const uint8_t ILI9481_PVI35_regValues[] PROGMEM = { // 320x480
^~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2761:30: warning: unused variable 'ILI9481_AUO317_regValues' [-Wunused-variable]
static const uint8_t ILI9481_AUO317_regValues[] PROGMEM = { // 320x480
^~~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2772:30: warning: unused variable 'ILI9481_CMO35_regValues' [-Wunused-variable]
static const uint8_t ILI9481_CMO35_regValues[] PROGMEM = { // 320480
^~~~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2786:30: warning: unused variable 'ILI9481_RGB_regValues' [-Wunused-variable]
static const uint8_t ILI9481_RGB_regValues[] PROGMEM = { // 320x480
^~~~~~~~~~~~~~~~~~~~~
D:\Documentos\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2878:7: warning: label 'common_9488' defined but not used [-Wunused-label]
common_9488:
^~~~~~~~~~~
Sketch uses 31894bytes (98%) of program storage space. Maximum is 32256 bytes. Global variables use 1713 bytes (83%) of dynamic memory, leaving 335 bytes for local variables.
Low memory available, stability problems may occur.
The serial message is still the same as last time:
I just tried forcing the 0x9486 on the tft.begin in graphictest_kbv, but got the same behavior (blank screen with backlight on).
He gave me two of these shields, both still on individual sealed packages (same SKU and appearence). All the tests I've run until now, I ran on both screens. According to him, they were bought some time ago for a different project which never saw the light of day, so he didn't even open the packages. Could this be a problem with the whole batch?
Sorry, I don't understand what you mean by "manufacturer registers". I looked at the thread you linked, but if I understand it correctly (English is not my first language), OP got this same shield to work by using your (awesome) library with the standard pin attachment: