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
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.
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.
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.
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
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.