Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
10/22/18 19:35
Read: times

#190916 - Manchester decoder
Having to decode sensor data from a Manchester encoded line at 2.048ms bit period, I had searched the old forum and found several messages. I did not try the suggested dual edge detection with external interrupt input and a second port pin to toggle an XOR gate, but I followed another link. I found the Xilinx application note "Manchester Decoder in 3 CLBs" on the web archive, translated it into code, programmed a timer for a 256us (8x clock of incoming data) interrupt routine that takes no more than 40% of total cycles on AT89C4051 at 11.0592MHz, then wrote the rest of the frame decoding and I/O outside. If I need more processing time than the remaining 60%, I can clock it at twice this frequency (to keep standard UART baud rates), or take a LP4052 with a broader choice of crystal frequency.

Could I achieve quite more efficient code with the dual edge detection method, using two external interrupt inputs, with the second one for the rising edge (using an external inverter to negative-only edge detect on many MCUs, or builtin positive edge detect with INT2 of a DS89C430), and spend less cycles in timer processing instead of this Johnson counter software implementation with a 37 instructions timed interrupt routine ?

As I have a P89V51RD2 too, is its compare and capture unit well suited for such tasks ?

List of 3 messages in thread
Manchester decoder            01/01/70 00:00      
   chip choices            01/01/70 00:00      
   8051 Manchester Data Stream Decoder            01/01/70 00:00      

Back to Subject List