Replies: 1 comment
-
After a few days of trial and error my problem is finally solved :-)) The working User_setup.h #define TOUCH_CS 17 #define TOUCH_IRQ 25 #define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW) #define SD_CS 16 /*
/ #define TFT_CS PIN_D8 // Chip select control pin D8 #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define SMOOTH_FONT #define SPI_FREQUENCY 10000000 #define SPI_READ_FREQUENCY 5000000 #define SPI_TOUCH_FREQUENCY 2500000 // #define SUPPORT_TRANSACTIONS -NoGi47 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I used an "old" Waveshare 3.2" display with an ILI9341 controller.
It worked quite nicely with TFT_eSPI including buttons and touch.
But unfortunately I broke it and had to replace it.
The replacement came with an ILI9486 controller.
Since the pins on both displays are the same I did not expect any problems besides
changing the #define ILI9341_DRIVER in User_Setup.h to #define ILI9486_DRIVER.
After days of frustrating trial and ERROR I signed up on GitHUB and hope you can help me
solve this puzzle.
When I upload the Sketch only the backlight and the touch functions work.
I can use the defined buttons and in the serial monitor even the touch functions work.
Seems like the SPI function is working properly but only for the touch controller.
I even tried to compare the init sequences of both libraries but that´s beyond my capabilities.
What else do you need in order to help me?
This is my User_Setup.h
`
// See SetupX_Template.h for all options available
#define ILI9486_DRIVER
// For the Waveshare shield, these are the default.
#define TFT_DC 14
#define TFT_CS 5
#define TFT_MOSI 23
#define TFT_CLK 18
#define TFT_RST 12
#define TFT_MISO 19
#define TFT_BL 13
#define TOUCH_CS 17
#define TOUCH_IRQ 25
#define TOUCH_BUSY 27
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
#define SD_CS 16
//#define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 and GC9A01 display only
/*
// These are the definitions which worke fine with Waveshare.h
constexpr unsigned int LCD_CS = 5; // 10; // LCD Chip Select
constexpr unsigned int LCD_BL = 13; // 9; // LCD Backlight
constexpr unsigned int LCD_RST = 12; // 8; // LCD Reset
constexpr unsigned int LCD_DC = 14; // 7; // LCD Data/Control
/
/
#define TFT_DC 13 //4
#define TFT_CS 12
#define TFT_RST 4 //2
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_CLK 18
#define TFT_CS PIN_D8 // Chip select control pin D8
#define TFT_DC PIN_D3 // Data Command control pin
#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
*/
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
#define SMOOTH_FONT
#define SPI_FREQUENCY 20000000
//#define SPI_FREQUENCY 40000000
// #define SPI_FREQUENCY 80000000
#define SPI_READ_FREQUENCY 10000000
#define SPI_TOUCH_FREQUENCY 2500000
// #define SUPPORT_TRANSACTIONS
================end of User_Setup.h ===============
`
Init sequence from Waveshare_ILI9486.cpp
`
void initializeLcd()
{
// Trigger hardware reset.
digitalWrite(LCD_RST, HIGH);
delay(5);
digitalWrite(LCD_RST, LOW);
delayMicroseconds(20);
digitalWrite(LCD_RST, HIGH);
`
==============Init sequence from Waveshare_ILI9486.cpp ==========
Beta Was this translation helpful? Give feedback.
All reactions