Manchester encoding

May 14, 2006 33 Replies

Could anyone please give me some idea on implement manchester encoding in BASCOM or programming structure.



I found quite a lot resource about the theory, but I feel a bit hard to convert the theory in programming.



P.S. 10bits data are required to encode and transmit.



Thank you guys.


In article , sommes writes

I have it in C if that helps?

-- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

yup...Thank you very much.

I can learn from the structure and write it to BASIC.

Chris Hills scrobe on the papyrus:

What's wrong with programming in solder? One quarter of a 74HC86 will do the job.

John B

Thanks you John,

Is it Ex-or the 10 bits with square wave with same baud rate?

What about the decoding side?

Thank you very much.

Thank you Chris,

my e.mail is snipped-for-privacy@gmail.com

Or get a CPU with the Manchester coding inside. Both the AT90PWM and the AT91SAM7 has Manchester coding and decoding on the serial ports.

Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This message is intended to be my own personal view and it may or may not be shared by my employer Atmel Nordic AB

Decode is relatively easy. I'm assuming that manchester code means Bi Phase Mark encoding I did some video timecode stuff in TTL many years ago, manily using D type flipflops and 74ls86 xors.

You need to just detect level changes, not just High to Low, which is easy with many interrupt systems. This can be done with an xor gate.

Logic level signal into i/p1

10K resistor between i/p1 and i/p2 100pF capacitor between i/p2 and ground This will give a fast spike on transitions Set up a counter that counts between the spikes There will be two sets of values, plus or minus a few counts If the count is short, its a 1, if the count is long its a 0

martin

Hi Chris,

Siting on this side watching the conversation. I would like a copy of the C version too :-)

Can you post it on this forum?

In article , Hopkins writes

Hi

Not sure. I don't think you can post binaries to a Usenet NG.

Also I can't find the file! I will put it on my web site and you can pick it up from there.... when I find it!!!

Chris

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Gees,

Internet search bring up heaps of info

formatting link

formatting link

formatting link

I have an app note "Mnchester Phase Encoding" written in 1978 for mini-cassette digital tape recorder. I works at a really basic leve describing exactly how the output pin should change and when, as well a reception along with even brief descritpion on how to encode in hardware

The company was called Braemar and although its name shows up on Google, don't seem to be able to find a web site, so I will send you a copy.

-Aubrey

Wow, I have that same app note! It has escaped discard for years

Blakely

antedeluvian scrobe on the papyrus:

Hi Aubrey,

Why don't you post it to 'alt.binaries.schematics.electronic'?

John B

John,

I am afraid I will have to show my ignorance and admit I don't know how Either let me have an e-mail and you can post it, or point me at som directions.

-Aubrey

antedeluvian scrobe on the papyrus:

Hi Aubrey,

First, you need to subscribe to the the a.b.s.e newsgroup. Then just post a message with the code attached to the message (preferably in a zip file to save bandwidth. Anyone can then subscribe to that newsgroup and pick up the message.

HTH.

John B

Or, better yet, put it up on the web and add a pointer here and at a.b.s.e.

Rich Webb Norfolk, VA

Here's some PIC C code I wrote, it's a C function that codes the 8 bit "datbyte" value into two manchester coded bytes. Can post decode code if you need it.

Steve

/**************************************************************************/ void ManCode(unsigned char datbyte, unsigned char *lowbyte, unsigned char *highbyte) { unsigned char ctr; *lowbyte=0; *highbyte=0; /* Manchester encode low 4 bits of datbyte into lowbyte */ for (ctr=0; ctr

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required