rogerclarkmelbourne / Arduino_STM32

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
Other
2.54k stars 1.26k forks source link

Mcufriend 2.4 TFT not working using SPI mode #644

Closed nikjayswal closed 5 years ago

nikjayswal commented 5 years ago

include // Core graphics library

include // Hardware-specific library

include

MCUFRIEND_kbv tft;

include <Fonts/FreeSans9pt7b.h>

include <Fonts/FreeSans12pt7b.h>

include <Fonts/FreeSerif12pt7b.h>

include

define BLACK 0x0000

define RED 0xF800

define GREEN 0x07E0

define WHITE 0xFFFF

define GREY 0x8410

/* PIN MAPPING

void loop(void) { tft.fillScreen(BLACK); }

nikjayswal commented 5 years ago

Mcufriend 2.4 tft not displaying anything using SPI mode only white screen.

nikjayswal commented 5 years ago

LCD_ID_readreg: ngle 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) 47 47 ID: ILI9320, ILI9325, ILI9335, ... reg(0x0004) 00 00 00 00 Manufacturer ID reg(0x0009) 3F 3F 3F 3F 3F Status Register reg(0x000A) 00 00 Get Power Mode reg(0x000C) 01 01 Get Pixel Format reg(0x0061) 00 00 RDID1 HX8347-G reg(0x0062) 80 80 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 00 00 00 00 RD_DDB SSD1963 reg(0x00B0) 00 00 RGB Interface Signal Control reg(0x00B4) 00 00 Inversion Control reg(0x00B6) 00 00 00 00 00 Display Control reg(0x00B7) 00 00 Entry Mode Set reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA reg(0x00CC) 00 00 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) 00 00 00 00 Novatek ID reg(0x00DA) 00 00 RDID1 reg(0x00DB) 00 00 RDID2 reg(0x00DC) 00 00 RDID3 reg(0x00E0) 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 GAMMA-P reg(0x00E1) 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 GAMMA-N reg(0x00EF) 49 49 49 49 49 49 ILI9327 reg(0x00F2) 10 10 10 10 10 10 10 10 10 10 10 10 Adjust Control 2 reg(0x00F6) 00 00 00 00 Interface Control