SSD1312 §
指令 §
指令 | 解释 |
---|
0x00 | Set lower column address |
0x10 | Set higher column address |
0x20, 0xXX | Set Memory addressing mode, 0x00, 0x02, 0x09 ? |
0x21 | ?Set Memory addressing mode |
0x22 | ? |
0x40 | ?set display start lines |
0x81, 0xXX | 设置对比度0x00~0xFF,默认为0x80,0x00为关闭显示器 |
0x8D, 0xXX | enable charge pump,0x12:7.5V (一般选这个?); 0x52:8V; 0x72:9V; 0x92:10V |
0xA1, 0xXX | Set segment remap, 0xC0?, 上下翻转显示:0xC8 |
0xA4 | 全屏点亮?Entire display ON |
0xA5 | ?全屏熄灭Entire display OFF |
0xA6 | 正常显示(1为像素点亮) |
0xA7 | 反色显示(0为像素点亮) |
0xA8, 0xXX | set multiplex,0x1F:128x32,0x3F:128x64 |
0xAF | 开启OLED |
0xAE | 关闭OLED |
0xB0 | set page address |
0xDA, 0xXX | Set SEG Pins Hardware Configuration, 0x10 |
0xD3, 0xXX | set display offset , 0x00 |
0xD5, 0xXX | set osc division,0x80 |
0xD9, 0xXX | set pre-charge period, 0x22 |
0xDA, 0xXX | ? set COM pins hardware configuration to sequential, 0x02, 0x10 |
0xDB, 0xXX | Set VCOMH Deselect Level, 0x30 |
初始化 §
#define SSD1312_12864_INIT_LEN 15
const uint8_t SSD1312_12864_INIT_CMD[] PROGMEM = {
0xA8, 0x3F, // set multiplex (HEIGHT-1): 0x3F for 128x64
0x22, 0x00, 0x03, // set min and max page
0x20, 0x00, // set horizontal memory addressing mode
0x81, 0x01, // set contrast default 0x80, 0x00 will set the display off
0xDA, 0x10, // set COM pins hardware configuration to sequential
0x8D, 0x12, // enable charge pump
0xA1, 0xC0 // flip the screen, or "0xA0, 0xC8"
};
显示方向 §
- 命令,第一个字节为
0xA0
或0xA1
,第二个字节为0xC0
或0xC8
// https://www.buydisplay.com/download/ic/SSD1312_Datasheet.pdf Pg. 51 Section 2.1.19
// normal inverted
// normal A1 C8 A0 C0
// mirrored A0 C8 A1 C0
- 默认方向,与命令
0xA0, 0xC0
相同(若排线在左时为正,左右镜像)

- 使用命令
0xA0, 0xC8
配置方向(若排线在左时为正,正常图像)

- 使用命令
0xA1, 0xC0
配置方向(若排线在右时为正,正常图像)

- 使用命令
0xA1, 0xC8
配置方向(若排线在左时为正,左右镜像)

显示错误 §
- Segment错误

- 初始化代码中
0xDA, 0x02
改为0xDA, 0x10
