??? 11/08/18 06:39 Read: times |
#190918 - 8051 Manchester Data Stream Decoder Responding to: ???'s previous message |
You should definitely look into using the dual interrupts edge detection scheme. This way you only burn CPU cycles when there is an actual signal change. With the oversampling technique you waste an awful lot of CPU cycles.
I just completed a project within which I had to decode Manchester data using a SiLabs C8051F340 running at 22.1184 MHz. It used the two external interrupts to detect the two signal edges (an external inverter is not even needed because the interrupt active edge is programmable in this MCU). The two interrupt routines called into a common piece of state machine software that comprehended the Manchester waveform bit by bit by measuring the time span from edge to edge. A separate timer was read at each interrupt to measure the previous pulse width and then reset to zero to get ready for interrupt. In my example I was decoding the waveform from an IR Receiver part that was detecting the button codes from a Philips style IR remote control that was generating the RC6 protocol. I did not measure the CPU overhead to support the decoding process but I must say that it was not more than than a few percent of the CPU duty cycle. Nothing like the 40% you seem to be talking about. |
Topic | Author | Date |
Manchester decoder | 01/01/70 00:00 | |
chip choices | 01/01/70 00:00 | |
8051 Manchester Data Stream Decoder | 01/01/70 00:00 |