kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Select new row earlier to avoid lighting pixel on previous row very slightly
rodzic
c4decc5003
commit
3371b6c751
|
@ -154,13 +154,14 @@ namespace pimoroni {
|
|||
uint8_t *p = &bitstream[row * ROW_BYTES + (BCD_FRAME_BYTES * frame)];
|
||||
|
||||
p[ 0] = WIDTH - 1; // row pixel count
|
||||
p[56] = row; // row select
|
||||
p[ 1] = row; // row select
|
||||
|
||||
// set the number of bcd ticks for this frame
|
||||
uint32_t bcd_ticks = (1 << frame);
|
||||
p[57] = (bcd_ticks & 0xff) >> 0;
|
||||
p[58] = (bcd_ticks & 0xff00) >> 8;
|
||||
p[59] = (bcd_ticks & 0xff0000) >> 16;
|
||||
p[56] = (bcd_ticks & 0xff) >> 0;
|
||||
p[57] = (bcd_ticks & 0xff00) >> 8;
|
||||
p[58] = (bcd_ticks & 0xff0000) >> 16;
|
||||
p[59] = (bcd_ticks & 0xff000000) >> 24;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,7 +486,7 @@ namespace pimoroni {
|
|||
|
||||
// set the appropriate bits in the separate bcd frames
|
||||
for(uint8_t frame = 0; frame < BCD_FRAME_COUNT; frame++) {
|
||||
uint8_t *p = &bitstream[y * ROW_BYTES + (BCD_FRAME_BYTES * frame) + 1 + x];
|
||||
uint8_t *p = &bitstream[y * ROW_BYTES + (BCD_FRAME_BYTES * frame) + 2 + x];
|
||||
|
||||
uint8_t red_bit = gamma_r & 0b1;
|
||||
uint8_t green_bit = gamma_g & 0b1;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
; loop over row pixels
|
||||
out y, 8 ; get row pixel count (minus 1 because test is pre decrement)
|
||||
out pins, 8 ; output row select
|
||||
pixels:
|
||||
|
||||
; red bit
|
||||
|
@ -63,15 +64,14 @@ pixels:
|
|||
|
||||
jmp y-- pixels
|
||||
|
||||
out null, 16 ; discard dummy bytes
|
||||
out null, 8 ; discard dummy bytes
|
||||
|
||||
out pins, 8 ; output row select
|
||||
|
||||
set pins, 0b110 [5] ; latch high, blank high
|
||||
set pins, 0b000 ; blank low (enable output)
|
||||
|
||||
; loop over bcd delay period
|
||||
out y, 24 ; get bcd delay counter value
|
||||
out y, 32 ; get bcd delay counter value
|
||||
bcd_delay:
|
||||
jmp y-- bcd_delay
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue