@@ -147,17 +147,16 @@ def power_up(self):
147147 # set digital block control
148148 self .command (_SSD1675B_SET_DIGITALBLOCK , bytearray ([0x3B ]))
149149
150- # driver output control
151150 self .command (_SSD1675B_DRIVER_CONTROL ,
152- bytearray ([0xF9 , 0x00 , 0x00 ]))
151+ bytearray ([self . _height - 1 , ( self . _height - 1 ) >> 8 , 0x00 ]))
153152
154153 # Data entry sequence
155- self .command (_SSD1675B_DATA_MODE , bytearray ([0x01 ]))
154+ self .command (_SSD1675B_DATA_MODE , bytearray ([0x03 ]))
156155
157156 # Set ram X start/end postion
158- self .command (_SSD1675B_SET_RAMXPOS , bytearray ([0x00 , 0x0F ]))
157+ self .command (_SSD1675B_SET_RAMXPOS , bytearray ([0x00 , self . _width // 8 ]))
159158 # Set ram Y start/end postion
160- self .command (_SSD1675B_SET_RAMYPOS , bytearray ([0xF9 , 0x0 , 0x0 , 0x0 ]))
159+ self .command (_SSD1675B_SET_RAMYPOS , bytearray ([0x0 , 0x0 , self . _height - 1 , ( self . _height - 1 ) >> 8 ]))
161160
162161 # Border color
163162 self .command (_SSD1675B_WRITE_BORDER , bytearray ([0x01 ]))
@@ -181,7 +180,7 @@ def power_up(self):
181180 # Set RAM X address counter
182181 self .command (_SSD1675B_SET_RAMXCOUNT , bytearray ([0 ]))
183182 # Set RAM Y address counter
184- self .command (_SSD1675B_SET_RAMYCOUNT , bytearray ([0xF9 , 0 ]))
183+ self .command (_SSD1675B_SET_RAMYCOUNT , bytearray ([self . _height - 1 , ( self . _height - 1 ) >> 8 ]))
185184
186185 self .busy_wait ()
187186
0 commit comments