Go Down

Topic: MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields (Read 490190 times) previous topic - next topic

david_prentice

I love you.

I wish that everyone gave good feedback.

current v2.9.8 Release
Code: [Select]

    case 0x9340:                //ILI9340 thanks Ravi_kanchan2004.
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS | REV_SCREEN;
        goto common_9341;
    case 0x9341:
      common_9341:
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS;

change it to:
Code: [Select]

    case 0x9340:                //ILI9340 thanks Ravi_kanchan2004.
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS | REV_SCREEN;
        goto common_9341;
    case 0x9341:
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS;
      common_9341:


It "looks" as if Ravi_kanchan2004 reported the REV_SCREEN issue.
I made an incorrect edit.
Nobody questioned it.

Until you.   So many thanks.

Please tell me if this solves it.

David.

valmor_jr

perfect friend, now all the colors and the penguin appear perfectly, and in the last image makes the correct color and penguin inversion

david_prentice

Woo-Hoo.    I wish that everyone reported things like this.    You can see how simple it was.

Thanks.   I will put it in the Beta on GitHub.   Which means it will appear in the next Release.


David.

valmor_jr


Dancopy

Hello everyone!
Does anyone here have the "phonecall sketch" (with the mcufriend or Bodmer's library) to use with the SIM800L or SIM900 card running like a Real Phone? (Shield or Breakout) Thank you all

Pinhone

Dear david_pretice,
Listen to my case.
I am trying to use the 3.5 inch screen shield (ili9486) connected to a new ARDUINO MEGA 2560 PRO card.
When I test the shield on another arduino (UNO OR MEGA) it works normally.
But when turning on the ARDUINO MEGA 2560 PRO the screen does not work. Uploads the program normally but does not display anything on the screen.

When using the default program LCD_ID_Reader, I get the following return:

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) 00 44 80 66   Manufacturer ID
reg(0x0009) 00 00 61 00 00   Status Register
reg(0x000A) 00 08   Get Powsr Mode
reg(0x000C) 00 66   Get Pixel Format
reg(0x0061) 00 00   RDID1 HX8347-G
reg(0x0062) 00 00   RDID2 HX8347-G
reg(0x0063) 00 00   RDID3 HX8347-G
reg(0x0064) 00 00   RDID1 HX8347-A
reg(0x0065) 00 00   RDID2 HX8347-A
reg(0x0066) 00 00   RDID3 HX8347-A
reg(0x0067) 00 00   RDID Himax HX8347-A
reg(0x0070) 10 10   Panel Himax HX8347-A
reg(0x00A1) 00 A0 01 01 01   RD_DDB SSD1963
reg(0x00B0) 10 10   RGB Interface Signal Control
reg(0x00B4) 10 10   Inversion Control
reg(0x00B6) 10 12 12 3B 3B   Display Control
reg(0x00B7) 10 16   Entry Mode Set
reg(0x00BF) 10 10 10 10 10 10   ILI9481, HX8357-B
reg(0x00C0) 00 0E 0E 0E 0E 0E 0E 0E 0E   Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00   GAMMA
reg(0x00CC) 00 66   Panel Control
reg(0x00D0) 10 1E 1E   Power Control
reg(0x00D2) 10 33 33 33 33   NVM Read
reg(0x00D3) 10 10 94 96   ILI9341, ILI9488
reg(0x00DA) 10 54   RDID1
reg(0x00DB) 10 90   RDID2
reg(0x00DC) 10 14   RDID3
reg(0x00E0) 00 0A 21 2F 05 00 02 2B CA 67 03 0E 0B 0B 28 07   GAMMA-P
reg(0x00E1) 00 26 04 00 2C 0F 0F 04 02 02 02 02 02 02 02 02   GAMMA-N
reg(0x00EF) 00 00 00 00 00 00   ILI9327
reg(0x00F2) 10 18 B3 12 12 B2 12 FF 10 10 10 10   Adjust Control 2
reg(0x00F6) 10 54 90 76   Interface Control




Help me Please.

david_prentice

Plug your Shield into a regular Uno or Mega.   Run LCD_ID_readreg.ino

Compare with #2840.   If it is different,  say so.

God gave you Arduino Shields.
The Devil invented the MEGA 2560 PRO.

Arduino has never designed or manufactured a MEGA 2560 PRO (as far as I know)

David.

Pinhone

Thanks to answer.

When Runs with an arduino regular MEGA, shows this:


 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) 00 54 80 66   Manufacturer ID
reg(0x0009) 00 00 61 00 00   Status Register
reg(0x000A) 00 08   Get Power Mode
reg(0x000C) 00 66   Get Pixel Format
reg(0x0061) 00 00   RDID1 HX8347-G
reg(0x0062) 00 00   RDID2 HX8347-G
reg(0x0063) 00 00   RDID3 HX8347-G
reg(0x0064) 00 00   RDID1 HX8347-A
reg(0x0065) 00 00   RDID2 HX8347-A
reg(0x0066) 00 00   RDID3 HX8347-A
reg(0x0067) 00 00   RDID Himax HX8347-A
reg(0x0070) 00 00   Panel Himax HX8347-A
reg(0x00A1) 00 93 30 93 30   RD_DDB SSD1963
reg(0x00B0) 00 00   RGB Interface Signal Control
reg(0x00B4) 00 00   Inversion Control
reg(0x00B6) 00 02 02 3B 3B   Display Control
reg(0x00B7) 00 06   Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 00 0E 0E 0E 0E 0E 0E 0E 0E   Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00   GAMMA
reg(0x00CC) 00 04   Panel Control
reg(0x00D0) 00 00 00   Power Control
reg(0x00D2) 00 00 00 00 00   NVM Read
reg(0x00D3) 00 00 94 86   ILI9341, ILI9488
reg(0x00D4) 00 00 00 00   Novatek ID
reg(0x00DA) 00 54   RDID1
reg(0x00DB) 00 80   RDID2
reg(0x00DC) 00 66   RDID3
reg(0x00E0) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   GAMMA-P
reg(0x00E1) 00 0F 2F 2B 0C 0E 06 47 76 37 07 11 04 23 1E 00   GAMMA-N
reg(0x00EF) 00 80 00 10 60 40   ILI9327
reg(0x00F2) 00 18 A3 12 02 B2 12 FF 10 00 00 00   Adjust Control 2
reg(0x00F6) 00 54 80 66   Interface Control


#######some lines are diferent.
 Daniel from Brazil.

david_prentice

Quote
#######some lines are diferent.
 Daniel from Brazil.
It is your job to identify which lines are different.
And to ensure that your wiring is well-routed.

The readreg report should be exactly the same on any platform.

David.


Pinhone

I can identify the different lines.
But I dont have enough knowledge to know how to proceed.
I am new with arduino.
If you can give any direction, thank you.

Pinhone

Hi David,

Finally got the shield working, it looks like the mega 2560 did not have the well addressed pins A0, A1, D2-D9 or they came out defective. The devil did a great job here.
changed the mcufriend_special.h file to work with USE_MEGA_8BIT_PROTOSHIELD and changed the fingerprints to work on D22-D29 (# 2819, # 2825 and # 2827), assigns the analog ports as you suggest in another forum MCUFRIEND_kbv - Reassignment of Control and Digital Pins # 5).
I changed the YP, XM to A4, A5 and YM, XP to 23, 22.
Now everything works perfectly. The shield's response seemed to me faster than in a UNO  regular.

Congratulations for the great work and thanks for your help.
Daniel

medpixman

David: Your software and your willingness to help are unmatched. Kudos to you!

I'm trying to use this:
https://www.banggood.com/Geekcreit-UNO-R3-Improved-Version-2_8TFT-LCD-Touch-Screen-2_4TFT-Touch-Screen-Display-Module-Kit-For-Arduino-p-1428291.html?rmmds=myorder&cur_warehouse=CN
On the back it says:
2.8" TFT LCD Shield
RM68090

I used your excellent diagnose program to find this:

tft.readID() finds: ID = 0x6809

MCUFRIEND_kbv version: 2.9.9


PORTRAIT is 240 x 320

Now using the graphictest_kvb

I see the text & graphics very faintly (poor contrast) but then with the complex graphics the screen gets very noisy with flashing and flickering light/dark bars. Is this a defective display - or is there a software fix?

david_prentice

I always advise using the Release.  i.e. install v2.9.8 via the IDE Library Manager

Please compare the pcb on your desk with the photo of the Blue pcb in your link.
Does it match?
Does it contain 74HC245 buffers?
Did you buy it with the Uno clone?
Do you own a Zero or Due?  i.e. 3.3V GPIO

I do not have a 2.8 inch with RM68090

David.

medpixman

Thanks so much for the rapid response. Here's a link to video of the TFT LCD: https://youtu.be/5p_JP5kI4Jk

I did get both a 2.4" and the 2.8" with a Geekcreit UNO clone. I don't have a Zero or Due. There are two ICs on the bottom of the board - I can't read the markings.

david_prentice

The i.c. markings should be readable.

The Blue pcb has no 3.3V regulator.  So it will power the backlight from the Uno 3.3V pin.
Likewise the Red pcb.   Does the Red pcb work?   What controller is on the Red pcb?

Your "video" does not show anything.
What is it supposed to be displaying?

David.

Go Up