Browse Source

use FM6126A panel init

Thomas Buck 1 year ago
parent
commit
cf6f911254
1 changed files with 3 additions and 14 deletions
  1. 3
    14
      pico.py

+ 3
- 14
pico.py View File

11
 # ----------------------------------------------------------------------------
11
 # ----------------------------------------------------------------------------
12
 
12
 
13
 import interstate75
13
 import interstate75
14
+import hub75
14
 from mapper import MapperReduceBrightness
15
 from mapper import MapperReduceBrightness
15
 import time
16
 import time
16
-from machine import Pin, mem32
17
+from machine import Pin
17
 
18
 
18
 class PicoMatrix:
19
 class PicoMatrix:
19
     def __init__(self, w = 32, h = 32):
20
     def __init__(self, w = 32, h = 32):
30
             raise RuntimeError("TODO not yet supported")
31
             raise RuntimeError("TODO not yet supported")
31
 
32
 
32
         mode = interstate75.DISPLAY_INTERSTATE75_32X32
33
         mode = interstate75.DISPLAY_INTERSTATE75_32X32
33
-        self.matrix = interstate75.Interstate75(display = mode)
34
+        self.matrix = interstate75.Interstate75(display = mode, panel_type = hub75.PANEL_FM6126A)
34
 
35
 
35
         self.black = self.matrix.display.create_pen(0, 0, 0)
36
         self.black = self.matrix.display.create_pen(0, 0, 0)
36
         self.white = self.matrix.display.create_pen(255, 255, 255)
37
         self.white = self.matrix.display.create_pen(255, 255, 255)
38
         self.ledTime = time.time()
39
         self.ledTime = time.time()
39
         self.led = Pin("LED", Pin.OUT)
40
         self.led = Pin("LED", Pin.OUT)
40
 
41
 
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
-
53
         self.loop_start() # initialize with blank image for ScrollText constructor
42
         self.loop_start() # initialize with blank image for ScrollText constructor
54
 
43
 
55
     def loop_start(self):
44
     def loop_start(self):

Loading…
Cancel
Save