Page 1 of 1

ssd1306 driver on WiPy via SPI?

Posted: Fri Jul 21, 2017 8:27 pm
by Olias
It appears the ssd1306 driver (https://github.com/micropython/micropyt ... ssd1306.py) isn't working for the WiPy. I've had to modify the driver to change pin.high() -> pin.value(1) and pin.low() -> pin.value(0) but clearly there is something else going on.

I have an Adafruit 128x32 OLED SSD1306 display wired to my WiPy 2.0 (via Expansion Board) as follows:

WiPy->SSD1306
P5->D/C
P6->RST
P7->CS
P10->CLK
P12->DATA
3V3->VIN
GND->GND

This is the code I am using to test. I get nothing - no errors, nothing on the screen. Is it wired correctly? Something else messed up?

from machine import SPI, Pin
from ssd1306 import SSD1306_SPI as ssd
spi = SPI(0, SPI.MASTER, baudrate=100000, polarity=0, phase=0)
o = ssd(128,32,spi,Pin('P5'),Pin('P6'),Pin('P7'))
o.fill(1)
o.show()

The OLED is good as I've used it with the Pyboard and it works. Just not with the WiPy. Any assistance greatly appreciated.

Re: ssd1306 driver on WiPy via SPI?

Posted: Mon Jul 24, 2017 10:02 am
by deshipu
Do you happen to have a logic analyzer, so that you can see what is actually being sent?