EmbeddedRelated.com
Forums

FM0 (bi-phase space) decoding!

Started by Ali April 18, 2006
Hey everyOne!

                      I'm having problems to decode the FM0  [
http://www.grantronics.com.au/serialformats.html ] data , the data rate
is 40 kbps and my atmega16 is using 16 Mhz clock.


MCU = atmega16
CPUclk = 16 Mhz
Prescaler Value = 8
Datarate = 40 kbps
Bit rate = 25 micro second

I have tried to use external interrupt pin for one edge and as well as
for both edges (Inverting the interrupt sense) but no luck so far. The
error rate is more than 50% ;-).

Any good pointers? 

Regards,
ali

What is the best way to do this.

1) Catch either edge (falling , rising).
2) Catch every edge.

Your answer?

Tahnks

Ali wrote:
> > What is the best way to do this. > > 1) Catch either edge (falling , rising). > 2) Catch every edge. > > Your answer?
What is the best way to do what? Your question? See below. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/> Also see <http://www.safalra.com/special/googlegroupsreply/>
Ali wrote:
> Hey everyOne! > > I'm having problems to decode the FM0 [ > http://www.grantronics.com.au/serialformats.html ] data , the data rate > is 40 kbps and my atmega16 is using 16 Mhz clock. > > > MCU = atmega16 > CPUclk = 16 Mhz > Prescaler Value = 8 > Datarate = 40 kbps > Bit rate = 25 micro second > > I have tried to use external interrupt pin for one edge and as well as > for both edges (Inverting the interrupt sense) but no luck so far. The > error rate is more than 50% ;-). > > Any good pointers?
This is pretty much the old floppy single-density data decoding problem. If we convert the incoming data stream into a stream of transition pulses, there are two interleaved pulse trains: clocks at each bit cell boundary and data at the center of each bit cell. You have to identify the streams in some way. The circuit used with disk recording was called data separator, although its main task is to identify the clock edges. The customary way in FM disk recording was a special clock/data pattern called an address mark, which was detected by the decoder. This was also used to detect the byte boundaries. A simple way of detecting the clock was a timer of 3/4 bit cell and which was started by the incoming edge. It will sync to the clock edges after the first missing data pulse, but it assumes that the data stream is error-free. For more robust clock detection, phase-locked loops (PLL) are used. HTH -- Tauno Voipio tauno voipio (at) iki fi
CBFalconer wrote:
>What is the best way to do what? Your question? See below.
Please read the OP before posting. In fact that was the follow-up and every one could understand;-) Addition to Tauno Voipio post: Yeah you are right and I'm also using PLL in my design but the problem is with RF part , yeah my audio data stream is in form of radio frequency . A hell noise and all the time signal is distorted.
"Ali" <abdulrazaq@gmail.com> wrote in message
news:1145413723.102683.200110@g10g2000cwb.googlegroups.com...
> CBFalconer wrote: > >What is the best way to do what? Your question? See below. > Please read the OP before posting. In fact that was the follow-up and > every one could understand;-) > > Addition to Tauno Voipio post: > > Yeah you are right and I'm also using PLL in my design but the > problem is with RF part , yeah my audio data stream is in form of radio > frequency . A hell noise and all the time signal is distorted.
What original post? The threat started with "Re: FM0 (bi-phase space) decoding!". Peter
Peter wrote:
>What original post? The threat started with "Re: FM0 (bi-phase space)
decoding!". Peter Hmm , tahts why i'm saying to look at OP rather thread with 'Re';-)
"Ali" <abdulrazaq@gmail.com> wrote in message
news:1145437241.247185.64990@e56g2000cwe.googlegroups.com...
> Peter wrote: > >What original post? The threat started with "Re: FM0 (bi-phase space) > decoding!". > > Peter > > > Hmm , tahts why i'm saying to look at OP rather thread with 'Re';-)
You can't say look at such-and-such a message because you can't guarantee that everyone recieves all the messages - and in my case I didn't. As a result your message reads like one side of a telephone conversation - perhaps I can figure out what some of it means but it's real hard work. Peter
Well i use google's interface for UseNet and its simple to view whole
thread at a glance. Not sure how other interfaces present useNet
threads anyhow I think we should be concentrating on problem nOw ;-)

Any good pointers for bi-phase decoding design?
Regards,
ali

Ali wrote:
> Well i use google's interface for UseNet and its simple to view whole > thread at a glance. Not sure how other interfaces present useNet > threads anyhow I think we should be concentrating on problem nOw ;-) >
As you have already been told, Google's interface is badly broken. It is not a proper newsreader, nor a suitable interface for posting - it's merely an interface for searching the archives. If possible, you should use a proper newsreader and a proper Usenet feed - failing that, you should use Google's interface properly. "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/> Also see <http://www.safalra.com/special/googlegroupsreply/>
> Any good pointers for bi-phase decoding design?
If you want to capture both edges, it might be easier to route the signal to two interrupt pins and configure one for rising edges, and the other for falling edges. Timer captures can also be useful here.
> Regards, > ali >