Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/dmd_interface_whitestar.pio
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

.program dmd_reader_whitestar

; Send using an external clock on the SPI interface

; initialize y with 8192 = number of pixels ((128 x LSB + 128 x MSB) x 32)
set x, 1
Expand All @@ -33,9 +32,6 @@ dotloop:
in pins 1 ; read pin data
jmp x-- dotloop

mov x, y ; load number of pixels
mov isr, null ; reset shift counter

; There's an empty row with 256 dots at the end of a frame.
; It is ignored because we already read the specified amount of dots and now wait for a new frame.
.wrap
Expand All @@ -60,11 +56,11 @@ static inline void dmd_reader_whitestar_program_init(PIO pio, uint sm, uint offs
sm_config_set_in_pins(&c, 2); // SDATA

// Set the pin direction at the PIO
pio_sm_set_consecutive_pindirs(pio, sm, 5, 1, false); // RCLK
pio_sm_set_consecutive_pindirs(pio, sm, 6, 1, false); // RDATA
pio_sm_set_consecutive_pindirs(pio, sm, 2, 2, false); // SDATA, DOTCLK

// Connect these GPIOs to this PIO block
pio_gpio_init(pio, 5); // RCLK
pio_gpio_init(pio, 6); // RDATA
pio_gpio_init(pio, 3); // DOTCLK
pio_gpio_init(pio, 2); // SDATA

Expand Down
2 changes: 1 addition & 1 deletion src/dmd_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ void dmd_dma_handler() {

for (int l=0; l<lcd_height; l++) {
for (int w=0; w<lcd_wordsperline; w++) {
v = src1[w] + src2[w]*2;
v = src1[w]*2 + src2[w];
dst[w]=v;
}
src1 += lcd_wordsperline*2; // source skips 2 lines forward
Expand Down