From 6907bcee5fdeb9328dca09fc9e88f7297dbfb1c4 Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Sat, 30 Nov 2024 17:53:27 -0800 Subject: [PATCH 1/4] off by one adjustments fix alignment so all 122x250 pixels are available --- adafruit_epd/ssd1680.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/adafruit_epd/ssd1680.py b/adafruit_epd/ssd1680.py index ebcf68c..aed8e13 100644 --- a/adafruit_epd/ssd1680.py +++ b/adafruit_epd/ssd1680.py @@ -24,7 +24,7 @@ except ImportError: pass -__version__ = "0.0.0+auto.0" +__version__ = "2.13.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_EPD.git" _SSD1680_DRIVER_CONTROL = const(0x01) @@ -244,13 +244,13 @@ def power_up(self): self.command( _SSD1680_DRIVER_CONTROL, - bytearray([self._height - 1, (self._height - 1) >> 8, 0x00]), + bytearray([self._height, (self._height) >> 8, 0x00]), ) self.command(_SSD1680_DATA_MODE, bytearray([0x03])) - self.command(_SSD1680_SET_RAMXPOS, bytearray([0x00, (self._width // 8) - 1])) + self.command(_SSD1680_SET_RAMXPOS, bytearray([0x00, (self._width // 8)])) self.command( _SSD1680_SET_RAMYPOS, - bytearray([0x00, 0x00, self._height - 1, (self._height - 1) >> 8]), + bytearray([0x00, 0x00, self._height, (self._height) >> 8]), ) def update(self): @@ -260,3 +260,13 @@ def update(self): self.busy_wait() if not self.busy_pin: time.sleep(3) # Wait for update to complete + + def set_ram_address( + self, x: int, y: int + ) -> None: # pylint: disable=unused-argument, no-self-use + """Set the RAM address location, not used on this chipset but required by + the superclass""" + # Set RAM X address counter + self.command(_SSD1680_SET_RAMXCOUNT, bytearray([x])) + # Set RAM Y address counter + self.command(_SSD1680_SET_RAMYCOUNT, bytearray([y, y >> 8])) From 4618586f4e3d5c99d7ca1b417b2964be949d549d Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Sat, 30 Nov 2024 18:08:32 -0800 Subject: [PATCH 2/4] Update ssd1680.py --- adafruit_epd/ssd1680.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_epd/ssd1680.py b/adafruit_epd/ssd1680.py index aed8e13..c4e40eb 100644 --- a/adafruit_epd/ssd1680.py +++ b/adafruit_epd/ssd1680.py @@ -269,4 +269,4 @@ def set_ram_address( # Set RAM X address counter self.command(_SSD1680_SET_RAMXCOUNT, bytearray([x])) # Set RAM Y address counter - self.command(_SSD1680_SET_RAMYCOUNT, bytearray([y, y >> 8])) + self.command(_SSD1680_SET_RAMYCOUNT, bytearray([y, y >> 8])) From 1be3100af828e65f889f692bb59eca509bcb16ce Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Sun, 1 Dec 2024 12:56:07 -0800 Subject: [PATCH 3/4] Update adafruit_epd/ssd1680.py Co-authored-by: Dan Halbert --- adafruit_epd/ssd1680.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_epd/ssd1680.py b/adafruit_epd/ssd1680.py index c4e40eb..224112e 100644 --- a/adafruit_epd/ssd1680.py +++ b/adafruit_epd/ssd1680.py @@ -24,7 +24,7 @@ except ImportError: pass -__version__ = "2.13.0" +__version__ = "0.0.0+auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_EPD.git" _SSD1680_DRIVER_CONTROL = const(0x01) From 6d0086efe67ef88390d6b386e49a9d4225695ab3 Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Sun, 1 Dec 2024 19:58:21 -0800 Subject: [PATCH 4/4] restored power_up() power_up() * voltages * border waveform * RAM X/Y COUNT had been dropped during 'z' troubleshooting, but test clean now so added back to match SSD1680 behavior. --- adafruit_epd/ssd1680.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/adafruit_epd/ssd1680.py b/adafruit_epd/ssd1680.py index 224112e..bd994b8 100644 --- a/adafruit_epd/ssd1680.py +++ b/adafruit_epd/ssd1680.py @@ -247,12 +247,27 @@ def power_up(self): bytearray([self._height, (self._height) >> 8, 0x00]), ) self.command(_SSD1680_DATA_MODE, bytearray([0x03])) + + # Set voltages + self.command(_SSD1680_WRITE_VCOM_REG, bytearray([0x36])) + self.command(_SSD1680_GATE_VOLTAGE, bytearray([0x17])) + self.command(_SSD1680_SOURCE_VOLTAGE, bytearray([0x41, 0x00, 0x32])) + self.command(_SSD1680_SET_RAMXPOS, bytearray([0x00, (self._width // 8)])) self.command( _SSD1680_SET_RAMYPOS, bytearray([0x00, 0x00, self._height, (self._height) >> 8]), ) + # Set border waveform + self.command(_SSD1680_WRITE_BORDER, bytearray([0x05])) + + # Set ram X count + self.command(_SSD1680_SET_RAMXCOUNT, bytearray([0x01])) + # Set ram Y count + self.command(_SSD1680_SET_RAMYCOUNT, bytearray([self._height, 0])) + self.busy_wait() + def update(self): """Update the display specifically for SSD1680Z.""" self.command(_SSD1680_DISP_CTRL2, bytearray([0xF7])) # Full update for SSD1680Z