@@ -244,19 +244,44 @@ def power_up(self):
244
244
245
245
self .command (
246
246
_SSD1680_DRIVER_CONTROL ,
247
- bytearray ([self ._height - 1 , (self ._height - 1 ) >> 8 , 0x00 ]),
247
+ bytearray ([self ._height , (self ._height ) >> 8 , 0x00 ]),
248
248
)
249
249
self .command (_SSD1680_DATA_MODE , bytearray ([0x03 ]))
250
- self .command (_SSD1680_SET_RAMXPOS , bytearray ([0x00 , (self ._width // 8 ) - 1 ]))
250
+
251
+ # Set voltages
252
+ self .command (_SSD1680_WRITE_VCOM_REG , bytearray ([0x36 ]))
253
+ self .command (_SSD1680_GATE_VOLTAGE , bytearray ([0x17 ]))
254
+ self .command (_SSD1680_SOURCE_VOLTAGE , bytearray ([0x41 , 0x00 , 0x32 ]))
255
+
256
+ self .command (_SSD1680_SET_RAMXPOS , bytearray ([0x00 , (self ._width // 8 )]))
251
257
self .command (
252
258
_SSD1680_SET_RAMYPOS ,
253
- bytearray ([0x00 , 0x00 , self ._height - 1 , (self ._height - 1 ) >> 8 ]),
259
+ bytearray ([0x00 , 0x00 , self ._height , (self ._height ) >> 8 ]),
254
260
)
255
261
262
+ # Set border waveform
263
+ self .command (_SSD1680_WRITE_BORDER , bytearray ([0x05 ]))
264
+
265
+ # Set ram X count
266
+ self .command (_SSD1680_SET_RAMXCOUNT , bytearray ([0x01 ]))
267
+ # Set ram Y count
268
+ self .command (_SSD1680_SET_RAMYCOUNT , bytearray ([self ._height , 0 ]))
269
+ self .busy_wait ()
270
+
256
271
def update (self ):
257
272
"""Update the display specifically for SSD1680Z."""
258
273
self .command (_SSD1680_DISP_CTRL2 , bytearray ([0xF7 ])) # Full update for SSD1680Z
259
274
self .command (_SSD1680_MASTER_ACTIVATE )
260
275
self .busy_wait ()
261
276
if not self .busy_pin :
262
277
time .sleep (3 ) # Wait for update to complete
278
+
279
+ def set_ram_address (
280
+ self , x : int , y : int
281
+ ) -> None : # pylint: disable=unused-argument, no-self-use
282
+ """Set the RAM address location, not used on this chipset but required by
283
+ the superclass"""
284
+ # Set RAM X address counter
285
+ self .command (_SSD1680_SET_RAMXCOUNT , bytearray ([x ]))
286
+ # Set RAM Y address counter
287
+ self .command (_SSD1680_SET_RAMYCOUNT , bytearray ([y , y >> 8 ]))
0 commit comments