Inland IIC SPI 1.3" 128x64 OLED V2.0 Graphic Display Module and MicroPython SH1106
The title of this is long to hopefully help people find this when they are thinking of buying this cheap Inland OLED. I was looking to put a display in the center of my Ikea Dekad clock hack and this OLED was priced right.
I've used the Nokia LCD displays in the past but wanted to try something a little brighter with higher contrast. Microcenter sells an Inland branded OLED module for $7.99 in 2023 dollars. My biggest gripe with the Inland products is that they have lousy documentation. This module appears to be made by Keystudio which apparently continues in the Seeed Studio tradition of bare minimum examples and docs.
The device can support either SPI or I2C. It comes preconfigured for SPI and I can't find instructions anywhere on how to change it. This means you have to use 4 MCU pins instead of just two.
There are apparently two main controllers for this type of OLED. This board uses the SH1106. There is a great MicroPython driver for this chip. It isn't part of the standard distribution so see the links below.
Inland IIC SPI ...
References - SH1106 and RPI Pico
- SH1106
- https://github.com/robert-hh/SH1106
- https://github.com/raspberrypi/pico-micropython-examples/tree/master/i2c/1106oled uses sh1106.py from the above or a fork.
- RPI RP2040 Pico Pinouts
Using SP1 and pins associated with it.
PICO SPI
I chose Pico SPI 1 and pins GP12 GP13 GP14 and GP15 mostly because the pins were co-located in one corner of the board making assembly easier. Well not really. I still need to pull power from somewhere.Board Pin | Pico Pin | Notes |
---|---|---|
GND | GND | Stay grounded |
VCC | 3.3v | Some sites say 5V will work |
CLK | GP14 | SPI1 SCK (SCL) |
MOSI | GP15 | SPI1 TX (SDA) |
RES | 3.3v | Could be bound to any pin - supported by the driver |
DC | GP12 | SPI1 RX - data/command |
CS | GP13 | SPI1 CSn |
... | ... | ... |
Sample Code
Supplemental notes
Other References
- SSD1306 is another common controller chip
- including display buffer examples because the SSD1306 and SH1106 drivers are wrappers for displaydriver
- https://github.com/micropython/micropython-lib/tree/master/micropython/drivers/display/ssd1306
- https://docs.micropython.org/en/latest/esp8266/tutorial/ssd1306.html great example of display commands
- Started with pinouts looking at SSD1306 samples in the forums
- https://forum.micropython.org/viewtopic.php?f=21&t=10676
- https://forum.micropython.org/viewtopic.php?t=3059
- https://www.digikey.be/en/maker/projects/raspberry-pi-pico-rp2040-spi-example-with-micropython-and-cc/9706ea0cf3784ee98e35ff49188ee045 This looked cool but I didn't use it at all
- Keystudio 1.3 OLED V2.0 links
- https://wiki.keyestudio.com/Ks0056_keyestudio_1.3%22_128x64_OLED_Graphic_Display
- https://video.keyestudio.com/ks0056/
- https://www.microcenter.com/product/643965/inland-iic-spi-13-128x64-oled-v20-graphic-display-module-for-arduino-uno-r3 for $7.99
- https://www.amazon.com/KEYESTUDIO-Graphic-Display-Arduino-Raspberry/dp/B01ESY0AXK
- including display buffer examples because the SSD1306 and SH1106 drivers are wrappers for displaydriver
- https://github.com/micropython/micropython-lib/tree/master/micropython/drivers/display/ssd1306
- https://docs.micropython.org/en/latest/esp8266/tutorial/ssd1306.html great example of display commands
- Started with pinouts looking at SSD1306 samples in the forums
- https://forum.micropython.org/viewtopic.php?f=21&t=10676
- https://forum.micropython.org/viewtopic.php?t=3059
- https://www.digikey.be/en/maker/projects/raspberry-pi-pico-rp2040-spi-example-with-micropython-and-cc/9706ea0cf3784ee98e35ff49188ee045 This looked cool but I didn't use it at all
- https://wiki.keyestudio.com/Ks0056_keyestudio_1.3%22_128x64_OLED_Graphic_Display
- https://video.keyestudio.com/ks0056/
- https://www.microcenter.com/product/643965/inland-iic-spi-13-128x64-oled-v20-graphic-display-module-for-arduino-uno-r3 for $7.99
- https://www.amazon.com/KEYESTUDIO-Graphic-Display-Arduino-Raspberry/dp/B01ESY0AXK
Comments
Post a Comment