-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Milestone
Description
Hi.
I'm trying to set up a custom display (ST75256 128x128 SPI HW). I have been using the available 256x128 but when I rotate, I see problems as the buffer size is incorrect. My LCD uses this init sequence: (it's pretty much as per the LCD driver's datasheet example but with customizations)
static const uint8_t u8x8_d_st75256_128x128_init_seq[] = {
U8X8_START_TRANSFER(),
U8X8_DLY(10), // 10ms delay
U8X8_C(0x30), // Extension command 1
U8X8_C(0x6E), // Enable Master
U8X8_C(0x31), // Extension command 2
U8X8_C(0xD7), U8X8_A(0x9F), // Disable Auto Read
U8X8_C(0xE0), U8X8_A(0x00), // Enable OTP Read
U8X8_DLY(10),
U8X8_C(0xE3), // OTP Up-Load
U8X8_DLY(20), // 20ms delay
U8X8_C(0xE1), // OTP Control End
U8X8_C(0x30), // Extension command 1
U8X8_C(0x94), // Sleep Out
U8X8_C(0xAE), // Display Off
U8X8_DLY(50), // 50ms delay
U8X8_C(0x20), // Power Control
U8X8_A(0x0B), // VB, VR, VF All on
U8X8_C(0x81), U8X8_A(0x1D), U8X8_A(0x04), // Set Vop (15.0V)
U8X8_C(0x31), // Extension command 2
U8X8_C(0x32), U8X8_A(0x00), // Analog Set
U8X8_A(0x01), // Booster efficiency level 1
U8X8_A(0x02), // Bias 1/12
U8X8_C(0x51), U8X8_A(0xFA), // Booster Level x 8
U8X8_C(0x30), // Extension command 1
U8X8_C(0xF0), U8X8_A(0x10), // Display Mode = Monochrome
U8X8_C(0xCA), // Display Control
U8X8_A(0x00), // CL Dividing Ratio = Not divided
U8X8_A(0x7F), // Duty Set = 128
U8X8_A(0x3F),
U8X8_C(0xBC), U8X8_A(0x00), // Data Scan Direction
U8X8_C(0xA6), // Normal Display
U8X8_C(0x0C), // Data Format = LSB on Top
U8X8_CAA(0x75, 0x00, 0x7F), // row range for 128 rows
U8X8_CAA(0x15, 0x00, 0x7F), // col range for 128 cols
U8X8_C(0x31), // Extension command 2
U8X8_C(0x40), // Internal Power Supply
U8X8_C(0x30), // Extension command 1
U8X8_C(0xaf), // Display On
U8X8_END_TRANSFER(),
U8X8_END()
};What would be the best approach to getting this custom LCD working? (I need it to work in all 4 viewing directions).
Can it be added to the library?
Reactions are currently unavailable