SSD1306 using SPI
Posted: Fri Jun 11, 2021 6:38 pm
Hi
I have an SSD1306 Oled 128x64
It looks identical to the one on this page https://simple-circuit.com/ssd1306-oled ... -projects/
The resistors are configured for it to be in SPI mode.
I can't get it to display anything at all. I'm not sure if it is a wiring problem or a software problem.
I am wiring it as follows:
1 GND --> GND
2 VDD --> 3.3V
3 SCX --> Raspberry Pi Pico pin 4 (GP2/SPI0 SCK)
4 SDA --> Raspberry Pi Pico pin 5 (GP3/SPI0 TX)
5 RES --> 3.3V
6 DC --> Raspberry Pi Pico pin 6 (GP4/SPI0 RX)
7 CS --> GND
I am trying to write to it using this code
import machine
spi_sck = machine.Pin(2)
spi_tx = machine.Pin(3)
spi_rx = machine.Pin(4)
spi = machine.SPI( 0, baudrate=20000, sck=spi_sck, mosi=spi_tx, miso=spi_rx)
spi.write('\x7C')
spi.write('\x2D')
spi.write("hello world")
If anyone has any ideas or suggestions please, they would be very gratefully received
I have an SSD1306 Oled 128x64
It looks identical to the one on this page https://simple-circuit.com/ssd1306-oled ... -projects/
The resistors are configured for it to be in SPI mode.
I can't get it to display anything at all. I'm not sure if it is a wiring problem or a software problem.
I am wiring it as follows:
1 GND --> GND
2 VDD --> 3.3V
3 SCX --> Raspberry Pi Pico pin 4 (GP2/SPI0 SCK)
4 SDA --> Raspberry Pi Pico pin 5 (GP3/SPI0 TX)
5 RES --> 3.3V
6 DC --> Raspberry Pi Pico pin 6 (GP4/SPI0 RX)
7 CS --> GND
I am trying to write to it using this code
import machine
spi_sck = machine.Pin(2)
spi_tx = machine.Pin(3)
spi_rx = machine.Pin(4)
spi = machine.SPI( 0, baudrate=20000, sck=spi_sck, mosi=spi_tx, miso=spi_rx)
spi.write('\x7C')
spi.write('\x2D')
spi.write("hello world")
If anyone has any ideas or suggestions please, they would be very gratefully received