Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for Manchester decoder C code

Status
Not open for further replies.

Vandal S

Member level 3
Joined
May 2, 2009
Messages
54
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
1,749
i have installed MikroC and they say that there is an integrated Manchester code in the libraries (or in the help) but it's not that fast.
does anybody have an optimised code example for a rf receiver (for tx it's more simple, right?) paired with a PIC 16F877?
it would be greatly apreciated, especialy by a beginner like me, who can't write his own code, even if the theory is somewhat clear.
 

Re: Manchester c code

Manchester encoder or decoder?

The encoder is really simple to do

just change 1-> 01 and 0 -> 10 so for every 4 bits you produce 8 bits

the decoder is also simple . depending on how you will sample the received data
If you are using a ADC or just logic .you need to detect zero crossings .
 

Re: Manchester c code

the decoding part, the receiver. someone was explaining that there should detect if there are 1 0 1 0 bits received. if not, just ignore. if so, the program should pay attention. (probably this depends, but he said he sent 10 sinc byts and the receiver received 7 - so 3 are lost in this process )
then the problems begin. the program should have paid attention at the leght of a bit, and position near the middle of a bit (which is 2 bits in Manchester coding), where there is allways a transition. if there is a transition, things are good, if not, no.
then there should jump a numer of miliseconds (depending on the baud rate - what size does a bit have in 4800 baud rate? ) and if the is a transition from high to low -> there is a 1 (in this example 1 is coded 10, 0 ->01).
am i right with this process?
the problem is the written code, as i no expert, just a beginner.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top