Reply by kjz June 11, 20072007-06-11
*Sheepish Grin*  I guess I was slightly unreasonable asking for help
without fully specifying the limitations of what I had to work with.  

The RAM is very limited in the way it can be accessed.  (basically
increment and decrement. With a few address that can be inconveniently
stored and retrieved.) And the ALU is limited to specific functions as
well (Conveniently for me, that doesn't include an XOR.)  The hardware
wasn't intended to do more than just simple FIR filtering of signals
without some tricky interleaving; I was just trying to figure out a way to
shove a square design into some round hardware.   

I heard somewhere that "Engineering is the art of making what you want
from things you can get." So I gave it a shot =).  It seems I'm not a real
engineer yet.  :(


> So? Is it a problem to implement a basic frequency counter to
demodulate
> the FSK?
I'll go find out what a basic frequency counter is and decide from there. :) I spoke with a guy at work who knows infinitely more about DSP than I do and he suggested looking at a "slicing algorithm to demodulate" the signal instead of the filtering approach. So for now, I guess I'll abandon my friend, Herr Goertzel, and do some more reading. Thanks for all the input though, at least now I have a few more alleys to stumble down before I give up and nix the idea of doing it in digital. -JT
Reply by Jerry Avins June 9, 20072007-06-09
kjz wrote:
> I was going to delay it and XOR it (FSK I think is the name..) But I have > no hardware to time delay and no XOR... I basically have a MAC and an ALU. > with some Ram.
Ram: there's your delay. I'll bet you have some registers available, too. ALU: there's your XOR. Learn about computers. It will make it easier to do DSP. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Vladimir Vassilevsky June 8, 20072007-06-08

Tim Wescott wrote:

> kjz wrote: > >> I was going to delay it and XOR it (FSK I think is the name..) > > There may be better delays to choose than 1/2 a cycle of 1200Hz, but I'd > have to think to come up with what it may be...
Good point. It looks like T = 3/[2(F0 + F1)] is optimal however it is not a very convenient value and there will be not much of a difference. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by John Herman June 8, 20072007-06-08
If you have a high signal to noise ratio, you might count the number of zero 
crossings in a bit period.  Assuming you can sync with the bit clock.

In article <MOadndSghKUaJvTbnZ2dnUVZ_v2knZ2d@giganews.com>, "kjz" 
<KJZ@cypress.com> wrote:
>I want to implement a hart modem and based on my available hardware, think >the g&ouml;rtzel algorithm would work. Lay the smack down If I'm wrong. > >I have one of two expected frequencies as an input. If the input has a >1200Hz frequency, it is a Space, if it's 2200 it is a mark. A UART with a >1200 bit/sec rate will process the final output. > >The g&ouml;rtzel algorithm has to be run on the signal with the coefficient >for each frequency (I.E. run G&ouml;rtzel on 1200, then get value, then run on >2200. Repeat.) > >Retarded Questions: >Assume UART runs at 1000bit/sec. My N would have to be smaller than >Fs/1000? > >Would an N of 60 be feasable? What is a "usual" value of N. (I'm sure it >depends on the app, but obviously an N of 2 will not be useful. Where does >it start being effective to use the output?) > > >Is there simpler way to process these signals? Two band pass IIRs is >something else I thought about doing, but I like the name of the goertzel. > :) > >-JT > >
Reply by Vladimir Vassilevsky June 8, 20072007-06-08

kjz wrote:

> I was going to delay it and XOR it (FSK I think is the name..) But I have > no hardware to time delay and no XOR... I basically have a MAC and an ALU. > with some Ram.
So? Is it a problem to implement a basic frequency counter to demodulate the FSK? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by Tim Wescott June 8, 20072007-06-08
kjz wrote:
> I was going to delay it and XOR it (FSK I think is the name..) But I have > no hardware to time delay and no XOR... I basically have a MAC and an ALU. > with some Ram. >
Well, that's an odd combination. With the RAM you can delay the signal, and if it's really easier to use the MAC than an XOR, then you can do a signed multiplication. There may be better delays to choose than 1/2 a cycle of 1200Hz, but I'd have to think to come up with what it may be... -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by kjz June 8, 20072007-06-08
I was going to delay it and XOR it (FSK I think is the name..) But I have
no hardware to time delay and no XOR... I basically have a MAC and an ALU.
with some Ram.

Reply by kjz June 8, 20072007-06-08
I was going to delay it and XOR it (FSK I think is the name..) But I have
no hardware to time delay and no XOR... I basically have a MAC and an ALU.
with some Ram.

Reply by Vladimir Vassilevsky June 8, 20072007-06-08

kjz wrote:
> I want to implement a hart modem and based on my available hardware, th=
ink
> the g=D3=C6rtzel algorithm would work. Lay the smack down If I'm wrong=
=2E There are 1001 methods to do that. From those methods the goertzel=20 algorithm is probably the least convenient.
> I have one of two expected frequencies as an input. If the input has a=
> 1200Hz frequency, it is a Space, if it's 2200 it is a mark. A UART wit=
h a
> 1200 bit/sec rate will process the final output.
If you are looking for the simplest solution, multiply the input with=20 the delayed version of the input. The delay should be equal to the half=20 period of 1200Hz. The sign of the result is the demodulated data. Hint: there is no need for multiplications. A signal can be sampled to=20 one bit and the bitwise XOR will do.
> The g=D3=C6rtzel algorithm has to be run on the signal with the coeffic=
ient
> for each frequency (I.E. run G=D3=C6rtzel on 1200, then get value, then=
run on
> 2200. Repeat.)=20 >=20 > Retarded Questions: > Assume UART runs at 1000bit/sec. My N would have to be smaller than > Fs/1000?
What is N ?
> Would an N of 60 be feasable? What is a "usual" value of N. (I'm sure=
it
> depends on the app, but obviously an N of 2 will not be useful. Where =
does
> it start being effective to use the output?) >=20 >=20 > Is there simpler way to process these signals? Two band pass IIRs is > something else I thought about doing, but I like the name of the goertz=
el. There is nothing specially good about goertzel algorithm. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by kjz June 8, 20072007-06-08
Um. Lay the smack down if my statements about the algorithm are wrong.  Not
if it doesn't fit the hardware that I didn't describe....