[aprssig] Packet Radio Tone Generation

scott at opentrac.org scott at opentrac.org
Sat Dec 18 20:26:29 EST 2004

I don't think zero crossings would be very accurate for this.  Most AFSK
receivers are some sort of phase locked loop, I believe.  There's a lot more
involved in receiving than sending, if you're going to do it all in
software.  In fact, if anyone knows of a good AFSK decoding DSP algorithm
for the ARM7TDMI, let me know.

But back to the sending algorithm:  Start with an array of values
representing a full sine wave.  Mine has 64 samples.  Send one sample to the
DAC every 1/76800 sec and it'll put out a 1200 hz tone.  Every 1/140800 sec
and it's 2200 hz.  I find it's easier to change the step size than the time
period, though.  A separate counter keeps track of the 1200 bps data clock -
there's no connection at all to the phase of the sine wave.

My fsk code also deals with NRZI encoding, bit stuffing, and FCS calculation
while it's sending.  You could always do that beforehand if you've got
enough RAM, but I don't.


-----Original Message-----
From: Andrew Rich [mailto:vk4tec at tech-software.net]
Sent: Saturday, December 18, 2004 2:31 PM
To: scott at opentrac.org; 'TAPR APRS Mailing List'
Subject: RE: [aprssig] Packet Radio Tone Generation

So what you are saying is

Increment to next part of the sine wave after having checked wether you are
supposed to be doing a 1200 or 2200 hz tone ?

What happens at the rcver ?

Does it not check the distance between zero corssings to determine if the
tone is 1200 or 2200 ?


-----Original Message-----
From: Scott Miller [mailto:scott at 3xf.com]On Behalf Of scott at opentrac.org
Sent: Sunday, 19 December 2004 3:31 AM
To: 'TAPR APRS Mailing List'; vk4tec at tech-software.net
Subject: RE: [aprssig] Packet Radio Tone Generation

Right - what I did in my code was use one variable as a phase accumulator
that keeps track of what point the sine wave is at.  Each output cycle, that
serves as a pointer to a sine lookup table and that value is sent - in this
case to PWM, but it could be a DAC.  The value by which the phase
accumulator is incremented determines its frequency.  Every 1/1200 sec it
grabs the next bit and decides which increment to use.

Because of the lack of documentation out there, I wrote up my own page on
the subject:


There are a number of details in there that get missed in much of the
documentation.  Also, if you don't mind reading HC08 assembly language,
check out the code in the fsk.c module of the OpenTracker source.  The PWM
output complicates things a little compared to MIM or SoTT, though.


-----Original Message-----
From: aprssig-bounces at lists.tapr.org
[mailto:aprssig-bounces at lists.tapr.org]On Behalf Of James Washer
Sent: Saturday, December 18, 2004 5:20 AM
To: vk4tec at tech-software.net; TAPR APRS Mailing List
Subject: Re: [aprssig] Packet Radio Tone Generation

I cannot claim to have written the code yet... but I've been thinking about
it so here are my thoughts

2200 will NOT fit nicely at a zero crossing.

The two tones must remain "in phase"... i.e you cannot "jump" to the zero
crossing point when you change tones.

Therefore, the best thing to do (IHMO) is to run two clocks, one, generating
the correct ramp for the current tone, and another telling you when to
change the first timer, and hence, the tone.

 - jim

On Sat, 18 Dec 2004 21:12:04 +1000
"Andrew Rich" <vk4tec at tech-software.net> wrote:

> Howdy,
> Working the numbers for 1200 Baud packet generation using a PIC.
> Does this look right ?
> 1200 Baud = 1200 possible symbol changes per second
> 1 Symbol change possible every 833 uS
> Tones used are 1200 Hz and 2200 Hz
> How then does 1200 and 2200 fit into the scheme ?
> Does one cycle of 1200 Hz equate to enought for one symbol ?
> 2200 does not seem to fit cleanily assuing zero crossing
> Cheers Andy VK4TEC
> _______________________________________________
> aprssig mailing list
> aprssig at lists.tapr.org
> https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig

aprssig mailing list
aprssig at lists.tapr.org

More information about the aprssig mailing list