There is a portal to this formally black art in the Stupid Video thread. And there is an excellent description of using counters in the Parallax applications notes, AN001.
You are forewarned repeatedly everywhere in the forum to keep your leads short and to keep everything as close to the pins as possible (1 inch). You have to actually build a circuit, you aren't supposed to use a bread board... something having to due with neurotic inductance. (Inductance will drive you nuts[noparse]:)[/noparse]
You will need a couple of resistors and a couple of capacitors. There is a beautiful applet (Rayman's web site?) to help you refine your circuit.
No one has shown a "cog-heterodyne" approach to A/D but if you study Phil and Bagger's work on video and just reverse the logic, it seems that just about anything is possible.
Nevertheless, its not "neurotic", its "magnetic". But easy to muddle up...
It should be a good educational example to not only build a charge balancing converter but also the other known ADCs: Dual Slope (with a cap), Successive Approximation (with a R-2R ladder), "Flash", using all 4COGS with 8 timers!
It sounds VERY interesting I am not 100% sure what you mean, but I think it is good word for using the power ("dyne") of multiple COGs Maybe "polydyne" would even be more fitting
Speaking of heterodyning, I wonder if there's a possible way to use the counters on the prop to turn it into a tuner.· I've been trying to think of ways to get the propeller to receive radio signals.
I built an AM radio years ago in school which had·an oscillator that would track the tuning frequency·with a constant frequency offset.· When mixed together, the signal would be at a fixed carrier (IF) for the next two stages using tuned Class C amplifiers.· I wonder if one could tune radio frequencies using a similar approach with an oscillator on the propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
I actually tried transmitting FM on the propeller, and it worked. I picked it up clearly on my home stereo at the other end of the house, and I only used one foot of wire for the antenna. I just connected the wire to an output pin.
AM might be fairly easy with amplitude shift keying (ASK). Turning your carrier on and off at a given rate would be very easy.
I think the hard part would be to try to receive RF with the Propeller without significant amount of external circuitry.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
Considering how noisy (electrically) the Propeller is ... compared to a diode and parallel resonant "tank" circuit, you will need some quiet off-chip amplification as well as an off-chip demodulator (unless you're working with low frequency RF ... AM broadcast or lower frequency). The Propeller isn't really as fast as you might think (20 instructions per microsecond ... that's maybe 13 per RF cycle). The counters help on the transmit side and there's no equivalent for receiving.
Oh, by the way, I did try to transmit AM using just a short length of wire and that didn't transmit more than about a foot away. AM is much lower frequency and the wire would have to be very long. If anyone is considering trying this you might need a coil and possibly some external amplification
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
There are integrated tuner ICs like the ULN2204A that incorporate the analog functions that Mike referred to. Maybe the Prop could provide the local oscillator and control as the interface to a nice tuner.
Speaking of sigma-delta and more unusual applications, I've wondered about the other counter modes. The logic modes can "mix" two input signals. For example, two frequencies taken into the logic A|B inputs of counter A could be sampled in a pasm loop and transfered with offset to counter B in duty mode to play back the beat frequency.
We use POS detect w/feedback to make a sigma delta converter. But what about, say, POSEDGE detect w/feedback, what is that good for? How about this: A delay line is connected from the counter B output pin to its A input pin. Suppose the time delay depends on a physical parameter to be measured. Then when the output goes from 1->0, it takes some definite time for that to propagate to the input, at which point the output changes 0->1 as a result of the feedback and the counter increments by one as a result of the 0->1 transition. Allow it to free run, with a frequency that depends on the delay time quantized in units of 2/clkfreq. The frequency is counted as in the normal POSEDGE detect mode, but now it is a closed loop ADC for the parameter that governs the delay.
I think you're right about Chip, that he's way out in front in thinking about the minimal hardware, necessary and sufficient to enable a cornucopia of tasks. He did think about the radio transmission capabilities, aka TV etc., and I remember talking couple of times about the possibility of short range direct radio offload of data from a data logger based on the Prop. He's said too on several occasions that he's surprised by things people have come up with in the year+ that the Prop has been out and about. I bet that all the comments and the wish list for Prop II are being heard.
Comments
Look here:
http://www.rayslogic.com/propeller/Programming/ADC.htm
Also, check out the counters appnote and the Microphone2Vga demo
You are forewarned repeatedly everywhere in the forum to keep your leads short and to keep everything as close to the pins as possible (1 inch). You have to actually build a circuit, you aren't supposed to use a bread board... something having to due with neurotic inductance. (Inductance will drive you nuts[noparse]:)[/noparse]
You will need a couple of resistors and a couple of capacitors. There is a beautiful applet (Rayman's web site?) to help you refine your circuit.
No one has shown a "cog-heterodyne" approach to A/D but if you study Phil and Bagger's work on video and just reverse the logic, it seems that just about anything is possible.
It should be a good educational example to not only build a charge balancing converter but also the other known ADCs: Dual Slope (with a cap), Successive Approximation (with a R-2R ladder), "Flash", using all 4COGS with 8 timers!
did I use the right concept (cog-heterodyne)?
I built an AM radio years ago in school which had·an oscillator that would track the tuning frequency·with a constant frequency offset.· When mixed together, the signal would be at a fixed carrier (IF) for the next two stages using tuned Class C amplifiers.· I wonder if one could tune radio frequencies using a similar approach with an oscillator on the propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
en.wikipedia.org/wiki/Software-defined_radio
AM might be fairly easy with amplitude shift keying (ASK). Turning your carrier on and off at a given rate would be very easy.
I think the hard part would be to try to receive RF with the Propeller without significant amount of external circuitry.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
We use POS detect w/feedback to make a sigma delta converter. But what about, say, POSEDGE detect w/feedback, what is that good for? How about this: A delay line is connected from the counter B output pin to its A input pin. Suppose the time delay depends on a physical parameter to be measured. Then when the output goes from 1->0, it takes some definite time for that to propagate to the input, at which point the output changes 0->1 as a result of the feedback and the counter increments by one as a result of the 0->1 transition. Allow it to free run, with a frequency that depends on the delay time quantized in units of 2/clkfreq. The frequency is counted as in the normal POSEDGE detect mode, but now it is a closed loop ADC for the parameter that governs the delay.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com