Neznámy display
Napsal: 16 čer 2020, 17:16
Ahoj, objednal jsem z Ali display...
pomoci arduina Mega jsem nechal vypsat jeho parametry, sice na začátku výpisu to vypisuje že je to display 2,4" ale je to správně 3.5"
Ani zaboha nemůžu přijít na to jak to oživit....
a když tam změním na
tak je to sice dobre, ale hrozne ten display problikava
pomoci arduina Mega jsem nechal vypsat jeho parametry, sice na začátku výpisu to vypisuje že je to display 2,4" ale je to správně 3.5"
jediný co mi funguje s tímto displeyem je :6:48:54.529 -> TFT LCD test
16:48:54.575 -> Using Adafruit 2.4" TFT Breakout Board Pinout
16:48:54.629 -> TFT size is 320x480
16:51:35.011 -> Read Registers on MCUFRIEND UNO shield
16:51:35.062 -> controllers either read as single 16-bit
16:51:35.108 -> e.g. the ID is at readReg(0)
16:51:35.162 -> or as a sequence of 8-bit values
16:51:35.162 -> in special locations (first is dummy)
16:51:35.209 ->
16:51:35.209 -> reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
16:51:35.262 -> reg(0x0004) 00 54 80 66 Manufacturer ID
16:51:35.309 -> reg(0x0009) 00 00 61 00 00 Status Register
16:51:35.385 -> reg(0x000A) 00 08 Get Power Mode
16:51:35.432 -> reg(0x000C) 00 66 Get Pixel Format
16:51:35.432 -> reg(0x0061) 00 00 RDID1 HX8347-G
16:51:35.478 -> reg(0x0062) 00 00 RDID2 HX8347-G
16:51:35.525 -> reg(0x0063) 00 00 RDID3 HX8347-G
16:51:35.562 -> reg(0x0064) 00 00 RDID1 HX8347-A
16:51:35.609 -> reg(0x0065) 00 00 RDID2 HX8347-A
16:51:35.609 -> reg(0x0066) 00 00 RDID3 HX8347-A
16:51:35.662 -> reg(0x0067) 00 00 RDID Himax HX8347-A
16:51:35.709 -> reg(0x0070) 00 00 Panel Himax HX8347-A
16:51:35.762 -> reg(0x00A1) 00 93 30 93 30 RD_DDB SSD1963
16:51:35.809 -> reg(0x00B0) 00 00 RGB Interface Signal Control
16:51:35.862 -> reg(0x00B4) 00 00 Inversion Control
16:51:35.862 -> reg(0x00B6) 00 02 02 3B 3B Display Control
16:51:35.902 -> reg(0x00B7) 00 06 Entry Mode Set
16:51:35.962 -> reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B
16:51:36.009 -> reg(0x00C0) 00 0E 0E 0E 0E 0E 0E 0E 0E Panel Control
16:51:36.063 -> reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
16:51:36.109 -> reg(0x00CC) 00 04 Panel Control
16:51:36.163 -> reg(0x00D0) 00 00 00 Power Control
16:51:36.210 -> reg(0x00D2) 00 00 00 00 00 NVM Read
16:51:36.264 -> reg(0x00D3) 00 00 94 86 ILI9341, ILI9488
16:51:36.264 -> reg(0x00D4) 00 00 00 00 Novatek ID
16:51:36.310 -> reg(0x00DA) 00 54 RDID1
16:51:36.348 -> reg(0x00DB) 00 80 RDID2
16:51:36.348 -> reg(0x00DC) 00 66 RDID3
16:51:36.402 -> reg(0x00E0) 00 00 0A 07 0F 07 0E 4A 67 58 01 05 05 38 26 0E GAMMA-P
16:51:36.463 -> reg(0x00E1) 00 0E 1A 09 0D 0B 0F 70 87 79 0D 07 0D 06 08 03 GAMMA-N
16:51:36.564 -> reg(0x00EF) 00 80 00 10 60 40 ILI9327
16:51:36.564 -> reg(0x00F2) 00 18 A3 12 02 B2 12 FF 10 00 00 00 Adjust Control 2
16:51:36.664 -> reg(0x00F6) 00 54 80 66 Interface Control
ale je to vše zrcadlově otočené// IMPORTANT: Adafruit_TFTLCD LIBRARY MUST BE SPECIFICALLY
// CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD.
// SEE RELEVANT COMMENTS IN Adafruit_TFTLCD.h FOR SETUP.
//Technical support:goodtft@163.com
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library
// The control pins for the LCD can be assigned to any digital or
// analog pins...but we'll use the analog pins as this allows us to
// double up the pins with the touch screen (see the TFT paint example).
#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0
#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin
// When using the BREAKOUT BOARD only, use these 8 data lines to the LCD:
// For the Arduino Uno, Duemilanove, Diecimila, etc.:
// D0 connects to digital pin 8 (Notice these are
// D1 connects to digital pin 9 NOT in order!)
// D2 connects to digital pin 2
// D3 connects to digital pin 3
// D4 connects to digital pin 4
// D5 connects to digital pin 5
// D6 connects to digital pin 6
// D7 connects to digital pin 7
// For the Arduino Mega, use digital pins 22 through 29
// (on the 2-row header at the end of the board).
// Assign human-readable names to some common 16-bit color values:
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
// If using the shield, all control and data lines are fixed, and
// a simpler declaration can optionally be used:
// Adafruit_TFTLCD tft;
void setup(void) {
Serial.begin(9600);
Serial.println(F("TFT LCD test"));
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
Serial.println(F("Using Adafruit 2.4\" TFT Arduino Shield Pinout"));
#else
Serial.println(F("Using Adafruit 2.4\" TFT Breakout Board Pinout"));
#endif
Serial.print("TFT size is "); Serial.print(tft.width()); Serial.print("x"); Serial.println(tft.height());
tft.reset();
tft.begin(0x9481);
}
void loop(void) {
Serial.println(F("I'm know"));
tft.fillScreen(BLACK);
unsigned long start = micros();
tft.setCursor(0, 0);
Serial.println(F("I'm know"));
tft.setTextColor(RED); tft.setTextSize(1);
tft.println("Hello World!");
tft.println(01234.56789);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.println();
tft.setTextColor(GREEN); tft.setTextSize(2);
tft.println("Hello World!");
tft.println(01234.56789);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.println();
tft.setTextColor(BLUE); tft.setTextSize(3);
tft.println("Hello World!");
tft.println(01234.56789);
tft.println(0xDEADBEEF, HEX);
tft.setTextColor(WHITE); tft.setTextSize(4);
tft.println("Hello!");
tft.setTextColor(YELLOW); tft.setTextSize(5);
tft.println("Hello!");
tft.setTextColor(RED); tft.setTextSize(6);
tft.println("Hello!");
tft.println();
tft.println();
/*
tft.println();
tft.setTextColor(GREEN);
tft.setTextSize(5);
tft.println("Groop");
tft.setTextSize(2);
tft.println("I implore thee,");
tft.setTextSize(1);
tft.println("my foonting turlingdromes.");
tft.println("And hooptiously drangle me");
tft.println("with crinkly bindlewurdles,");
tft.println("Or I will rend thee");
tft.println("in the gobberwarts");
tft.println("with my blurglecruncheon,");
tft.println("see if I don't!");*/
delay(1000);delay(1000);delay(1000);delay(1000);delay(1000);
}
Ani zaboha nemůžu přijít na to jak to oživit....
a když tam změním na
Kód: Vybrat vše
tft.begin(0x9341);