File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
libraries/galactic_unicorn Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,14 @@ namespace pimoroni {
154
154
uint8_t *p = &bitstream[row * ROW_BYTES + (BCD_FRAME_BYTES * frame)];
155
155
156
156
p[ 0 ] = WIDTH - 1 ; // row pixel count
157
- p[56 ] = row; // row select
157
+ p[ 1 ] = row; // row select
158
158
159
159
// set the number of bcd ticks for this frame
160
160
uint32_t bcd_ticks = (1 << frame);
161
- p[57 ] = (bcd_ticks & 0xff ) >> 0 ;
162
- p[58 ] = (bcd_ticks & 0xff00 ) >> 8 ;
163
- p[59 ] = (bcd_ticks & 0xff0000 ) >> 16 ;
161
+ p[56 ] = (bcd_ticks & 0xff ) >> 0 ;
162
+ p[57 ] = (bcd_ticks & 0xff00 ) >> 8 ;
163
+ p[58 ] = (bcd_ticks & 0xff0000 ) >> 16 ;
164
+ p[59 ] = (bcd_ticks & 0xff000000 ) >> 24 ;
164
165
}
165
166
}
166
167
@@ -485,7 +486,7 @@ namespace pimoroni {
485
486
486
487
// set the appropriate bits in the separate bcd frames
487
488
for (uint8_t frame = 0 ; frame < BCD_FRAME_COUNT; frame++) {
488
- uint8_t *p = &bitstream[y * ROW_BYTES + (BCD_FRAME_BYTES * frame) + 1 + x];
489
+ uint8_t *p = &bitstream[y * ROW_BYTES + (BCD_FRAME_BYTES * frame) + 2 + x];
489
490
490
491
uint8_t red_bit = gamma_r & 0b1 ;
491
492
uint8_t green_bit = gamma_g & 0b1 ;
Original file line number Diff line number Diff line change 33
33
34
34
; loop over row pixels
35
35
out y, 8 ; get row pixel count (minus 1 because test is pre decrement)
36
+ out pins, 8 ; output row select
36
37
pixels:
37
38
38
39
; red bit
@@ -63,15 +64,14 @@ pixels:
63
64
64
65
jmp y-- pixels
65
66
66
- out null, 16 ; discard dummy bytes
67
+ out null, 8 ; discard dummy bytes
67
68
68
- out pins, 8 ; output row select
69
69
70
70
set pins, 0b110 [5] ; latch high, blank high
71
71
set pins, 0b000 ; blank low (enable output)
72
72
73
73
; loop over bcd delay period
74
- out y, 24 ; get bcd delay counter value
74
+ out y, 32 ; get bcd delay counter value
75
75
bcd_delay:
76
76
jmp y-- bcd_delay
77
77
You can’t perform that action at this time.
0 commit comments