-
I want to port the SH8601 screen chip to Arduino_ There was a problem in the GFX library and it can be run using software, but using Arduino_ The ESP32QSPI method cannot be used to configure hardware, but the screen cannot be lit, but it can also send an invertDisplay (true); Function to make the screen brighter... Now I don't know, I don't know how to solve this problem next Here is my code: #include "Arduino_SH8601.h" Arduino_SH8601::Arduino_SH8601(Arduino_DataBus *bus, int8_t rst, uint8_t r, bool ips, int16_t w, int16_t h) bool Arduino_SH8601::begin(int32_t speed) void Arduino_SH8601::writeAddrWindow(int16_t x, int16_t y, uint16_t w, uint16_t h)
} //
} void Arduino_SH8601::invertDisplay(bool i) void Arduino_SH8601::displayOn(void) void Arduino_SH8601::displayOff(void) // Companion code to the above tables. Reads and issues
} Here is the initialization code: #define SH8601_MAXWIDTH 480 ///< SH8601 max TFT width #define SH8601_RST_DELAY 200 ///< delay ms wait for reset finish // User Command #define SH8601_C_SLPIN 0x10 // Sleep In #define SH8601_C_INVOFF 0x20 // Inversion Off #define SH8601_W_PTLAR 0x30 // Partial Area Row Set #define SH8601_W_SETTSL 0x44 // Write Tearing Effect Scan Line #define SH8601_W_WDBRIGHTNESSVALNOR 0x51 // Write Display Brightness Value in Normal Mode #define SH8601_W_WDBRIGHTNESSVALHBM 0x63 // Write Display Brightness Value in HBM Mode #define SH8601_W_COLORSET0 0x70 // Color Set 0 #define SH8601_W_COLOROPTION 0x80 // Color Option #define SH8601_R_RDDBSTART 0xA1 // Read DDB start #define SH8601_W_SPIMODECTL 0xC4 // SPI mode control #define SH8601_R_RDID1 0xDA // Read ID1 // parameters static const uint8_t sh8601_init_operations[] = {
The following is the initialization code for the software driver: void LCD_Init(void)
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
The problem has been solved, it's a memory allocation issue |
Beta Was this translation helpful? Give feedback.
-
The following link can help you: here |
Beta Was this translation helpful? Give feedback.
-
If you wish to modify the initialization code for SH8601, please make the changes according to the format described in the Arduino_GFX library. Specifically, you only need to modify the static const uint8_t sh8601_init_operations[] array. The commands to be written can be referred to in the "Arduino_DataBus.cpp" file, specifically the void Arduino_DataBus::batchOperation(const uint8_t *operations, size_t len) function. Based on the code provided by the manufacturer that you've given me, I can only provide a preliminary example: R2A 00 00 01 6F The omitted code needs to be supplemented by yourself. |
Beta Was this translation helpful? Give feedback.
The problem has been solved, it's a memory allocation issue