CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Decoding of Manchester Encoded Data

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
chingB



Joined: 29 Dec 2003
Posts: 81

View user's profile Send private message

Decoding of Manchester Encoded Data
PostPosted: Thu Aug 05, 2004 2:42 am     Reply with quote

Hi,

I was able to get a device that will output a manchester encoded data. I was able to check this using an oscilloscope and I notice their is a sync bits between each frame...

In one frame I also notice that it is of compose of 45bits of logic 1 and logic 0.

My question are: what would be a good approach in decoding? what interrupt should I use? Is it ok to use external interrupt with timer or CCPx with timer?

I guess many in these community have wild ideas in implementing manchester on a PIC18F452.

I need your suggestions and/or a sample code snippet for decoding manchester data.

BTW, I already search this forum and none of any help to me...

Thank you.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Aug 05, 2004 6:26 am     Reply with quote

Did you search on manchester? I found some at doing a quick glance seem like they give what you need. Let me copy the links to make it a bit easier for you. Be sure to check the links inside these links as they give you valuable information!

http://www.ccsinfo.com/forum/viewtopic.php?t=674&highlight=manchester

http://www.ccsinfo.com/forum/viewtopic.php?t=612&highlight=manchester

http://www.ccsinfo.com/forum/viewtopic.php?t=8736&highlight=manchester
dbotkin



Joined: 08 Sep 2003
Posts: 197
Location: Omaha NE USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Aug 05, 2004 8:19 am     Reply with quote

Decoding Manchester data doesn't appear to be terribly difficult until you try to include error handling for noisy links, etc. There is a Microchip app note dealing with the Keeloq, which communicated with Manchester encoded data. I used that ap note for the state diagrams, and translated the ASM source to C (that was a first for me!!) and got a Manchester-encoded RF link working both ways - send and receive.

The good news is, it works GREAT. The bad news is, it took me a couple of weeks to get it to that point, and I can't share the source. But it can be done, and Microchip TB045 is a very good resource.
chingB



Joined: 29 Dec 2003
Posts: 81

View user's profile Send private message

PostPosted: Thu Aug 05, 2004 5:13 pm     Reply with quote

dbotkin wrote:
Decoding Manchester data doesn't appear to be terribly difficult until you try to include error handling for noisy links, etc. There is a Microchip app note dealing with the Keeloq, which communicated with Manchester encoded data. I used that ap note for the state diagrams, and translated the ASM source to C (that was a first for me!!) and got a Manchester-encoded RF link working both ways - send and receive.

The good news is, it works GREAT. The bad news is, it took me a couple of weeks to get it to that point, and I can't share the source. But it can be done, and Microchip TB045 is a very good resource.


Would it be possible if u can give the exact filename of the document u get from microchip.com... such that I can search for it.

I'll try ur suggestions...

Thank u Mark and dbotkin..
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Aug 05, 2004 5:35 pm     Reply with quote

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011924
Guest
Guest







Manchester decoding
PostPosted: Fri Aug 06, 2004 6:56 am     Reply with quote

Quote:
I was able to get a device that will output a manchester encoded data. I was able to check this using an oscilloscope and I notice their is a sync bits between each frame...

In one frame I also notice that it is of compose of 45bits of logic 1 and logic 0.


chingB:
It sounds like you are using some type of encoder chip? Is there a decoder available for this encoder? If you haven't invested too much already and don't need really high data rate, there are some encoders and decoders made by Holtek. I think they handle erors by transmitting the same data multiple (3?) times and getting 2 out of 3 receptions to be the same, or something like that. Never used them but if I remember what I read correctly the data to be transmitted is input in parallel to the encoder, so it eats lots of pins unless you add a shift register.

Please let us know when you have finished converting the ASM to C from that Microchip app. note! Good luck!

BillT
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Fri Aug 06, 2004 8:25 am     Reply with quote

YES,.. I am interested also. I you translate the code and can share it. post the code in the code library.
[url]
http://www.ccsinfo.com/forum/viewforum.php?f=2
[/url]
Shep
Guest







PostPosted: Thu Sep 30, 2004 4:23 pm     Reply with quote

Just spotted this.

I'm also in the process of constructing a Mancunian translator (all right our kid)

Haven't looked through all this yet, but my orginal thoughts were:

1:
Poll at regular intervals at least 8 times greater f then data stream
0x55 preamble to get exact timing
0x1D traning sequnce (3 0's & 3 1's appear in a row so no misfires)
adjust timing with edge detector (sweep an xored 0x0F over incomming stream)
etc.

or 2 what i'm thinking would be simpler and less computationally expensive:
Use interrupt on change
Time using preamble
16bit timer would give massive resolution and dynamic range: incomming stream could be decoded over a wide f
Any glitches or spikes could be filtered out

Thoughts?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group