@@ -147,17 +147,16 @@ def power_up(self):
147
147
# set digital block control
148
148
self .command (_SSD1675B_SET_DIGITALBLOCK , bytearray ([0x3B ]))
149
149
150
- # driver output control
151
150
self .command (_SSD1675B_DRIVER_CONTROL ,
152
- bytearray ([0xF9 , 0x00 , 0x00 ]))
151
+ bytearray ([self . _height - 1 , ( self . _height - 1 ) >> 8 , 0x00 ]))
153
152
154
153
# Data entry sequence
155
- self .command (_SSD1675B_DATA_MODE , bytearray ([0x01 ]))
154
+ self .command (_SSD1675B_DATA_MODE , bytearray ([0x03 ]))
156
155
157
156
# 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 ]))
159
158
# 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 ]))
161
160
162
161
# Border color
163
162
self .command (_SSD1675B_WRITE_BORDER , bytearray ([0x01 ]))
@@ -181,7 +180,7 @@ def power_up(self):
181
180
# Set RAM X address counter
182
181
self .command (_SSD1675B_SET_RAMXCOUNT , bytearray ([0 ]))
183
182
# 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 ]))
185
184
186
185
self .busy_wait ()
187
186
0 commit comments