Uses the RP2040's Programmable IO to create a PAL colour video signal. It consists of the PIO program, some "driver" and tools code, a test program and a program for creating colour Look-up Tables (LUTs).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
chipfire bb44cd24ab Added note regarding GPIOs used for DAC. 2 months ago
schematics Added DAC schematics 3 months ago
.gitignore Oops, forgot some files 2 months ago
CMakeLists.txt Added missing files 2 months ago
LICENSE Initial commit 3 months ago
PAL colour calculator.ods Added missing files 2 months ago
PAL3.pio Oops, forgot some files 2 months ago
PAL_LUT_64_4b.h Added missing files 2 months ago
README.md Added note regarding GPIOs used for DAC. 2 months ago
analogVideoDriver.c Added missing files 2 months ago
analogVideoDriver.h Added missing files 2 months ago
pal_colour_table_gen.c Dateien hochladen nach „“ 3 months ago
paltest.c Added missing files 2 months ago
pico_sdk_import.cmake Added missing files 2 months ago

README.md

rppico-pio-pal

Uses the RP2040's Programmable IO to create a PAL colour video signal. It consists of the PIO program, some "driver" and tools code, a test program and a program for creating colour Look-up Tables (LUTs).

A schematic for the R-2R-DAC I use is included as well as a spread sheet I used to play around with colours to get a feeling. Source code files:

PAL3.pio: assembly code for RP2040 PIO to generate a PAL signal. analogVideoDriver.c/.h: driver and some helper code for rendering pixels onto a TV using a PAL signal. paltest.c: sample application which shows how the driver code is used. PAL_LUT_64_4b.h: a look-up table generated by pal_colour_table_gen, defines 64 colours (each component, red, green, and blue, has two bit resolution) for a 4-bit DAC. pal_colour_table_gen.c: a helper application which generates colour lookup tables. Has to be compiled manually as of now: gcc -lm -o pal_colour_table_gen

To compile the code, first clone this repository: git clone https://codeberg.org/chipfire/rppico-pio-pal.git

Next, download the RP2040 SDK (follow instructions in the getting started PDF, https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf).

Then create the build directory (this will avoid messing up the code directory) inside the cloned repository and change to it: mkdir build cd build

Make sure you have set the environment variable PICO_SDK_PATH and call CMake: cmake ..

If you run into trouble, pass it the PICO_SDK_PATH variable (I always had to do this, something's messed up): cmake -DPICO_SDK_PATH=/path/to/pico/sdk ..

Now all you have to do is call Make: make

That should be all. Ah, the DAC has to be connected to GPIOs 0-3 unless you change that in paltest.c