PDA

View Full Version : FREQOUT delays



Squibcakes
- 28th November 2003, 02:50
Hi,

I've cooking up an idea for some time now but need some ideas on how to make a start on it.

I need a to generate a serial data stream of 10-bit characters as a frequency-shift key audio pattern, and then modulate them throgh a radio transmitter.

Assuming the data is sent out as marks 'n spaces, the frequency shift needs to be between 1300Hz and 2100Hz.

I have successful been able to generate these tones using the FREQOUT command and listen to them using a small speaker.

It appears that the minimum length of each mark and space is only 1ms.

The baud rate of the data stream needs to be 1200Bd which is a mark and space length of around 0.833ms.

Is there a better way of generating these tones so that the baud rate can be fatser?? Maybe using PWM?? I'm using a 20MHz xtal.

Darrel Taylor
- 2nd December 2003, 10:16
Squibcakes,

Sounds like Bell 202 to me. Mark = 1200hz, Space = 2200hz Baud = 1200. Used to be common in radio modems.

If you can handle non PBP code then:
The "Rat_Ring" http://groups.yahoo.com/group/rat_ring/ has a software version for the 16F84A/16F628 or 16F877/18F452. It includes Bell202, V23 and caller ID reception.

Or, for existing hardware solutions try a Google search for "bell 202 radio modem" (no quotes) for a long list of possibilities.
<hr>Now, back to the original question.

The problem with standard PWM is that it's a square wave. You would then need a hardware filter etc. to convert it to a sine wave that would be required to send over the radio. You could easily generate the tones at the proper rates, but shapping the wave form is going to be costly.

You're correct, the minimum Freqout duration is 1ms.
If you're using a PIC on the opposite end to receive the signal, could you just settle for 1000 baud instead of 1200? 1/1000 = 1ms. or is it being received by some existing hardware that can't be changed?

Best regards,
&nbsp;&nbsp;Darrel Taylor

Squibcakes
- 4th December 2003, 23:40
Unfortunately, the receiver is not a PIC, and the transmission standard calls for 1200Bd. I did some more research and your right.. it is the V.23 standard modem.

I'm not keen on a square to sine wave converter.

There is one other path I could take... and that is to have two free running oscillators, one at 1300Hz and the other at 2100Hz and then use the PWM or other output to switch between to the two....

I could use three pics in total... one each for the mark and space.. and the other to switch between the two.. although this seems a bit extravagant.

Darrel Taylor
- 5th December 2003, 03:48
I hate to sound like that little Smurf that runs around all the time going "It'll never work", but I don't think the Free Running Oscillator idea would work either.

Since the baud rate and the Mark frequency are the same, you only get 1 cycle of the 1200hz to represent a mark. So it must start at the zero crossing point and also finish at the zero crossing point. Same thing applies to the space frequency, except that there are approx. 2 cycles per bit.

Switching in and out a free running oscillator will start the cycle at a random position, were ever it happens to be at the time it's switched.

On the receiving end it's not really looking for a frequency that can be filtered like a lower speed FSK would. The sinewave is turned back into a squarewave and during 1 bit period if it receives 1 pulse it's a mark, 2 pulses and its a space. Bad alignment of the cycles will completely confuse the reciever.

Best regards,
&nbsp;&nbsp;The doom and gloom guy,
&nbsp;&nbsp;Darrel Taylor

Squibcakes
- 7th December 2003, 00:49
I see your point.. but the mark space is 1300Hz and 2100Hz... at 1200BD

The ITU standard uses this and it does work.... but replicating with a pic... well that is another matter....

Cheers