Go Down

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

jxid

Please let me understand.
I run diagnose_TFT_support.ino for a display i have and i got ID=0XB509
I know that the IC driver is R61509V
How does it comes from B509?

jxid

I will put the improved TouchScreen_Calibr_native sketch onto the GitHub Beta.
It is simple ideas that make a big difference.

Yes that would be very helpful since as i told you there are not shown highlighted Cross-hairs.
Thank myou for that mod.

david_prentice

Read extra/mcufriend_how_to.txt

Observe the ID values for R61505 variants: R61505U, R61505V, R61505W
The ID values for R61509 variants: R61509U, R61509V, R61509W follow the same pattern.

David.

jxid

Read extra/mcufriend_how_to.txt

Observe the ID values for R61505 variants: R61505U, R61505V, R61505W
The ID values for R61509 variants: R61509U, R61509V, R61509W follow the same pattern.

David.
Thank you David

david_prentice

What sketch are you trying to compile?
What library version numbers are you using?
Did you install libraries via the IDE Library Manager?

David.

sgorak

Hi, thanks for the reply.  I found the problem after digging into the files more deeply.  The posted code included "myicon" where as the icon.c matrix variable was "myicons".

david_prentice

We don't know what sketch you are trying to  build.

graphictest_kbv shows a penguin  but you  can enable other icons if  you edit the sketch

drawBitmap_kbv shows the GFX methods as well as the hardware pushColors() method.

It is always wise to start with library examples.    Experiment and adapt for your purposes.
Quote the library example that  is giving you a problem.

David.

Dancopy

I apologize to David here who has already explained something, but for me it is still unclear how I should connect (Pins) a SPI Beakout card, as in the attached link, to an Arduino, either Uno or Mega, or even ESP.

If anyone can enlighten me, I would be very grateful.

Link: https://www.ebay.com/itm/3-5-inch-480-320-SPI-Serial-TFT-LCD-Module-Display-Screen-Driver-IC-ILI9488/192714343868?var=492856453212

david_prentice

This thread is about MCUFRIEND parallel Shields
Your question is about a 3.3V Red SPI display
Please ask questions on appropriate threads.

Code: [Select]

ESP32:
connect TFT_SCK, T_SCK, SD_SCK to GPIO18
connect TFT_SDI, T_SDI, SD_MOSI to GPIO23
connect TFT_SDO, T_SDO, SD_MISO to GPIO19 (omit TFT_SDO for ILI9488)
connect TFT_RST to any GPIO pin
connect TFT_DC to any GPIO pin    (sometimes called TFT_RS or TFT_A0)
connect TFT_CS to any GPIO pin
connect T_CS to any GPIO pin
connect SD_CS to any GPIO pin

ESP8266:
connect TFT_SCK, T_SCK, SD_SCK to D13
connect TFT_SDI, T_SDI, SD_MOSI to D11   (sometimes called TFT_MOSI)
connect TFT_SDO, T_SDO, SD_MISO to D12 (omit TFT_SDO for ILI9488)
connect TFT_RST to any GPIO pin
connect TFT_DC to any GPIO pin    (sometimes called TFT_RS or TFT_A0)
connect TFT_CS to any GPIO pin
connect T_CS to any GPIO pin
connect SD_CS to any GPIO pin

Make sure that you configure correctly in User_Setup.h

I strongly advise to just copy Bodmer's TFT_eSPI default wiring.

Regarding Uno or Mega.   This requires using level shifters.   Probably too complex for you.

David.

Dancopy

#2814
Oct 06, 2019, 08:17 pm Last Edit: Oct 06, 2019, 08:31 pm by Dancopy Reason: Addition
Hi David, thanks for the quick reply!

You say: "Make sure that you set up correctly in User_Setup.h"

But, I'm referring to the MCUFRIEND_kbv library (which doesn't have User_Setup.h)

You say, "Regarding Uno or Mega. This requires using level shifters. Probably too complex for you."

Yes, I already made this kind of connection, so to finish, what would the pins on Uno or Mega look like?

Could you give me an example of how it looks in the constructor for both Uno/Mega and ESP?

Thank you one more time

PS: If you feel it is not good to answer me here, could you link to the appropriate topic?

Khalil-Errahmane


the output of TFT_support
_________________________

tft.readID() finds: ID = 0x8A28
MCUFRIEND_kbv version: 2.9.8
This ID is not supported

the output of LCD_ID_readreg
_________________________
reg(0x0000) 8A 28   ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 08 08 08 08   Manufacturer ID
reg(0x0009) 08 08 08 08 08   Status Register
reg(0x000A) 08 08   Get Power Mode
reg(0x000C) 08 08   Get Pixel Format
reg(0x0061) 08 08   RDID1 HX8347-G
reg(0x0062) 08 08   RDID2 HX8347-G
reg(0x0063) 08 08   RDID3 HX8347-G
reg(0x0064) 08 08   RDID1 HX8347-A
reg(0x0065) 08 08   RDID2 HX8347-A
reg(0x0066) 08 08   RDID3 HX8347-A
reg(0x0067) 08 08   RDID Himax HX8347-A
reg(0x0070) 2F 08   Panel Himax HX8347-A
reg(0x00A1) 08 08 08 08 08   RD_DDB SSD1963
reg(0x00B0) 08 08   RGB Interface Signal Control
reg(0x00B4) 08 08   Inversion Control
reg(0x00B6) 08 08 08 08 08   Display Control
reg(0x00B7) 08 08   Entry Mode Set
reg(0x00BF) 08 08 08 08 08 08   ILI9481, HX8357-B
reg(0x00C0) 08 08 08 08 08 08 08 08 08   Panel Control
reg(0x00C8) 08 08 08 08 08 08 08 08 08 08 08 08 08   GAMMA
reg(0x00CC) 08 08   Panel Control
reg(0x00D0) 08 08 08   Power Control
reg(0x00D2) 08 08 08 08 08   NVM Read
reg(0x00D3) 08 08 08 08   ILI9341, ILI9488
reg(0x00D4) 08 08 08 08   Novatek ID
reg(0x00DA) 08 08   RDID1
reg(0x00DB) 08 08   RDID2
reg(0x00DC) 08 08   RDID3
reg(0x00E0) 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08   GAMMA-P
reg(0x00E1) 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08   GAMMA-N
reg(0x00EF) 08 08 08 08 08 08   ILI9327
reg(0x00F2) 08 08 08 08 08 08 08 08 08 08 08 08   Adjust Control 2
reg(0x00F6) 08 08 08 08   Interface Control

how can I solve this??? i'm using an Arduino UNO.

david_prentice

Please post a link to the actual shield that you have bought e.g. Ebay sale
Or post a photo of the pcb side of the Shield.

Are you using a Uno ?

David.

Khalil-Errahmane

Yes, I am using a Uno.
Please find enclosed two photos showing the front and the rear of the Shield. Thanks!!

david_prentice

The good news is that you have an AMS1117 regulator on the pcb.   (chip at bottom right)
The bad news is that I have no idea what the TFT controller is.

I can only suggest that you try tft.begin(0x9320);
i.e. edit setup() in graphictest_kbv example

Please report back.
If no success,  ask the shop for a full refund.

This will encourage the shop to ask their supplier what controller is mounted.
And I can support it properly.   i.e. the shop will have happy customers !!!

David.

skala

Hello David !
I am using your library with my UNO + display with 9488 more than 2 years and I have to say - library is amazing !  But I need upgrade my home automatization to mega. On mega i need all PWM outputs, therefore I rewired pins D0-D7 to Pins 22-29 (PORTA).

According to your instructions in "how to"  was changed :
Edit mcufriend_shield.h:  #define USE_SPECIAL
Edit mcufriend_special.h: #define USE_MEGA_8BIT_SHIELD

and in to the sketch  I added:
#define USE_SPECIAL
#define USE_MEGA_8BIT_SHIELD
after this change I see on osciloscope some data on pins 22-29, but on TFT I have not picture, .... only gray screen. Do you have an idea, please, what I do wrong ? I am quite beginner, and after almost one week I dont know how continue, ...... Thank for your help in advance !
   

Go Up