The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 08:45:40 20:45


Login with username, password and session length


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

Posts: 12

Thank You
-Given: 2
-Receive: 2



« on: February 15, 2012, 10:23:19 22: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
Newbie
*
Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 0


« Reply #1 on: February 16, 2012, 12:59:07 00: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: 106

Thank You
-Given: 40
-Receive: 50


« Reply #2 on: February 16, 2012, 03:26:59 03: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: 1446

Thank You
-Given: 590
-Receive: 851



« Reply #3 on: February 16, 2012, 04:57:04 04: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
V.I.P
Newbie
*****
Offline Offline

Posts: 12

Thank You
-Given: 2
-Receive: 2



« Reply #4 on: February 17, 2012, 08:56:17 20: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, 09:01:13 21: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