-
Hi, I have a basic sketch using this display working on an Espressif S3 development board. Here is the stripped down bare-minimum working sketch: #define MAX_DISPLAY_BUFFER_SIZE 65536ul
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
GxEPD2_BW<GxEPD2_750_T7, MAX_HEIGHT(GxEPD2_750_T7)> display(GxEPD2_750_T7(GxEPD2_750_T7(15, 1, 26, 4)));
SPIClass hspi(HSPI);
void fill_black() {
display.setFullWindow();
display.firstPage();
do
{
display.fillScreen(GxEPD_BLACK);
}
while (display.nextPage());
}
void display_init() {
hspi.begin(13, 12, 14, 15);
display.epd2.selectSPI(hspi, SPISettings(4000000, MSBFIRST, SPI_MODE0));
display.init(115200);
display.setRotation(1); // portrait
Serial.println("display initialized");
}
void setup() {
Serial.begin(9600);
while(!Serial) {};
delay(3000);
display_init();
fill_black();
} I know that there are some issues with this sketch. First, I understand that the usage of However, I am attempting to get this same sketch running on a Seeed XIAO ESP32-C3 development board. I've tried multiple permutations of the same sketch using different display initialization code without success. I have been told on the Arduino forum that just calling static const uint8_t SS = 20;
static const uint8_t MOSI = 10;
static const uint8_t MISO = 9;
static const uint8_t SCK = 8; However, using the following initialization code doesn't work.
I have also tried inserting the following before hspi.begin(13, 12, 14, 15); // shot in the dark
// following four should all do the same exact thing.
hspi.begin(SCK, MISO, MOSI, SS);
hspi.begin();
hspi.begin(-1, -1, -1, -1);
hspi.begin(D8, D9, D10, D7); I know that the display is not damaged because I have switched back to the S3 development board which works fine. As additional context, #74 suggests that at least one person has tried to get a Waveshare display connected to a XIAO C3 board over SPI successfully, seemingly using the exact same pins that I am trying to use. Thanks in advance, any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 13 replies
-
To clarify further, here is the pin mapping I am using between the board and the Waveshare driver HAT:
and the GxEPD2_BW<GxEPD2_750_T7, MAX_HEIGHT(GxEPD2_750_T7)> display(GxEPD2_750_T7(/* CS */ SS, /* DC */ D4, /* RST */ D5, /* BUSY */ D6)); |
Beta Was this translation helpful? Give feedback.
-
You have to define the spi bus using what you've defined: static const uint8_t SS = 20; And of course make sure the display is connected to those pins. I've used the C3 variant without any issues. |
Beta Was this translation helpful? Give feedback.
-
I would need to know what connection module you use. I suggest you try with GxEPD2_Example or GxEPD2_HelloWorld. Report diagnostic output from Serial Monitor. I don't have these XIAOs, but I think I have a C3. So as last resort I could also try. Maybe later. |
Beta Was this translation helpful? Give feedback.
-
I'm back at home now: My setup for the XIAO ESP32C3 and GxEPD2 GxEPD2_BW<GxEPD2_426_GDEQ0426T82, GxEPD2_426_GDEQ0426T82::HEIGHT> display(GxEPD2_426_GDEQ0426T82(/CS=D8/ EPD_CS, /DC=D3/ EPD_DC, /RST=D4/ EPD_RST, /BUSY=D2/ EPD_BUSY)); // GDEQ0426T82 480x800, SSD1677 (P426010-MF1-A) And: |
Beta Was this translation helpful? Give feedback.
-
This is what I sue for the XIAO boards, saves a lot of effort: |
Beta Was this translation helpful? Give feedback.
I would need to know what connection module you use.
Is it the Waveshare HAT with level converters? You may need to add 10k resistors to the strapping pins.
I suggest you try with GxEPD2_Example or GxEPD2_HelloWorld. Report diagnostic output from Serial Monitor.
I don't have these XIAOs, but I think I have a C3. So as last resort I could also try. Maybe later.