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

Back to Subject List

Emmanuel Coulon
10/22/18 13:35
Read: 50 times
France


 
#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
TopicAuthorDate
Manchester decoder      Emmanuel Coulon      10/22/18 13:35      
   chip choices      Erik Malund      10/23/18 06:06      
   8051 Manchester Data Stream Decoder      Michael Karas      11/07/18 23:39      

Back to Subject List