Any way to calculate what comes out on TV output pins?
Rayman
Posts: 14,877
I think there's some hidden magic inside the Prop that turns bytes of color into 3-bits at the output pins...
Anybody know how to do this conversion?
I'm thinking I could load a SRAM chip with an image and output on TV, if I knew how to convert...
PS:· Could one perhaps use 2 TV cogs and mix the outputs together to get more colors?
(asking because the SRAM is 8-bits wide, so there'd be a lot of waste only using 3-bits...)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Anybody know how to do this conversion?
I'm thinking I could load a SRAM chip with an image and output on TV, if I knew how to convert...
PS:· Could one perhaps use 2 TV cogs and mix the outputs together to get more colors?
(asking because the SRAM is 8-bits wide, so there'd be a lot of waste only using 3-bits...)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
But you·can·call me micro.
Want to·experiment with the SX or just put together a cool project?
SX Spinning light display·
BTW, the output from the three bits is digital, not analog. The resistor DAC is what converts it to an eight-level analog signal.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 9/29/2009 7:50:49 PM GMT
In summary, the luma provides a base 0-7 value (-40 to +100 IRE).· Color (when enabled) adds or subtracts one from that output value depending on the value of the 4 bit counter driven by PLLA vs the color value.· Supersaturated colors are left as an exercise for the reader.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
I think I've found a better way... I'll just drop in an AD723 to do the conversion in good quality.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
For my NTSC sprite driver I took an alternate tack by using VGA mode and clocking out three 14.31818MHz (4x colorburst) values per pixel (240 pixels per line).· This allowed me to create any YUV color - limited only by the DAC.· (The driver assumes a standard Demoboard style 4 bit DAC, but it could also drive an 8 bit DAC for composite or a 4+4 DAC for S-Video.)
NTSC is also bandwidth limited by color modulation, so the number of pixels per line will top out at around 300 (240 active) for composite and 455 (320 active)·for S-Video.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
But, now I'm leaning heavily toward AD723 because I can spit out either DVI, VGA or TV with the same data...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
In composite video color is encoded as two color difference (B-Y & R-Y, aka·U & V) signals quadrature modulated and added to the base luma signal (i.e. Y(t) + U(t) * sin(F*t) + V(t) * cos(F*t) where F is the colorburst frequency).· What my driver does is run PLLA at 4 times the colorburst frequency and then kick out samples for cos(F*t) = 1; sin(F*t) = 1; cos(F*t) = -1; sin(F*t) = -1; or Y(t) + V(t); Y(t) + U(t); Y(t)·- V(t); Y(t) - U(t).·
Now, with only the Demoboard DACs my driver can't quite create exactly the same phases (hues) that the Propeller can generate.· However, it generates a much larger color gamut with a wide variety of color saturations.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
Maybe I'm leaning back toward this method instead of a seperate chip now...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
(It would have to be clocked at around 57 Mhz, or 16x 3579545.)
It could look like a circle of 16 LEDs if slowed down to around 1 shift per second, with half on and half off.
That would generate all 16 Propeller Color Phases of 3579545 Mhz at the same time.
If each LED is numbered and colored like the Propeller colors, then ...
if the bright yellow-green one is connected to a video signal for 6 microseconds after sync,
then connection from a bit of the shift register to the video source at any other time will
change the video to that color.
I forgot how I was going to explain this as a 16 slice pizza with each slice it's own color, spinning
3579545 times a second...
It is simple to choose from 16 color phases with only 14.31818 Mhz and 2 dollars worth of CMOS logic chips,
and make a bitmap image in a 64KB 27512 EPROM and a binary counter addressing it for continuous readout,
perhaps to display color bars and a channel logo, as I did once. (Similar to the OP idea with SRAM).
I figure there are 228x262 pixels in a complete non-interlace frame of NTSC, each one a cycle of 3579545 Mhz,
and there should be very close to 60 of those repeating in a second. The bitmap in the EPROM could be exactly
the color numbers of the Prop, with the 3 lowest bits going to resistor DAC and the 4 highest ones going to
the color phase selecting logic whose output is added to the DAC through a 1K resistor.
Bit 3 seems to gate the color, so I'd expect all of the undocumented numbers
07 17 27 37 47 57 67 77 87 97 A7 B7 C7 D7 E7 F7
to be white without having tested them all.
Maybe I can fill the flash with an frame, put the 4 output pins right onto the 4 TV pins, then clock it out at 4FSC.
I haven't figured out how I reset the address for the next frame yet though... I imagine a TV wouldn't like output during the blanking period...
Maybe use another pin to force the DAC output to zero...
Composite signals are difficult. People like the sharpness of VGA, and they will pay the pins for it. Component video is on par with that, but there are few handy displays. S-video is a pretty sweet compromise, particularly on the monochrome part of the signal. Most displays I've tried will do 640 luma pixels without any real trouble. It's not VGA, but it's great compared to composite.
Maybe we could split the middle and start getting much better TV output?
I'm thinking of a circuit where we go ahead and use 8 pins, maybe using three for a much better Eric style color signal, and the remaining ones for more greys. S-video lets us break the color up and do a manual signal. I've toyed with that driver Eric wrote, and it's got a lot of potential.
TV also has lower sweep frequencies, which boil down to being able to do more in a single cog, or smarter color data, making better use of the RAM in the Prop.
A composite TV signal is always active. Zero output is typically sync (aka -40 IRE) while black (0 IRE) is 40/140 of full range (100 IRE = white). Horizontal sync is a 4.7uS sync pulse (which is then followed by a colorburst wave). Vertical sync is several lines of sync & black in a fixed pattern. However, during that time period there is no requirement to retrieve picture data.