I have one of these generic Aliexpress 2.42in OLED displays that support both SPI and I2C.
I have a smaller 0.96in I2C oled which I have been able to get running no problems but it is a touch small and I will have a few input shift registers on the I2C and SPI should be faster so wanted to run the bigger display in the default mode of SPI.
I am having difficulty finding the correct wiring schematic for the SPI connection to the Micro, I have read a ton but can't map the pins from the Micro to the display. The display has CS, DC, and RES which should be all I need to connect.
All my reading on SPI on a Micro talks about MISO and MOSI but these don't relate to the pins that I have on the board. Also unsure if I have to use the ICSP header or if the SPI pins are also mapped to the main pins as well.
I am looking at the U8X8 library for simple text display and it references the pin numbers on the Micro for the 3 data connections ie :-
U8X8_SSD1309_128X64_NONAME2_4W_HW_SPI u8x8(/* cs=/ 12, / dc=/ 4, / reset=*/ 6);
The OLED board has 7 pins for the SPI connection however I believe that I only need 5, power, ground and CS, DC and RST. Extensive reading seems to show that the other 2 pins are for when you switch it to I2C mode.
Link to the actual board I have :-
2.4" 2.42 Inch 128x64 OLED LCD Display Module SSD1309 12864 4 Pin IIC I2C SPI Serial Interface for Arduino C51 - AliExpress
Appreciate any assistance on this.
Cheers
Matt
