File tree Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 4
4
Description: SSD1322-specific constants
5
5
Author: Jesse Burt
6
6
Started: Jul 17, 2023
7
- Updated: Aug 20, 2024
8
- Copyright (c) 2024 - See end of file for terms of use.
7
+ Updated: Feb 14, 2025
8
+ Copyright (c) 2025 - See end of file for terms of use.
9
9
----------------------------------------------------------------------------------------------------
10
10
}
11
11
84
84
CLK_DIV_CLR = CLK_DIV_BITS ^ CLKDIV_MASK
85
85
86
86
DISP_ENH_A = $b4
87
+ DISP_ENH_A_A_MASK = $a3
88
+ VSL_BITS = %11
89
+ VSL_MASK = VSL_BITS ^ DISP_ENH_A_A_MASK
90
+ VSL_INTERNAL = %10
91
+ DISP_ENH_A_B_MASK = $fd
92
+ LOWGS = 3
93
+ LOWGS_BITS = %11111
94
+ LOWGS_MASK = (LOWGS_BITS << LOWGS) ^ DISP_ENH_A_B_MASK
95
+ ENH_LOWGS = %11111 << LOWGS
96
+ NORM_LOWGS = %10110 << LOWGS
87
97
88
98
SET_GPIO = $b5
89
99
SETGPIO_MASK = $0F
@@ -112,7 +122,7 @@ PUB null()
112
122
113
123
DAT
114
124
{
115
- Copyright 2024 Jesse Burt
125
+ Copyright 2025 Jesse Burt
116
126
117
127
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
118
128
associated documentation files (the "Software"), to deal in the Software without restriction,
Original file line number Diff line number Diff line change 4
4
Description: Driver for SSD1322 OLED displays
5
5
Author: Jesse Burt
6
6
Started: Jul 17, 2023
7
- Updated: Feb 11 , 2025
7
+ Updated: Feb 14 , 2025
8
8
Copyright (c) 2025 - See end of file for terms of use.
9
9
----------------------------------------------------------------------------------------------------
10
10
}
55
55
byte _remap[2 ] ' set re-map and dual COM line mode
56
56
byte _clkdiv ' clock divider and oscillator freq
57
57
byte _gpio_state ' gpio 0, 1 state
58
+ byte _disp_enh_a[2 ] ' ext/int VSL, enhanced low GS disp quality
58
59
59
60
60
61
PUB start (): s
@@ -322,6 +323,14 @@ PUB vdd_regulator(r)
322
323
command(core.FUNC_SEL, (r <> 0 ) & 1 , 1 )
323
324
324
325
326
+ PUB vsl_reference (r )
327
+ ' Set Vsl reference
328
+ ' 0: external
329
+ ' non-zero values: internal (default)
330
+ _disp_enh_a[0 ] := (_disp_enh_a & core.VSL_MASK) | ( (r <> 0 ) ? core.VSL_INTERNAL : $00 )
331
+ command(core.DISP_ENH_A, _disp_enh_a[0 ], 1 )
332
+
333
+
325
334
PRI command (c , v = 0 , l= 0 )
326
335
' Issue simple command, no parameters
327
336
outa [_DC] := CMD
Original file line number Diff line number Diff line change 4
4
Description: Driver for SSD1322 OLED displays
5
5
Author: Jesse Burt
6
6
Started: Jan 15, 2024
7
- Updated: Feb 11 , 2025
7
+ Updated: Feb 14 , 2025
8
8
Copyright (c) 2025 - See end of file for terms of use.
9
9
----------------------------------------------------------------------------------------------------
10
10
}
55
55
byte _remap[2] ' set re-map and dual COM line mode
56
56
byte _clkdiv ' clock divider and oscillator freq
57
57
byte _gpio_state ' gpio 0, 1 state
58
+ byte _disp_enh_a[2] ' ext/int VSL, enhanced low GS disp quality
58
59
59
60
60
61
PUB start(): s
@@ -319,6 +320,14 @@ PUB vdd_regulator(r)
319
320
command(core.FUNC_SEL, (r <> 0) & 1, 1)
320
321
321
322
323
+ PUB vsl_reference(r)
324
+ ' Set Vsl reference
325
+ ' 0: external
326
+ ' non-zero values: internal (default)
327
+ _disp_enh_a[0] := (_disp_enh_a & core.VSL_MASK) | ( (r <> 0) ? core.VSL_INTERNAL : $00 )
328
+ command(core.DISP_ENH_A, _disp_enh_a[0], 1)
329
+
330
+
322
331
PRI command(c, v=0, l=0)
323
332
' Issue simple command, no parameters
324
333
pinw(_DC, CMD)
You can’t perform that action at this time.
0 commit comments