PDA

View Full Version : Explanation of how the Propeller demo board outputs sound and video signals



unebonnevie
05-15-2010, 12:15 PM
Hi,

It's been a long since I last visited Parallax. Time to pick up electronics. http://forums.parallax.com/images/smilies/smile.gif I saw the Propeller demo board schematic at http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropDemoDschem.pdf.

And, I don't understand how the 3 resistors, 1.1Kohm/560ohm/270ohm, form a 1V 75ohm 3-bit DAC to output TV signals? What's the math behind this? Same question for the 3 sets of two resistors form 1V 75ohm 2-bit DACs that are used to generate red, green, and blue.

Thanks for any explanation. I understand the Propeller has built-in hardware to encode NTSC signals. How it works with the above DACs is what I am trying to understand.

Mike Green
05-15-2010, 01:38 PM
Each of the 3 outputs for TV or the 3 sets of 2 outputs for VGA can be switched between slightly above 0V (Low) to slightly below 3.3V (High) or they can be set to input mode which effectively disconnects them. The various combinations of signals effectively form a voltage divider with the common point providing a voltage with 8 different values from 0V to 3.3V approximately evenly spaced for the TV output or 4 different values from 0V to 3.3V for the VGA outputs. The other 2 outputs for VGA are used for sync pulses and are just 0V or 3.3V.

With the loading of the 75 Ohm TV input, this voltage drops closer to 1V and comes closer to 75 Ohms. The circuit can be modified slightly to produce an output closer to 75 Ohms impedance with a 1V range, but the existing circuit is fine for most uses.

Try the various bit combinations of the VGA outputs (0V/0V, 0V/3.3V, 3.3V/0V, 3.3V/3.3V) with the resistors used. You'll see how it works.

The sound output is handled with a PWM (pulse width modulated) output (in stereo). There's an application note downloadable from Parallax (AN001) that describes how both the PWM ADC and the Sigma-Delta DAC work and provide sample code.

Post Edited (Mike Green) : 5/15/2010 6:44:06 AM GMT

Rayman
05-15-2010, 06:25 PM
It's actually pretty complicated! Even more so that you might think, once you get into the assembly driver...

I wonder how deep any of the Propeller books out there get into this topic.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm

JonnyMac
05-15-2010, 10:53 PM
I was speaking with a Propeller programming friend yesterday who told me that he had to buy the Hydra book just for the 10 pages that explains how the video driver works -- he as not happy. It would be nice if one of the app engineers at Parallax could produce more app notes and explain some of the really great objects that Chip has created in the past. Sometimes -- for me, anyway -- just having the source is not enough to get over the hump.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

Bean
05-15-2010, 11:16 PM
Not to "beat up" on Parallax too much, but the Propeller has been out for about 4 years now. And there is only 1 app-note available.

I think a video driver app-note would be great.

Bean

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [RUSH - Freewill]

potatohead
05-16-2010, 12:20 AM
It's worth noting that those pages are available for free as downloadable sample PDF chapters. They document the Parallax reference video drivers nicely.

www.parallax.com/dl/docs/prod/prop/Hydra-Ch16Sample-v1.0.pdf

The entry page for these is:

http://www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/CategoryID/20/List/0/SortField/0/Level/a/ProductID/467/Default.aspx

:)

@Bean: I love RUSH. Nice tagline!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness! (http://propeller.wikispaces.com/)
8x8 color 80 Column NTSC Text Object (http://obex.parallax.com/objects/550/)
Safety Tip: Life is as good as YOU think it is!

unebonnevie
05-16-2010, 12:47 AM
Thank you, all. Yeah, like others said, I would love learn the math and the complete understanding how those DACs work to drive the video output. I have seen so many circuits that simply put in those resistors without explanation.

Thanks for posting the hydra video driver link pages...That sure helps.

unebonnevie
05-16-2010, 12:53 AM
Mike said...
The sound output is handled with a PWM (pulse width modulated) output (in stereo). There's an application note downloadable from Parallax (AN001) that describes how both the PWM ADC and the Sigma-Delta DAC work and provide sample code.



How do you get to the app note? Thanks!

Mike Green
05-16-2010, 01:03 AM
Go to the main Parallax webpage and click on the Downloads button. On the downloads page, click on the Propeller Downloads button. You'll see it as well of lots of other useful information.

localroger
05-16-2010, 01:16 AM
The reason the 3 resistors form a voltage divider is that the 75-ohm impedance of the video input functions as the resistor to ground.

Bean
05-16-2010, 01:31 AM
potatohead said...
It's worth noting that those pages are available for free as downloadable sample PDF chapters. They document the Parallax reference video drivers nicely.
www.parallax.com/dl/docs/prod/prop/Hydra-Ch16Sample-v1.0.pdf (http://www.parallax.com/dl/docs/prod/prop/Hydra-Ch16Sample-v1.0.pdf)
The entry page for these is:
http://www.parallax.com/Store/Microcontrollers/PropellerProgrammingKits/tabid/144/CategoryID/20/List/0/SortField/0/Level/a/ProductID/467/Default.aspx

Chapter 14 is the one that describes the video hardware. And that chapter is not avaible for download (that I know of).

P.S. Two words "Tom Sawyer" OH YEAH!!!
P.S.S. "Closer to the heart" and "The Trees" are great too...

Bean.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [RUSH - Freewill]

Post Edited (Bean) : 5/15/2010 6:50:31 PM GMT

potatohead
05-16-2010, 01:54 AM
Agreed, but it does cover the driver well, addressing the post above.

The data sheet is actually pretty good. Some things are not well documented, but that plus working driver code is an awful lot. My own experience is favorable. There is bias because I have consistently hacked away at video related things, starting with old machines in the 80's. But, I don't think that's too much bias. The Parallax TV driver is a beast. It's great, but difficult to understand. No question there. Some of the other, simpler scan line buffer, or bitmap drivers are a lot easier, and perhaps it makes sense to incorporate some of that for newbies.

Of all the graphics code done so far, I find the simple 8x8 and bitmap stuff I and others have worked on to be the easiest. Most of that is right out of the late 70's and 80's era and just sort of rocks in that way. The Parallax driver chip wrote is actually bad *** powerful. IMHO, it could use a better interface, probably something done with a SPIN wrapper, and more documentation on the signal subtleties. Eric's templates are very, very good,and capable of evolving into most any desired graphics scheme. I give the nod to him on the better color driver too. That one hasn't been exploited much, but it's got a lot of potential, and it generates the color signal directly, putting many things under the control of the programmer that the other drivers don't.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness! (http://propeller.wikispaces.com/)
8x8 color 80 Column NTSC Text Object (http://obex.parallax.com/objects/550/)
Safety Tip: Life is as good as YOU think it is!

HollyMinkowski
05-16-2010, 02:03 AM
unebonnevie

The video circuitry and code seem like magic to me too http://forums.parallax.com/images/smilies/smile.gif

I'm way better at understanding purely digital things...
I am an on/off type I guess.
Digital to analog and the reverse still seem puzzling.
I don't have an intuitive grasp of it yet. I can use it
and modify the code but I'm still puzzled.

localroger
05-16-2010, 04:26 AM
I love the Propeller partly because it is almost a hybrid chip, with some analog functionality. Chip and Parallax chose a process that made it impossible to put the program in the chip, but did allow very clean analog I/O, including things like delta-sigma A/D and use of FRQx with extremely simple external filters to generate analog voltages. The video stuff is just magic. Like Holly I'm naturally more of a digital guy which is kind of ironic since I work in an industry where the analog measurement of millivolt-level signals drives everything. But the thing is, guys like Alan Turing and John Von Neumann had to work with analog stuff everywhere to create the world's first computers. They didn't work with delay lines and CRT memory units because they wanted to, they did because it's all they had. Nowadays we've gone the other way, and even movies are rendered digitally. The Propeller seems to be suspended between these two worlds, a digital device that is in many ways analog aware. I don't know of anything else quite like it.