Table of Contents
Using Zero with ssd1306 Based LCD and SPI
Introduction
The main difference between the driver we will use here, and the driver we used on the Pico is:
- The GPIO pins you pass into the driver.
- The SPI bus number (Zero uses SPI0 by default).
The Pico we used SPI bus 1
- | download
spi = SPI(1, sck=Pin(10), mosi=Pin(11)) oled = SSD1306_SPI(128, 64, spi, dc=Pin(8), res=Pin(9), cs=Pin(12))
The Pico we used a different set of GPIO pins, so these references have to change on the Zero.
- | download
spi = SPI(0, sck=Pin(2), mosi=Pin(3)) oled = SSD1306_SPI(128, 64, spi, dc=Pin(6), res=Pin(7), cs=Pin(5))
On the Zero, the SPI bus 1 pins are not exposed, so it cannot be used.
The Wiring
The wiring for the Zero is exactly the same as for the Pico, unfortunately there are two slight differences.
- 1. The GPIO Pins are different.
- 2. The Pico uses SPI1 and the Zero uses SPI0
See the wiring below:
Once you have wired up your LCD, we can move on to the software.
The Driver
You can download the driver here: ssd_1306_zero.zip you have to upload the driver to the \lib folder.
I am not going to talk about the driver because there isn't anything in there we need to change.
Test Code
All this test code does is to print 8 lines of text with sequential numbers after them, the numbers keep incrementing one at a time. The test code is designed to ensure the LCD is working fine, not to provide any real functionality, that will be up to you once you get your LCD working.

