Hello, I've bought this LCD shield:
Link
I cannot get it to work, could someone show me some example code? I have also attached a photo.
I have this result from LCD_ID_Reader:
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) 08 08 08 08 08 Status Register
reg(0x000A) 08 08 Get Power Mode
reg(0x000C) 0C 0C Get Pixel Format
reg(0x0061) 20 20 RDID1 HX8347-G
reg(0x0062) 20 20 RDID2 HX8347-G
reg(0x0063) 20 20 RDID3 HX8347-G
reg(0x0064) 24 24 RDID1 HX8347-A
reg(0x0065) 24 24 RDID2 HX8347-A
reg(0x0066) 24 24 RDID3 HX8347-A
reg(0x0067) 24 24 RDID Himax HX8347-A
reg(0x0070) 20 20 Panel Himax HX8347-A
reg(0x00A1) 20 20 F3 20 20 RD_DDB SSD1963
reg(0x00B0) 20 20 RGB Interface Signal Control
reg(0x00B4) 24 24 Inversion Control
reg(0x00B6) 24 24 24 24 24 Display Control
reg(0x00B7) 24 26 Entry Mode Set
reg(0x00BF) 2E 2E 2C 2C 2C 2C ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control
reg(0x00C8) 08 08 08 08 08 08 08 08 08 08 08 08 08 GAMMA
reg(0x00CC) 0C 0C Panel Control
reg(0x00D0) 00 00 00 Power Control
reg(0x00D2) 00 00 00 00 00 NVM Read
reg(0x00D3) 00 00 00 00 ILI9341, ILI9488
reg(0x00D4) 04 04 04 04 Novatek ID
reg(0x00DA) 08 08 RDID1
reg(0x00DB) 08 08 RDID2
reg(0x00DC) 0C 0C RDID3
reg(0x00E0) 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 GAMMA-P
reg(0x00E1) 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 GAMMA-N
reg(0x00EF) 2C 2C 2C 2C 2C 2C ILI9327
reg(0x00F2) 20 20 20 20 20 20 20 20 20 20 20 20 Adjust Control 2
reg(0x00F6) 24 24 24 24 Interface Control
I've tried SD through SPI and it works with Arduino SD library.
You have an OPEN-SMART Shield. It works with MCUFRIEND_kbv but only as a SPECIAL.
You must edit two files. (just remove the double slashes //
) e.g.
utility/mcufriend_shield.h:
#define USE_SPECIAL
utility/mcufriend_special.h:
#define USE_OPENSMART_SHIELD_PINOUT //thanks Michel53
The LCD_ID_readreg.ino sketch should work if you edit the #defines to match the pinout printed on the pcb.
David.
p.s. it is only supported for UNO and MEGA. If anyone is using other boards, please ask.
@david_prentice thank you very much, now it works 
david_prentice:
You have an OPEN-SMART Shield. It works with MCUFRIEND_kbv but only as a SPECIAL.
You must edit two files. (just remove the double slashes //
) e.g.
utility/mcufriend_shield.h:
#define USE_SPECIAL
utility/mcufriend_special.h:
#define USE_OPENSMART_SHIELD_PINOUT //thanks Michel53
The LCD_ID_readreg.ino sketch should work if you edit the #defines to match the pinout printed on the pcb.
David.
p.s. it is only supported for UNO and MEGA. If anyone is using other boards, please ask.
To david_prentice:
I have a OPEN-SMART shield ILI9327 special LCD. I follow your instructions and make it work, but the color is not correct.
Can you help to fix it.
thanks
Run the graphictest_kbv example.
Report back with what colours are wrong.
David.
david_prentice:
Run the graphictest_kbv example.
Report back with what colours are wrong.
David.
this is result
I think color is inverted
I modified in test code with add
tft.invertDisplay(true);
after
tft.begin(ID);
and it is OK.
can you fix it on library?
I have add below code into function void MCUFRIEND_kbv::invertDisplay(boolean i) of MCUFRIEND_kbv.cpp file
if(_lcd_ID == 0x9327){
i = i?false:true;
}
this is fixed.
There are two ways to solve your problem:
case 0x9327:
_lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | REV_SCREEN;
...
Since most apps never change rotations or colour inversion in loop(), you just add this line to setup()
if (ID == 0x9327) tft.invertDisplay(1);
David.
To david_prentice:
My tft only show for few seconds an image when open the monitor serial of the ide arduino.
The driver of my tft is ILI9225.
How I can resolv this problem?
VictorErnesto:
To david_prentice:
My tft only show for few seconds an image when open the monitor serial of the ide arduino.
The driver of my tft is ILI9225.
How I can resolv this problem?
Please post a link to the actual ILI9225 shield that you have.
And say which Arduino board you have plugged it into.
David.
I use the OPEN-SMART 2.2" TFT LCD Touch Screen Board Module with Touch Pen (http://www.dx.com/p/open-smart-2-2-tft-lcd-touch-screen-board-module-with-touch-pen-467508#.WihC5jdrzIU) and the board that I use is the Arduino Mega 2560.
From your link:
- Operating voltage: 3.3V;
- Logic level: 3.3V;
The Mega2560 is a 5V device.
Things do not emit smoke immediately. But I would not expect it to survive for more than a few minutes.
The link also advise:
- Compatibility: Because the logic level is 3.3V, it is compatible with 3.3V Arduino board, you need to add a level conversion circuit if you use a 5V Arduino Board (Arduino UNO R3 / Arduino Mega2560 / Arduino Leonardo).
I have one of these displays. (for testing the library code)
It works fine. With VCC = 3.3V and 3.3V logic. e.g. from Zero or Due.
David.
david_prentice:
From your link:
The Mega2560 is a 5V device.
Things do not emit smoke immediately. But I would not expect it to survive for more than a few minutes.
The link also advise:
I have one of these displays. (for testing the library code)
It works fine. With VCC = 3.3V and 3.3V logic. e.g. from Zero or Due.
David.
Actually I have used the port 3.3V of the arduino, that port shouldn't enough for supply the TFT?
No. It says quite clearly that you should use 3.3V Logic or provide level shifters with 5V Logic.
Obey the advice. Everything might be ok if you have not already damaged your ILI9225.
David.
Thank you David, my tft it works.