-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patholed_osram.c
More file actions
111 lines (88 loc) · 1.73 KB
/
oled_osram.c
File metadata and controls
111 lines (88 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#include "wl_def.h"
//*****************************************************************************
//
// The sequence of commands used to initialize the SSD0323 controller. Each
// command is described as follows: there is a byte specifying the number of
// bytes in the command sequence, followed by that many bytes of command data.
// Note: This initialization sequence is derived from OSRAM App Note AN018.
//
//*****************************************************************************
#define OSRAM_INIT_REMAP 0x52
#define OSRAM_INIT_OFFSET 0x4C
const int oled_height = 64;
const uint8_t oled_init_strings[] =
{
//
// Column Address
//
4, 0x15, 0, 63, 0xe3,
//
// Row Address
//
4, 0x75, 0, 63, 0xe3,
//
// Contrast Control
//
3, 0x81, 50, 0xe3,
//
// Half Current Range
//
2, 0x85, 0xe3,
//
// Display Re-map
//
3, 0xA0, OSRAM_INIT_REMAP, 0xe3,
//
// Display Start Line
//
3, 0xA1, 0, 0xe3,
//
// Display Offset
//
3, 0xA2, OSRAM_INIT_OFFSET, 0xe3,
//
// Display Mode Normal
//
2, 0xA4, 0xe3,
//
// Multiplex Ratio
//
3, 0xA8, 63, 0xe3,
//
// Phase Length
//
3, 0xB1, 0x22, 0xe3,
//
// Row Period
//
3, 0xB2, 70, 0xe3,
//
// Display Clock Divide
//
3, 0xB3, 0xF1, 0xe3,
//
// VSL
//
3, 0xBF, 0x0D, 0xe3,
//
// VCOMH
//
3, 0xBE, 0x02, 0xe3,
//
// VP
//
3, 0xBC, 0x10, 0xe3,
//
// Gamma
//
10, 0xB8, 0x01, 0x11, 0x22, 0x32, 0x43, 0x54, 0x65, 0x76, 0xe3,
//
// Set DC-DC
3, 0xAD, 0x03, 0xe3,
//
// Display ON/OFF
//
2, 0xAF, 0xe3,
// Done.
0
};