This is a demo for using SSD1322 with micropython.
Tested on esp32(LOLIN32 Lite) and stm32f411ce(WeAct STM32F411CEU6).
The outline is from https://github.com/mcauser/micropython-ssd1327
init sequence is from https://github.com/JamesHagerman/Jamis_SSD1322
In fact, GS4 has been tested on ssd1322 in 2017: micropython/micropython#2767
ssd1322 | esp32 |
DC | 22 |
CS | 19 |
RESET | 23 |
SCK | 5 |
MOSI | 16 |
ssd1322 | stm32f411ce |
DC | PA1 |
CS | PA2 |
RESET | PA3 |
SCK | PA5 |
MOSI | PA7 |
ssd1322 | rp2 |
DC | GP2 |
CS | GP5 |
RESET | GP3 |
SCK | GP6 |
MOSI | GP7 |
test code on esp32:
import ssd1322 from machine import SPI,Pin spi = SPI(2, baudrate=16000000,polarity=0, phase=0, sck=Pin(5), mosi=Pin(16), miso=Pin(17)) dc=Pin(22,Pin.OUT) cs=Pin(19,Pin.OUT) res=Pin(23,Pin.OUT) disp=ssd1322.SSD1322_SPI(256,64,spi,dc,cs,res) #disp.fill(0) disp.line(5,5,60,60,0xff) disp.show()
test code on stm32:
import ssd1322 from pyb import SPI,Pin spi=SPI(1) spi.init(SPI.MASTER,polarity=0,phase=0) dc=Pin('A1',Pin.OUT) cs=Pin('A2',Pin.OUT) res=Pin('A3',Pin.OUT) disp=ssd1322.SSD1322_SPI(256,64,spi,dc,cs,res) disp.fill(15) disp.show() disp.fill(0) disp.line(0,0,255,63,15) disp.show()
test code on rp2:
from machine import Pin, SPI import ssd1322 spi=SPI(0,8_000_000) cs=Pin(5,Pin.OUT) dc=Pin(2,Pin.OUT) res=Pin(3,Pin.OUT) disp=ssd1322.SSD1322_SPI(256,64,spi,dc,cs,res) disp.fill(0) disp.show() disp.line(0,0,255,63,15) disp.show() disp.text('hello',100,30,15) disp.show()