#define USE_SPECIAL, USE_OPENSMART_SHIELD_PINOUT_MEGA
link shows board with RM68090 which is supported as default
if your board is printed HX8347G #define SUPPORT_8347D
In fact you could use OPENSMART_kbv class instead of MCUFRIEND_kbv class for the Open-Smart displays
I obviously miss that (and much more...). I will try it. As I said, I am very new in Arduino and C++.
....
Edit:
Yeah, I inherit OPENSMART class in my class, and everthing is, of course, working well. Next time, I will read all much carefully. You already did all, I must say excellent work. I just need to comment or uncomment #define USE_SPECIAL
with USE_OPENSMART_SHIELD_PINOUT_MEGA
and that's all.
Again, realy great work.
Dear David,
I executed diagnose_TFT_support and received this message on serial monitor:
Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt
tft.readID() finds: ID = 0xD3D3
MCUFRIEND_kbv version: 2.9.9
Probably a write-only Mega2560 Shield
Try to force ID = 0x9481
PORTRAIT is 320 x 480
Run the examples/graphictest_kbv sketch
All colours, text, directions, rotations, scrolls
should work. If there is a problem, make notes on paper
Post accurate description of problem to Forum
Or post a link to a video (or photos)
I rely on good information from remote users
I used the following code in arduino but it is not working! Please help me what should I do?
Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)
reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 04 04 04 04 Manufacturer ID
reg(0x0009) 09 09 09 09 09 Status Register
reg(0x0061) 61 61 RDID1 HX8347-G
reg(0x0062) 62 62 RDID2 HX8347-G
reg(0x0063) 63 63 RDID3 HX8347-G
reg(0x0064) 64 64 RDID1 HX8347-A
reg(0x0065) 65 65 RDID2 HX8347-A
reg(0x0066) 66 66 RDID3 HX8347-A
reg(0x0067) 67 67 RDID Himax HX8347-A
reg(0x0070) 70 70 Panel Himax HX8347-A
reg(0x00A1) A1 A1 A1 A1 A1 RD_DDB SSD1963
reg(0x00B0) B0 B0 RGB Interface Signal Control
reg(0x00B4) B4 B4 Inversion Control
reg(0x00B6) B6 B6 B6 B6 B6 Display Control
reg(0x00B7) B7 B7 Entry Mode Set
reg(0x00BF) BF BF BF BF BF BF ILI9481, HX8357-B
reg(0x00C0) C0 C0 C0 C0 C0 C0 Panel Control
reg(0x00CC) CC CC Panel Control
reg(0x00D0) D0 D0 D0 Power Control
reg(0x00D2) D2 D2 D2 D2 D2 NVM Read
reg(0x00D3) D3 D3 D3 D3 ILI9341, ILI9488
reg(0x00DA) DA DA RDID1
reg(0x00DB) DB DB RDID2
reg(0x00DC) DC DC RDID3
reg(0x00EF) EF EF EF EF EF EF ILI9327
reg(0x00F2) F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 Adjust Control 2
reg(0x00F6) F6 F6 F6 F6 Interface Control
Actually I am using arduino nano instead of uno. I connected all pins including SD card pins and received the following message:
Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)
Yes, you have plugged it into all the correct Nano pins. But it was a lot of hard work.
I have a "Nano Adapter". It has regular Arduino headers and a socket for the Nano.
This turns the Nano into a regular Uno.
Anyway, this shows that you have an ILI9340
reg(0x00D3) 00 00 93 40 ILI9341, ILI9488
All the MCUFRIEND_kbv examples should find ID = 0x9340. All examples should work 100%.
Why would anyone use a Nano with a "Uno shield" ?
You will have dozens of wires. And everything will be "unreliable"
Please let us know if your display is ok.
Note that your Mcufriend pcb design is "crap" because there is no regulator chip. The old Mcufriend pcb had an AMS1117 regulator.
The 2.4 inch screens will probably work ok with Nano, Uno, Mega.
3.5 inch screens will draw too much current from the Arduino 3.3V pin.
Thank you very much for your help and consideration. When I use this code the screen of mcufriend module is blinking and it does not show any text. What is the problem?
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
//#define BLUE 0x001F #define RED 0xF800 #define WHITE 0xFFFF
Please run the LCD_ID_readreg example.
Check that it is giving the correct output i.e. as in #2769
Then run all the other MCUFRIEND_kbv examples.
If an example does not work, quote the example sketch name.
Describe the problem.
I have no intention of even looking at your "code" until you have run the library examples.
And you have edited your message "code" to use Code Tags i.e. </> icon
Hi, I have a 3.5" ili9486 tft shield (8-bit) which was designed for Uno. I'm currently using it on a mega (not as a shield, but with Dupont extensions). The problem is it takes about 6 seconds to display a bmp image from SD card, while the Uno take about 4 seconds. I believe it's because the port mapping on mega splits the data bus into 3 PORTS.
I'd like to have the pin assignments changed so that all lcd data pins are on either PORT A or PORT C, both of which have 8 pins available.
Go on. There is current thread about displaying RAW images.
There are often threads about wiring a Shield to PortA on a Mega2560.
e.g. USE_SPECIAL, USE_MEGA_8BIT_PROTOSHIELD
My showBMP example is designed for multiple formats. It will run on Uno
If you strip it down to 24-bit .BMP files and increase buffer sizes, it will run faster on a Mega.
Any "display from SD" will depend on SD hardware, access of FAT filesystem, decode of image format, blitting of pixels to TFT.
A Uno shield suffers from all these Mega features.
Hardware SPI is faster than bit-bang SPI. Smaller files mean less SPI traffic. .BMP images are big but simple to decode. .RAW files are smaller and simpler. .JPG files can be very SMALL but require CPU power and SRAM.