Hello,
I have 2.42'' OLED display with the ssd1309 controller, I can't manage to get the display to work on hardware spi. I'm using Arduino Uno and u8g2 library. When I use software spi it works normally.
I tried multiple constructors with different controllers and it works on ssd1309 and ssd1306 if I'm using software spi it works but when I change the constructor to hardware spi, display just stays black.
U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);//--->works normaly
U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);//---> doesnt work, black display
U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //--->works normaly
U8G2_SSD1309_128X64_NONAME0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);//--->not working
I also tried adafruit ssd1306 library and it's same, works only on software spi. I also tried to change spi mode and frequency and it doesn't help. The display has 7 pin's (VSS, VDD, SCLK, SDA, RES, DC, CS)
I wired SCLK to Arduino pin 13, SDA to Arduino pin 11, RES->8, DC->9 and CS to pin 10.