Composite (complex) Video 100% Straight C on a One-Dollar MCU!

T.Jackson

Joined Nov 22, 2011
328
Nice job.

Did you have trouble working with composite video at the start, or am I just a complete idiot?

tom66

Joined May 9, 2009
2,595
Nice job.

Did you have trouble working with composite video at the start, or am I just a complete idiot?
It's nasty stuff. Took me a while to understand it. I bought a digitising oscilloscope with a video trigger to help me. Invaluable for that kind of stuff.

T.Jackson

Joined Nov 22, 2011
328
Yeah a scope would have been nice. I kept getting conflicting information about the vertical blanking, and almost threw my hand in the air to put the project aside until I got a DSO and I could see what was coming out of my camera.

Then I got a break! I came across some asm code that was highly remarked describing the exact width of the pulses and exactly how many to use and what scan lines can and cannot be seen and how many to count before doing VSYNC.

T.Jackson

Joined Nov 22, 2011
328
It's nasty stuff. Took me a while to understand it. I bought a digitising oscilloscope with a video trigger to help me. Invaluable for that kind of stuff.
You got the color working on your super fast pic yeah?

tom66

Joined May 9, 2009
2,595
Yeah a scope would have been nice. I kept getting conflicting information about the vertical blanking, and almost threw my hand in the air to put the project aside until I got a DSO and I could see what was coming out of my camera.

Then I got a break! I came across some asm code that was highly remarked describing the exact width of the pulses and exactly how many to use and what scan lines can and cannot be seen and how many to count before doing VSYNC.
I probably could have done this without an oscilloscope but it would have been very difficult. My original prototype - I still have it - was entirely through hole (on a breadboard) and completed over a 3-4 week period, but the project has considerably developed from that point, including adding black, all the drawing functions, a complete hardware platform and going SMD.

You got the color working on your super fast pic yeah?
No. I decided for colour I will go with a different architecture using an FPGA to digitise video. The input signal will be captured, decoded and the OSD added to it, then the video is converted back into PAL/NTSC. This is useful for me because it also allows video processing simultaneously andc an effective OSD resolution of 1024x576 or 720x576. The control module will be able to highlight coloured/patterned targets at a distance on the video. But that's a long way away and will cost about $50-100 in component costs alone. There are chips which do colour OSDs, but they are rare and expensive. Thread Starter T.Jackson Joined Nov 22, 2011 328 Yeah something with throughput of like 50MIPS coupled to a larger DAC would be required to do color. Thread Starter T.Jackson Joined Nov 22, 2011 328 Sorry about color Vs. colour. I know you're British. The majority of people here are American, so we're on their turf. Out of respect I spell it as color. tom66 Joined May 9, 2009 2,595 Yeah something with throughput of like 50MIPS coupled to a larger DAC would be required to do color. The main problem isn't processing power; a PIC32 (80 MIPS / 32 bit) would probably be capable of creating the right signals. But, the problem is synchronising to the colour burst (a brief <10µs pulse of 3.57 MHz or 4.43 MHz, 10 cycles.) If you succeed with that, the colour information must be encoded, which means converting to YUV and then generating the IQ quadrature modulated 3.57 MHz signal. It's no easy task, especially when the hardware needs to be small. Then you must sum the IQ with the luma information. All whilst handling variations in the camera's colour burst frequency and variations in picture amplitude. The hardware would be so complex. Sorry about color Vs. colour. I know you're British. The majority of people here are American, so we're on their turf. Out of respect I spell it as color. Colour/color; I use both. Thread Starter T.Jackson Joined Nov 22, 2011 328 I see. Don't think that I would attempt this without a decent DSO. I sort of half believe what I have read regarding color, but arrr I need to see for myself on a scope. Like what is coming out of a camera whilst shooting solid red, green and blue. Something 'baseline' to work with. Reverse engineering basically. Know what I mean? tom66 Joined May 9, 2009 2,595 I see. Don't think that I would attempt this without a decent DSO. I sort of half believe what I have read regarding color, but arrr I need to see for myself on a scope. Like what is coming out of a camera whilst shooting solid red, green and blue. Something 'baseline' to work with. Reverse engineering basically. Know what I mean? You can only really see luma on an oscilloscope. The high frequency chroma shows up as a thicker trace in certain areas. Have you seen PICO-OSD: http://www.micro-examples.com/public/microex-navig/doc/081-pic-osd-superimposer.html Cheaper than$1!

That OSD there was what inspired me to make Super OSD. I started off by modifying the code but got nowhere fast. Worked my way up to 192x128 pixels, on a breadboard, then 256x192 pixels, also on a breadboard.

T.Jackson

Joined Nov 22, 2011
328
These new ones on ebay for well under a grand with more colors than the rainbow on the buttons, knobs and screen which claim bandwidth of 100Mhz -- they're mere toys that will disappoint?

T.Jackson

Joined Nov 22, 2011
328
"Pray that there's intelligent life﻿ somewhere in outer space 'cause there's bugger all here on planet earth!"
lol

If you've ever studied phycology a bit, then you probably already know that around 2% of the population have IQs of 140 or more. BUT, a lot of people with high IQs (120+) are not all there.

Worse part is when it is argued that intelligence is simply a measure of education!

tom66

Joined May 9, 2009
2,595
These new ones on ebay for well under a grand with more colors than the rainbow on the buttons, knobs and screen which claim bandwidth of 100Mhz -- they're mere toys that will disappoint?
Post a link to one of them. I bet there's something fishy going on.