This project plays binary-colored 80px x 60px @ 24fps video recorded in SPI NOR flash, playing with 640px x 480px @72Hz VGA. Additionally, the project plays PCM or PWM Audio recorded in same flash chip. The input chooses type of audio(PCM/PWM), type of VGA PMOD, and the color of the video. Also, uio[7:2] is used for SPI communication and uio[1:0] is used for audio output. Finally, output is used as video output.
Hook up a VGA monitor to the outputs and provide a clock at 31.5 MHz. choose the type of audio output with input[0], and choose the type of VGA PMOD with the input[1]. color of pixels which turned off (which data of the pixel is 0) is selected with inputs[4:2] (2:R, 3:G, 4:B), and color of pixels which turned on (which data of the pixel is 1) is selected with inputs[7:5] (5:R, 6:G, 7:B).
Data structure of SPI flash chip:
Audio - For PCM, using piezo on uio[1:0] would work. For PWM, external DAC like LTC2644 chip is needed (not tested though) Set input[0] low to use 74880Hz 1-bit PCM mode and high to 9360Hz 8-bit PWM mode.
VGA PMOD - you can use one of these VGA PMODs:
SPI flash (W25Q128JVSSIQ)
# | Input | Output | Bidirectional |
---|---|---|---|
0 | 74880Hz 1-bit PCM(0) / 9360Hz 8-bit PWM(1) | hsync / R1 | sound n |
1 | Tiny VGA(0) / VGA clock PMOD(1) | vsync / G1 | sound p |
2 | color_off(0) - R | B0 / B1 | spi I/O 0 (W25Q128JVSSIQ NOR SPI flash chip) |
3 | color_off(0) - G | B1 / VS | spi I/O 1 |
4 | color_off(0) - B | G0 / R0 | spi I/O 2 |
5 | color_on(1) - R | G1 / G0 | spi I/O 3 |
6 | color_on(1) - G | R0 / B0 | spi flash clock |
7 | color_on(1) - B | R1 / HS | spi chip select |