Semi-pseudonymous maker “Fred,” also referred to as “guruofthree,” has pushed a Raspberry Pi RP2040 microcontroller to its absolute restrict with a view to generate a compliant PAL-standard composite video sign with no further {hardware} bar a easy resistor ladder as a digital-to-analog converter — although warns the challenge is not for the faint of coronary heart.
“[I’ve been] attempting to get the Raspberry Pi RP2040 chip’s PIO [Programmable Input/Output blocks] to generate a color PAL composite video sign, utilizing solely a resistor ladder digital-to-analogue converter (DAC),” Fred writes of the challenge. “As a result of technical limitations of RAM and DAC timings, the very best I used to be in a position to get displayed was both a ‘excessive decision’ 164×125 picture, or a ‘horizontal doubled’ anamorphic picture, stretched again out to 328×125. I’ve much more appreciation for the engineers of the 80s that did higher than this with a chip working 1/two hundredth the velocity!”
The PAL normal makes use of phase-alternating line encoding to place colour info into analog tv indicators — equal to NTSC within the US or SECAM in France. Luminance and chrominance are bundled collectively right into a single sign, transmitted on this case down a single wire to a appropriate TV’s RCA jack — offering a full-color picture on the receiving finish.
Getting a composite video output from a microcontroller is fairly straightforward, in case you’re not too fussy about it being in black and white. Including colour will be extra of a problem, as Fred’s work exhibits — and doing it utilizing the PIO blocks of the RP2040, which permit the consumer to create state machines that run independently of the microcontrollers two Arm cores, is tough work, which is why Fred discovered the challenge useless within the water till the microcontroller was overclocked to a formidable 241 p.c of its inventory clock.
The challenge wants solely a resistor ladder, appearing as a digital-to-analog converter, plus a robust-enough RP2040 board. (📷: guruofthree)
“I consider I’ve partially damaged not less than one RP2040 engaged on this,” Fred admits. “It now not registers when plugged into some computer systems and the GPIO [General-Purpose Input/Output pins] appears to have 5V popping out. As for my particular {hardware}, I’ve used each a Pimoroni Tiny2040 and an everyday [Raspberry Pi] Pico, [and] I’ve constructed two totally different easy (learn: much less exact) resistor DACs.
“I am tremendous happy with the entire thing. It feels prefer it’s been a private tour de power of a dozen issues, not restricted to the PIO, DMA, reminiscence structure, PAL, timings, and pointers…”
Anybody trying to observe in Fred’s footsteps, and with a PAL-compatible show machine, can discover the supply code and demos on GitHub underneath the permissive MIT license.