|
@@ -13,7 +13,7 @@
|
13
|
13
|
import interstate75
|
14
|
14
|
from mapper import MapperReduceBrightness
|
15
|
15
|
import time
|
16
|
|
-from machine import Pin
|
|
16
|
+from machine import Pin, mem32
|
17
|
17
|
|
18
|
18
|
class PicoMatrix:
|
19
|
19
|
def __init__(self, w = 32, h = 32):
|
|
@@ -38,6 +38,18 @@ class PicoMatrix:
|
38
|
38
|
self.ledTime = time.time()
|
39
|
39
|
self.led = Pin("LED", Pin.OUT)
|
40
|
40
|
|
|
41
|
+ # For all matrix pins r0, g0, b0, r1, g1, b1, a, b, c, d, e:
|
|
42
|
+ # reduce drive-strength to minimum 2mA and set slew to slow.
|
|
43
|
+ # Attempt to reduce ghosting on display. Not really helping :(
|
|
44
|
+ io_base = 0x4001c000
|
|
45
|
+ io_off = 0x04
|
|
46
|
+ io_inc = 0x04
|
|
47
|
+ for p in range(0, 11):
|
|
48
|
+ reg = io_base + (p * io_inc) + io_off
|
|
49
|
+ val = mem32[reg]
|
|
50
|
+ val = val & 0xFFFFFFCE
|
|
51
|
+ mem32[reg] = val
|
|
52
|
+
|
41
|
53
|
self.loop_start() # initialize with blank image for ScrollText constructor
|
42
|
54
|
|
43
|
55
|
def loop_start(self):
|