oled initialization with ssd1306
oled-main with structure ssd1306 initialization
This commit is contained in:
23
oled/sh1106/sh1106.h
Normal file
23
oled/sh1106/sh1106.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#define LOWCOLADDR 0x00 // 0x00h (0000 XXXX)
|
||||
#define HIGHCOLADDR 0x10 // 0x10h (0001 XXXX)
|
||||
#define PUMPVOLTAGE 0x30 // 0x32h (0011 00XX)
|
||||
#define LINEADDRESS 0x40 // 0x40h (01XX XXXX)
|
||||
#define CONTRASTMODE 0x81 // (1000 0001)
|
||||
#define CONTRASTVALUE 0x80 // 0x80h (0x00h - 0xFFh) (XXXX XXXX)
|
||||
#define SEGMENTREMAP 0xA0 // 0xA0h (1010 000X) right(0), left(1)
|
||||
#define ENTIREDISPALY 0xA4 // 0xA4h (1010 010X) normal(0), entire(1)
|
||||
#define NORMALORREVERS 0xA6 // 0xA6h (1010 011X) normal(0), reverse(1)
|
||||
#define MULTIPLEXMODE 0xA8 // (1010 1000)
|
||||
#define MILTIPLEXVALUE 0x3F // 0x3Fh (00XX XXXX) (0x00h - 0x3Fh)
|
||||
#define DCCONTROLMODE 0xAD // (1010 1101)
|
||||
#define DCCONTROLVALUE 0x8B // 0x8Bh (1000 101X) ON(1), OFF(0)
|
||||
#define DISPLAYOFF 0xAE
|
||||
#define DISPLAYON 0xAF // 0xAEh (1010 111X) ON(1), OFF(0)
|
||||
#define PAGEADDRESS 0xB0 // 0xB0h (1011 XXXX)
|
||||
#define OUTPUTSCANDIR 0xC0 // 0xC0h (1100 X000)
|
||||
#define OFFSETMODE 0xD3 // (1101 0011)
|
||||
#define OFFSETVALUE 0x00 // 0x00h (00XX XXXX) COM0-63
|
||||
#define DIVRATIOFREQM 0xD5 // (1101 0101)
|
||||
#define DIVRATIOFREQV 0x50 // 0x50h (FFFF DDDD) Frequency, Divide
|
||||
Reference in New Issue
Block a user