Hi,
Does anyone have any insight on how to convert RGB (which is three digital CMOS signals to Y'UV).
Y'UV is what is output from the ULA. I am at the final stages of my project and need to convert RGB to Y'UV'.
A formula if given in the Chris Smith Book, on the ULA and I assume some sort of resistor network can be used to implement this, but I am not so clear.
Thanks a ton in advance for any insights here.
Andy
RGB to Y'UV
- 1024MAK
- Posts: 5526
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: RGB to Y'UV
Well, the Y is relatively easy, as it’s just the red, green and blue mixed together with the correct ratios plus the horizontal and vertical sync signals. Then inverted to produce Y’ (as one of the transistors on the ZX Spectrum board inverts it again). This signal carries no colour information as such. It’s also sometimes referred to as the luminance signal.
The U and V are colour difference signals. I can’t remember enough off the top of my head. But I’m sure a search engine can help.
Mark
The U and V are colour difference signals. I can’t remember enough off the top of my head. But I’m sure a search engine can help.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
Re: RGB to Y'UV
Thanks. I have searched everywhere for this. The arithmetic formulas are straightforward, but implementing this when RGB is digital is tricky.
Y can be got from an AD724, but then the problem is U and V...
Y can be got from an AD724, but then the problem is U and V...
- 1024MAK
- Posts: 5526
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: RGB to Y'UV
Digital TTL RGB translates as the equivalent of a full saturation analogue RGB signal.
Mark
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
Re: RGB to Y'UV
Thanks. So the two solutions I can see are:
1) Use 3 channel summing op amps to generate each of the YUV signals, using resistors to get the correct coefficients for RGB..
2) inside the ULA CPLD, identify the 8 colours with brightness.. and then output to a DAC, and generate the YUV from the DAC..
the first perhaps is simpler to get up and running..
Any thoughts?
thanks
Andy
1) Use 3 channel summing op amps to generate each of the YUV signals, using resistors to get the correct coefficients for RGB..
2) inside the ULA CPLD, identify the 8 colours with brightness.. and then output to a DAC, and generate the YUV from the DAC..
the first perhaps is simpler to get up and running..
Any thoughts?
thanks
Andy
- 1024MAK
- Posts: 5526
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: RGB to Y'UV
Just that whichever way you go, don’t forget that you need to take “bright” into account. With a ZX Spectrum, the full saturated colours appear on screen only when the bright bit is set. Otherwise the intensity is slightly lower.
All colours are affected except black, which is always at black level regardless of the state of the bright bit.
Yes, I would try your option 1 first. Do use op-amps that have sufficient bandwidth for baseband video use (better than 6 MHz) and check that the slew rate is also good enough.
Have you looked at how the Harlequin does it’s video? Keep in mind the video circuit changed over the various revisions.
I presume you are attempting to create a ULA replacement for use in an existing ZX Spectrum?
Mark
All colours are affected except black, which is always at black level regardless of the state of the bright bit.
Yes, I would try your option 1 first. Do use op-amps that have sufficient bandwidth for baseband video use (better than 6 MHz) and check that the slew rate is also good enough.
Have you looked at how the Harlequin does it’s video? Keep in mind the video circuit changed over the various revisions.
I presume you are attempting to create a ULA replacement for use in an existing ZX Spectrum?
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
Re: RGB to Y'UV
Yes, I'm at the final stages of the ULA replacement. everything is in place except the YUV output. (currently using RGB as the output for testing, hooked up to an off the shelf composite generator with an AD724).
That said, there must be an easier less complex way to do this, as looking at the existing (closed source), ULA replacements there is not a huge amount of external circuitry to the CPLD, which makes me think even using op amp's it too complex..
Getting a composite out is not a huge issue with an AD724, RBG is not an issue, its just the U and V..
One option could be to use the Y off an AD724, and then U = 0.493 (B-Y) and V =0.877(R-Y)..
A few things though, when B or R is 0, then U and V are negative, this is not consistent with the U and V outputs in real world or the values in CHris Smiths book...
That said, there must be an easier less complex way to do this, as looking at the existing (closed source), ULA replacements there is not a huge amount of external circuitry to the CPLD, which makes me think even using op amp's it too complex..
Getting a composite out is not a huge issue with an AD724, RBG is not an issue, its just the U and V..
One option could be to use the Y off an AD724, and then U = 0.493 (B-Y) and V =0.877(R-Y)..
A few things though, when B or R is 0, then U and V are negative, this is not consistent with the U and V outputs in real world or the values in CHris Smiths book...