Composite video from a single-board computer? Big deal — every generation of Raspberry Pi has had some way of getting composite signals out and onto the retro monitor of your choice. But composite video from an ESP32? That’s a thing now too.
There are some limitations, of course, not least of which is finding a monitor that can accept a composite input, but since [bitluni]’s hack uses zero additional components, we can overlook those. It really is as simple as hooking the monitor up to pin 25 and ground because, like his recent ESP32 AM radio station, the magic is entirely in software. For video, [bitluni] again uses his I²S tweaks to push a lot of data into the DAC really fast, reproducing the sync and image signals in the 0-1 volt range of the PAL composite standard. His code also supports the NTSC standard, but alas because of frequency limitations in the hardware it’s monochrome only for both standards, at least for now. He’s also got a neat trick to improve performance by running the video signal generation and the 3D-rendering on separate cores in the ESP32. Check out the results in the video below.
It looks like the ESP32 is getting to be one of those “Is there anything it can’t do?” systems. Aside from radio and video, we’ve seen audio playback, vector graphics, and even a Basic interpreter easter egg.
The ESP32 looks really cool, but it seems like if you wanted to do random cool things with embedded systems, you’d be better off choosing an ARM Cortex-M core.
They can scale between tens of MHz with low power usage and minimal features, up to hundreds of MHz with onboard display drivers and even graphical accelerators. And you’d be using the same general instruction set.
But the ESP32’s core is proprietary and ultimately you’re constrained by that one chip’s capabilities if it’s the core that you choose to learn about in depth.
FWIW: Imo, if all you do is C programming, the core doesn’t really matter that much. Not all people do only C programming, however, and we feel the proprietary-ness of the Xtensa core also is a downside of the thing; we actually are looking into using more open cores, but as with all chip design things, this unfortunately is not a quick process. (Although you may already see the first glimmers of it in our next chip…)
Next chip?!?!? Wooooo ! :)
Wild speculation ofc, and I don’t expect neither confirm or deny any time soon :) But “looking into using more open cores” sure smells like a RISC-V proposition to me.
I, for one, certainly wouldn’t mind if that comes to pass.
It seems you were correct.
I find it kind of amusing that this thread is about cores, but both of Bitluini’s recent hacks have nothing to do with a core, and everything to do with a fast DMA controller and DAC…and which, BTW, use practically undocumented features of said proprietary core to set that up…Sure, I’d prefer open source but it’s not like ARM is fully open, for example as used on Raspi (graphics). Because it’s not just about the core – the days of a chip having just a CPU like a Z-80 are long gone.
“the days of a chip having just a CPU like a Z-80 are long gone.”
They’re not as far gone as you might think. There is still a market for non-SoC devices but it’s ‘rather specialised’ :)
It’s not such a big deal. I speak AVR, Cortex-M, and ESP equally fluently. (At the SDK / datasheet level, nevermind if you use an over-library like Arduino. In C, though, not assembly.)
Picking up a new chip is a week’s work, not a year’s. They all work fundamentally the same, but name the registers and functions differently. No biggie, IMO.
This is great!
It’s never not a good time to remind people that [lft] did *colour* PAL video generation on an AVR, of all things:
https://www.linusakesson.net/scene/phasor/
I love that guy!
His demos are really cool!
I like how he integrates quality music composition into his demos.
FWIW, the ESP32 can do full-color, full-PAL-resolution composite as well. I wrote a demo back at the end of 2017 that demonstrates this: https://www.esp32.com/viewtopic.php?f=2&t=4056 . Still need to release the source code, though, there are a few dirty tricks in that that I’m equally disgusted by as well as proud of.
Hm, at 80MHz SPI and a 8 clocks per DAC, should be able to bitbang CVBS at 10MHz, and that should be just enough to fit even PAL’s chroma frequency.
Although maybe the math becomes annoying?
I feel like SECAM is the last uncharted frontier for silly CVBS tricks, but maybe I just haven’t been looking in the right place.
I would be exhausted if I were as awesome as you are at things. You keep the bar raised for all of us, Sprite_tm!
3 years and still no source code released or I missed something? :D
I think its great, someone pushing (and proving) the limits to accomplish a task, yes, could have been done with other hardware, but, it was done with this, something never meant to be used in this form of fashion. Useful? Depends. Better than some of the articles and hacks that have been presented recently here and around the net.
Maybe you should just paste this exact same comment into every story.
it’s been done and better in colour https://youtu.be/bcez5pcp55w
This ain’t composite. It’s plain old VIDEO signal.
Composite is, you know, a composite of luminance and chrominance signals.
Composite means composition of video and sync.
Color has nothing to do with it.
I have done it with a x8086 PC-XT emulator, 640K RAM and CGA video output on the ESP8266.
http://mcuhacker.wordpress.com
http://www.youtube.com/watch?v=5-ledn5xpnk
My morbid curiosity wonders if it’d be feasible to slap on some modern Serial-in, Parallel-out Shift Registers (and level converters) and thus make a hacky S-100 bus adapter for it.
A hacky ISA bus would be better!
Didn’t CNLOHR do this except he went as far as generating the RF too? So you just brought the board near a TV and it transmitted it’s video.