5201 views|1 replies

24

Posts

0

Resources
The OP
 

【GD32E231 DIY】OLED usage (SPI) [Copy link]

This sharing uses SPI to drive the OLED display. The OLED display controller is SSD1306 , which controls the 128X64 dot matrix display.

The structure of SSD1306 is as follows:

GPIO can be used to simulate SPI timing. This example directly uses the SPI function module of the GD32E231C8T6 microcontroller .

Using OLED 's four-wire SPI mode, the timing is:

For detailed information on each pin, see the SSD1306 chip manual.

Use SPI0 to drive the OLED screen, select PB3 and PB5 as SCK and MOSI

Initialize PB3-PB7 :

SPI write byte function:

Set the DC pin to select data or command:

Control chip select terminal:

Control whether to reset:

Write command:

Write data:

OLED initialization function

Refresh video memory:

Write the corresponding dot matrix into the data OLED_GRAM to display the corresponding content.

OLED使用.pdf

681.4 KB, downloads: 23

This post is from GD32 MCU

Latest reply

  Details Published on 2019-6-17 10:25
 

23

Posts

0

Resources
2
 

This post is from GD32 MCU
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list