Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 01, 2024, 01:03:34 01:03


Login with username, password and session length


Pages: [1]
Print
Author Topic: Differential Manchester decode routines  (Read 9401 times)
0 Members and 1 Guest are viewing this topic.
pki
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 2
-Receive: 3



« on: February 15, 2012, 09:23:19 21:23 »

Hi there!

Anyone have used or seen a routine, lib, source (preferred in C) to decode a Differential Manchester encoded stream?

It looks like this


All routines i found are for simple Manchester, i need this one because of sending modules are using this.

May thanks.

Logged

have a nice weekend
Bluemitts
Inactive

Offline Offline

Posts: 3

Thank You
-Given: 1
-Receive: 0


« Reply #1 on: February 15, 2012, 11:59:07 23:59 »

It is mentioned here, if it is of any help it, there is also some 'C' examples at the end

http://eetimes.com/design/embedded/4007497/Back-to-the-future-Manchester-encoding--Part-1
http://www.eetimes.com/design/embedded/4007510/Back-to-the-future-Manchester-Encoding--Part-2?pageNumber=1
Logged
yahoo
Active Member
***
Offline Offline

Posts: 161

Thank You
-Given: 56
-Receive: 110


« Reply #2 on: February 16, 2012, 02:26:59 02:26 »

The decoding for me looks extremely simple: read a bit from the stream, compare it with the next one and if they are different the result is 1 otherwise 0.
Logged
solutions
Hero Member
*****
Offline Offline

Posts: 1826

Thank You
-Given: 656
-Receive: 904



« Reply #3 on: February 16, 2012, 03:57:04 03:57 »

Manchester is a clockless code, which is why it is used, though you obviously need to determine if there are two transitions or one in a "period".

The picture you show is standard Manchester. I think you are confusing yourself with a differential line signal, which, to software, means absolutely nothing, since your port will only have a single channel, the "BMC" in your diagram, after a line receiver (hardware) converts the electrical signal from differential to single-ended to bring into your processor chip.

At that point, your only task is to determine the shortest pulse width, and from there, you can decipher a change (1) or no change (0) in that period (set up some microcontroller timers to do this for you, or if it's all you are doing and the rate is slow enough, you can do it all in code) and each of your actual decoded bits it 2x your narrowest pulse width.

You have me curious - is that avatar pic before or after the sex change?
 Grin
Logged
pki
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 2
-Receive: 3



« Reply #4 on: February 17, 2012, 07:56:17 19:56 »

So, sorry for the delay in my answer.

Many thanks for the links and the tips how to begin. I would report here my results Smiley

solutions, i am not using any "line" so the "differential" does not come from the line.

I read this is differential (detect if there are one or two transitions):


and this is the usual manchester: (detect rising or falling edge)


PS, it's before the change, and yours?  Grin
« Last Edit: February 17, 2012, 08:01:13 20:01 by pki » Logged

have a nice weekend
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC