Manchester bus

Hi

I am planning to use an Arduino to listen in on a Manchester coded bus.

I am told the bus works at 39kHz.

Is there some supported way to do this with the Arduino. Can it handle Manchester coding natively, are there any libraries for it, etc?

Thanks,

Thomas

An arduino DUE (Sam3x) embeds a Manchester encoder/decoder thru the USART peripheral.

See Page 782, Sam3x datasheet:

35.7.3.2 Manchester Encoder
When the Manchester encoder is in use, characters transmitted through the USART are encoded based on biphase Manchester II format. To enable this mode, set the MAN field in the US_MR register to 1. Depending on polarity configuration, a logic level (zero or one), is transmitted as a coded signal one-to-zero or zero-to-one. Thus, a transition always occurs at the midpoint of each bit time. It consumes more bandwidth than the original NRZ signal (2x) but the receiver has more error control since the expected input must show a change at the center of a bit cell.....

Hi

Thanks!
Does this apply also to Mega ADK?

I see now investigating a bit further. That the Lonworks bus I have, used differential Manchester coding, which is different from the Manchester II format used by the Arduino Due. Also I use the Mega ADK.

That the Lonworks bus I have, used differential Manchester coding, which is different from the Manchester II format used by the Arduino Due

According to what I'm reading, the LONWorks twisted-pair bus is 78kbps differential manchester encoded.
That's pretty quick to bit-bang without any hardware support. What sort of external hardware are you willing to use? It looks like there are some relatively standard manchester decoding circuits that are only a couple of gates. (oooh - just right for one of those new-fangeled chips with a few configurable logic blocks. ww1.microchip.com/downloads/en/AppNotes/01470A.pdf, http://www.cypress.com/blog/psoc-insiders-blog/manchester-code

But decoding the bitstream is probably just the start of your problems. Manchester-based protocols tend to work with either a continuous transmission of "null" bytes (with attendant complications to prevent data being seen as null, or to detect the beginning of an actual message) (like HDLC), or some sort of synchronizing preamble with somewhat different complications (like Ethernet.) An HDLC controller, or an Ethernet controller, is a lot more than just a manchester decoder and a shift register, and I assume that LONWorks is similar. Except more closed (Whee! One of those protocols where you have to buy the specification. Sigh.)