Skip to content

Commit 83576c6

Browse files
mikeysklarclaude
andcommitted
MagTag SSD1680 FPC-7519rev.b: rename vcom20 → vcom14, add OTP note
Rename ssd1680_vcom20_display_start_sequence → ssd1680_vcom14_display_start_sequence and DISPLAY_SSD1680_COLSTART_8_VCOM20 → DISPLAY_SSD1680_COLSTART_8_VCOM14 to match the actual register value being set (0x14, not the earlier test value 0x20). Add comment noting that VCOM=0x14 was independently confirmed by reading OTP register 0x2D on the physical panel — byte 1 of the response is 0x14, matching what the panel manufacturer programmed as the recommended VCOM for this revision. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5dd1097 commit 83576c6

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

  • ports/espressif/boards/adafruit_magtag_2.9_grayscale

ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ const uint8_t ssd1680_display_start_sequence[] = {
129129
};
130130

131131
// FPC-7519rev.b (User ID byte 0xca) requires lower VCOM for correct contrast.
132+
// VCOM=0x14 (-1.0V) confirmed by reading the panel's OTP register (cmd 0x2D, byte 1 = 0x14).
132133
// The 0x44 panel works correctly with the default VCOM=0x28, so keep them separate.
133-
const uint8_t ssd1680_vcom20_display_start_sequence[] = {
134+
const uint8_t ssd1680_vcom14_display_start_sequence[] = {
134135
0x12, DELAY, 0x00, 0x14, // soft reset and wait 20ms
135136
0x11, 0x00, 0x01, 0x03, // Ram data entry mode
136137
0x3c, 0x00, 0x01, 0x03, // border color
@@ -175,7 +176,7 @@ typedef enum {
175176
DISPLAY_IL0373,
176177
DISPLAY_SSD1680_COLSTART_0,
177178
DISPLAY_SSD1680_COLSTART_8,
178-
DISPLAY_SSD1680_COLSTART_8_VCOM20, // FPC-7519rev.b (User ID 0xca)
179+
DISPLAY_SSD1680_COLSTART_8_VCOM14, // FPC-7519rev.b (User ID 0xca)
179180
} display_type_t;
180181

181182
static display_type_t detect_display_type(void) {
@@ -255,7 +256,7 @@ static display_type_t detect_display_type(void) {
255256
case 0x44:
256257
return DISPLAY_SSD1680_COLSTART_8;
257258
case 0xca:
258-
return DISPLAY_SSD1680_COLSTART_8_VCOM20;
259+
return DISPLAY_SSD1680_COLSTART_8_VCOM14;
259260
}
260261
}
261262

@@ -304,13 +305,13 @@ void board_init(void) {
304305
} else {
305306
epaperdisplay_construct_args_t args = EPAPERDISPLAY_CONSTRUCT_ARGS_DEFAULTS;
306307
// Default colstart is 0.
307-
if (display_type == DISPLAY_SSD1680_COLSTART_8 || display_type == DISPLAY_SSD1680_COLSTART_8_VCOM20) {
308+
if (display_type == DISPLAY_SSD1680_COLSTART_8 || display_type == DISPLAY_SSD1680_COLSTART_8_VCOM14) {
308309
args.colstart = 8;
309310
}
310311
args.bus = bus;
311-
if (display_type == DISPLAY_SSD1680_COLSTART_8_VCOM20) {
312-
args.start_sequence = ssd1680_vcom20_display_start_sequence;
313-
args.start_sequence_len = sizeof(ssd1680_vcom20_display_start_sequence);
312+
if (display_type == DISPLAY_SSD1680_COLSTART_8_VCOM14) {
313+
args.start_sequence = ssd1680_vcom14_display_start_sequence;
314+
args.start_sequence_len = sizeof(ssd1680_vcom14_display_start_sequence);
314315
} else {
315316
args.start_sequence = ssd1680_display_start_sequence;
316317
args.start_sequence_len = sizeof(ssd1680_display_start_sequence);

0 commit comments

Comments
 (0)