PDA

View Full Version : How to decode machester code using uc i.e the RC-5 code



amitbhatta
05-14-2012, 09:59 PM
Hii can any one tell me how to decode the Manchester code using micro controller.
Because as we know that all the IR remote controls use Manchester coding so please tell me how to decode it.
actually i want to decode the received signal and display the code in lcd.

pratik_1
05-15-2012, 03:34 PM
As far as I remember, Manchester coding is just a representation of 1 as a high followed by a low and 0 as a low followed by a high. To be able to decode this, you can write a simple function which looks at the incoming Digital IO line data and gives out a 1 or a 0 based on the transition. You might need to know the starting point or the clock freq. I am sure ppl have done this in the past on arduino or pic microcontrollers

allbits
05-15-2012, 07:41 PM
check this (http://www.ustr.net/infrared/infrared1.shtml) out.
hope that helps.

amitbhatta
05-18-2012, 11:29 AM
As far as I remember, Manchester coding is just a representation of 1 as a high followed by a low and 0 as a low followed by a high. To be able to decode this, you can write a simple function which looks at the incoming Digital IO line data and gives out a 1 or a 0 based on the transition. You might need to know the starting point or the clock freq. I am sure ppl have done this in the past on arduino or pic microcontrollers

Thanks for ur rply.
But the main problm is that different ir transmitter have different frequency of transmission.
So when ever the transmission is done 1st a sync pulse is send which is 1/3 of the total length of a bit.
so to specifically calculate the delay this duration should be calculated by the micro-controller itself.
now counting this duration is the major problm.

allbits
05-22-2012, 05:20 PM
Thanks for ur rply. But the main problm is that different ir transmitter have different frequency of transmission. So when ever the transmission is done 1st a sync pulse is send which is 1/3 of the total length of a bit. so to specifically calculate the delay this duration should be calculated by the micro-controller itself. now counting this duration is the major problm. which controller are you using? Normally, this problem canbe solved easily by connecting to the Timer IN clock pin of the respective timers. like, in PIC, you can connect it to the T0CKI pin or the T1CKI pin. then use the timer as a counter and use another timer to compute the time delay between the respective pulses.