P14201의 OLED 컨트롤러는 SSD1329인데
LM3S1968 EVM 보드에 들어있는 파일을 분석하려다가 일단 정리중
rit128x96x4.c (128x96 4bit) 파일의 초기화 루틴을 보면 아래와 같은 식으로 되어 있는데
0xe3는 안전을 위한 NOP 인것 같고..
명령어 1바이트 + 데이터 1바이트 식으로 구성이 되는 듯.
static const unsigned char g_pucRIT128x96x4Init[] =
{
// Unlock commands
3, 0xFD, 0x12, 0xe3,
// Display off
2, 0xAE, 0xe3,
// Icon off
3, 0x94, 0, 0xe3,
// Multiplex ratio
3, 0xA8, 95, 0xe3,
// Contrast
3, 0x81, 0xb7, 0xe3,
// Pre-charge current
3, 0x82, 0x3f, 0xe3,
// Display Re-map
3, 0xA0, RIT_INIT_REMAP, 0xe3,
// Display Start Line
3, 0xA1, 0, 0xe3,
// Display Offset
3, 0xA2, RIT_INIT_OFFSET, 0xe3,
// Display Mode Normal
2, 0xA4, 0xe3,
// Phase Length
3, 0xB1, 0x11, 0xe3,
// Frame frequency
3, 0xB2, 0x23, 0xe3,
// Front Clock Divider
3, 0xB3, 0xe2, 0xe3,
// Set gray scale table. App note uses default command:
// 2, 0xB7, 0xe3
// This gray scale attempts some gamma correction to reduce the
// the brightness of the low levels.
17, 0xB8, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 19, 22, 26, 30, 0xe3,
// Second pre-charge period. App note uses value 0x04.
3, 0xBB, 0x01, 0xe3,
// Pre-charge voltage
3, 0xBC, 0x3f, 0xe3,
// Display ON
2, 0xAF, 0xe3,
};
10 COMMAND DESCRIPTIONS
10.1 SET COLUMN ADDRESS (15H)
10.2 SET ROW ADDRESS (75H)
10.3 SET CONTRAST CURRENT (81H)
10.4 SET SECOND PRE-CHARGE SPEED (82H)
10.5 SET MASTER ICON CONTROL (90H)
10.6 SET ICON CURRENT RANGE (91H)
10.7 SET INDIVIDUAL ICON CURRENT (92H)
10.8 SET INDIVIDUAL ICON ON / OFF REGISTERS (93H)
10.9 SET ICON ON / OFF REGISTERS (94H)
10.10 SET ICON BLINKING CYCLE (95H)
10.11 SET ICON DUTY (96H)
10.12 SET RE-MAP(A0H)
10.13 SET DISPLAY START LINE (A1H)
10.14 SET DISPLAY OFFSET (A2H)
10.15 SET DISPLAY MODE (A4H ~ A7H)
10.16 SET MUX RATIO (A8H)
10.17 SET SLEEP MODE ON/OFF (AEH / AFH)
10.18 SET PHASE LENGTH (B1H).
10.19 SET FRAME FREQUENCY (B2H)
10.20 SET FRONT CLOCK DIVIDER / OSCILLATOR FREQUENCY (B3H)
10.21 SET DEFAULT GRAY SCALE TABLE (B7H)
10.22 LOOK UP TABLE FOR GRAY SCALE PULSE WIDTH (B8H)
10.23 SET SECOND PRE-CHARGE PERIOD (BBH).
10.24 SET FIRST PRE-CHARGE VOLTAGE, VP (BCH) .
10.25 SET VCOMH (BEH)
10.26 NO OPERATION (E3H).
10.27 SET COMMAND LOCK (FDH) |