OLED with u8g2 SW or HW SPI

Hi,

I got a noname 0,96" monochrome display -
My idea was using it with I2C but it comes wired for 4W SPI and to reconfigure it I'd have to re-solder a few SMD resistors in the back... I don't think so, at least not today... why don't they use jumpers ?

I'm connecting it to a Nano and making the 1st tests with the U8G2 library

For software SPI (and easier wiring) thanks to this page
D0 -> 12
D1 -> 11
CS ->8
DC -> 9
RES -> 10
Constructor: U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, 12, 11, 8, 9, 10);

For hardware SPI
D0 -> 13
D1 -> 11
CS -> 10
DC -> 9
RES -> 12
Constructor: U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, 10, 9, 12);

Now, my question is, should I use HW SPI or SW SPI ? I can't notice any difference to the naked eye, running the GraphicsTest.ino example.
It makes all sense to use the HW setup, it should be faster, it should be lighter for the Nano, on the other hand it might use more power (I don't have tools to measure such low values).

why don't they use jumpers ?

Because it is more expensive.
Changing solder bridges is not difficult, but you should have some solder wick available (i suggest 2mm or less).

I suggest to use HW_SPI whenever possible. It will be much faster. The

Oliver

1 Like