Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bare bones PIC FSK Bell202 1200 baud decoder?

Status
Not open for further replies.

Mr RB

Well-Known Member
Hi, I'm wondering if anyone has done a bare-bones decoder of Bell-202 FSK;
hi bit = 1200 Hz
lo bit = 2200 Hz
baud = 1200

Using a PIC or other micro to decode the data based on a simple zero-cross of the waveform (using internal comparator) and decoding using period measurment?

The application is an idea for a telecomms Caller ID decoder with absolute minimum parts.

Would it be as simple as decoding one long pulse = hi bit and 2 short pulses = lo bit?

If anyone has experience doing this or has waveforms etc please post. :)
 
Reviving an old thread. Check the links I posted in my third post to that thread.
 
Ooh deja vu. :eek:

See my replies to you in that old thread. :) Again I'm not after an overly complex algortihm, just to use a zero cross (PIC comparator) and period measurement (PIC timer).

I've been reading up a bit and it looks like the caller ID FSK is phase aligned, so it does look as easy as detecting one long pulse = hi bit and 2 shorter pulses = low bit.

I'm still keen to see if anyone has actual waveforms or experience doing it, before I go to all the trouble of connecting isolated storage CRO to the phone line and recording incoming caller IDs. :)
 
It was common place back in the 70's and 80's to do cassette interfaces in software, with 1200 baud and faster easily done, although the standard was CUTS which was only 300 baud.

PIC's are much faster than the processors from those days, som it should be pretty easy?.

Here's the schematic of the board that mine used (which I still have), the cassette interface is the bottom left corner.

**broken link removed**
 
Thanks Nigel for posting that schematic, it's interesting. It appears to be a 2.5v referenced comparator cleaned up by a second comparator and then turned into logic level 0v-5v by an open-collector driver.

Hopefully I can just use the PIC comparator and a couple of input discretes with an RC filter to take out any HF noise.

I love that output driver! Two resistors and a cap. Ahh the good old days before there was a $3 chip for every task. ;)
 
Thanks for the offer Nigel, but I don't think it will be needed. :)

The thing that bothered me was the issue where the 0bits are 2200 Hz not 2400 Hz, so I was worried about the waveform after multiple 0 bits. But the data I have read suggests that the waveform is "phase coherent" or "phase synchronous" so it looks like each 1bit is always one long pulse and each 0bit is always 2 short pulses, and the FSK is always back in phase after every bit. This makes sense as it is also the easiest way to generate the FSK from a micro.

It should be quite do-able with a couple of discretes as a low pass filter, into a PIC comparator to turn the pulses into a square wave, then just use a PIC timer for the decoding.

The only issue of course would be if the waveform polarity is reversed! As you can imagine that would cause issues. This might also explain why many of the cheap Caller iD products won't work if the phone line polarity is reversed.

Maybe I can get the PIC to autodetect the polarity and (in software) set the comparator output inversion to suit, or it might be just as easy to put a polarity reverse switch on the device.
 
I don't see as the polarity makes any difference?, you're not detecting "bit's" you're detecting "tones", so the polarity doesn't matter - a 1200Hz tone is '0' and a 2400Hz tone is '1' (or the other way round).
 
Yeah but a 1bit is ONE pulse of 1200 Hz at 1200 baud. Like this; __/\__ over a 833uS period,
and a 0bit is 2 pulses of 2200 Hz like this; _/\/\_ over the same 833uS period.

So you can imagine if the polarity is reversed the waveform is upside down, so instead fo the 1bit having a nice single pulse in the middle it's got 2 pulses with a pause in the middle (and the 2 pulses are also part of the preceeding and following bits).

If it was the old standard of 300 baud it would be 4 and 8 pulses per each bit, which would be much easier to decode.
 
Status
Not open for further replies.

Latest threads

Back
Top