RF receiver output connected to uC

Electronics Computer Programming Q&A
Post Reply
Help
Posts: 3
Joined: Sun Jan 14, 2007 12:56 am
Contact:

RF receiver output connected to uC

Post by Help »

Hi,

I am new in this forum and it is one of the kindness Administrator from this http://ucontroller.9.forumer.com forum introduce me this forum. He say " Tell them that ku7485 had sent you ". I really need help from you all. Please help me if anyone know how to slove my problem...


I bought one RF Receiver.

My question is is it possible we direct connect the receiver output to uC(at89c52) rather than we use the decoder to decode the receiver signal?

As i know the Manchester Coding and Decoding for use with RF Modules...
Encoding: 8 bit byte becomes 16 bits to transmit... zero's become "01" and ones become "10".
Decoding: 16 bits get deconstructed back to 8 bit byte... "01" gets turned back into a zero and "10" gets turned back into a one.
Example... you are sending byte $00 which is equal to %00000000... this get's turned into %0101010101010101.

Here is the article:
http://www.ottawarobotics.org/articles/rf/rf.html

How can use uC to design it? Please guide me...

I have found out few question on this design..

1) How to model the decoder in C code? Please can you teach me how to write the C code for decoder? How the decoder pattern code work?

2) Is it i have to use the AT89C52 T2EX pin as externel interupt function, and i have to write a "Timer in Capture Mode" on my coding?
How can i capture the signal if i use T2EX? It either "01" gets turned back into a zero and "10" gets turned back into a one (i'm not sure my receiver is "01"=0,"10"=1 or "01"=1,"10"=0) but to generate an Interrupt the external input T2EX only recognize 1-to-0 transition.

Thank you.
Colinr
Posts: 33
Joined: Wed Oct 23, 2002 1:01 am
Location: UK
Contact:

Post by Colinr »

Can you provide some more information as to the type of signal you are decodeing

will the signal be at a constant bit rate ?

will the data to be received start wilh a known start pattern ?


this will help with possable solutions.


Colin
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba »

I have written manchester decoder sw on a microcontroller. Its a bit tricky and requires a fair amount of care but if you take your time and build good debugging hooks into the code you should be fine.

First, determine your actual protocol. manchester defines the data encoding but you need to come up with a lead-in and lead-out sequence so you can decide when to apply the actual manchester decoder. I picked illegal code sequences. lead-in was high for 5 half-clocks followed by 1 low and then 1 high. Lead-out was low for 5. This caused the message to be balanced.

Then I used a timer interrupt that had a period of slightly longer than the half-clock. 4 highs in row says start looking for a 101.

Once I saw that, I started doing manchester decoding.

3 lows in a row terminated the message.

For decoding manchecter code, I basically built a state machine. I used a timer and the input pin generated interrupts on any edge. Each edge reset the timer. If the timer interrupt happened, there are two 0s or 1s in a row. If an edge interrupt happened, then it's a 10 or 01. You have to work through the possible cases do decide the state transitions.

good luck.
Help
Posts: 3
Joined: Sun Jan 14, 2007 12:56 am
Contact:

RF Protocal and Code

Post by Help »

Hi,

Thank for your reply. But i have alot of question and not very clear on your explanation.
First, determine your actual protocol.
How to determine my actual protocol? Please can you tell me the way?
manchester defines the data encoding but you need to come up with a lead-in and lead-out sequence so you can decide when to apply the actual manchester decoder. I picked illegal code sequences.
I done the machester and the data encoding code already. But wat you mean lead-in and lead-out sequence? Please can you show me your parts of the code? So, i can study how it work. If i understand on that may be i will understand what's your following explanation.

Please guide me step by step?

Thank for you kindness.
Post Reply

Who is online

Users browsing this forum: No registered users and 63 guests