How fast can a cog count?
Carl Hayes
Posts: 841
I'm in very preliminary design on a device that will require counting a 1.44 MHz signal (from a crystal oscillator) and producing the following outputs:
(1)· a 40 KHz square wave (to feed an LMF100 filter that's running bandpass at 800 Hz·with a frequency ratio of 50).
(2)· an output that is a count from 0 through 359, cycling 800 times per second (a degree counter).· This can be in common storage for another cog to read, or can be in binary on 9 output pins for another cog to read (to avoid hub delays).· I can if necessary devote 9 I/O pins for that, but I druther not (as we say in the Sunny South).
(3)· six outputs on pins, one ON at a time, cycling as a ring counter 800 times per second (switching from one output to the next 4800 times per second).· These will switch antennas in a six-antenna Adcock direction-finding array.
I can easily build this in TTL, but would rather put it in a single cog if feasible, because it takes less space and there's going to be a Propeller in the system anyway (doing other calculations).
Can a cog count cycles·that fast (1.44 MHz)?· Can it do it in Spin?· Can it do it in assembler?· I could determine it by experiment, of course, but if the answer is a clear no I will have saved the time.
If there's anything dumb in the above, don't hesitate to say so.
And, oh, Merry Christmas.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
Post Edited (Carl Hayes) : 12/25/2008 4:32:22 AM GMT
(1)· a 40 KHz square wave (to feed an LMF100 filter that's running bandpass at 800 Hz·with a frequency ratio of 50).
(2)· an output that is a count from 0 through 359, cycling 800 times per second (a degree counter).· This can be in common storage for another cog to read, or can be in binary on 9 output pins for another cog to read (to avoid hub delays).· I can if necessary devote 9 I/O pins for that, but I druther not (as we say in the Sunny South).
(3)· six outputs on pins, one ON at a time, cycling as a ring counter 800 times per second (switching from one output to the next 4800 times per second).· These will switch antennas in a six-antenna Adcock direction-finding array.
I can easily build this in TTL, but would rather put it in a single cog if feasible, because it takes less space and there's going to be a Propeller in the system anyway (doing other calculations).
Can a cog count cycles·that fast (1.44 MHz)?· Can it do it in Spin?· Can it do it in assembler?· I could determine it by experiment, of course, but if the answer is a clear no I will have saved the time.
If there's anything dumb in the above, don't hesitate to say so.
And, oh, Merry Christmas.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
Post Edited (Carl Hayes) : 12/25/2008 4:32:22 AM GMT
Comments
Jason
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cardinal Fang! Fetch the comfy chair.
Another cog will be calculating the mean of 100 such 0-to-359 measurements, which is surprisingly complex because of the vector nature of the measurement; another will be taking that number, processing input from a compass, and calculating a true bearing; another will be taking that and combining it with GPS information to calculate a line-of-position for the transmitter; another will be calculating intersections between measured lines of position (this system will be in a moving vehicle); and a PC will be plotting such intersections on a map.
Another cog may be identifying separate transmitters by different characteristics of their transmitted signals (no two transmitters settle on frequency in exactly the same way);·but I don't know how to do that, yet.
Zeesh, that's seven cogs so far.· One more to be the straw boss, I guess.
Joyeuse Noël
Fröhliche Weihnachten
Feliz Navidad
Mele Kalikimaka
Szczęśliwy Boże Narodzenie
Ummm, lessee -- oh, yes, Merry Christmas!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net