??? 02/11/07 08:12 Read: times |
#132510 - Practical 38kHz Demodulation? |
Hi there all on the forum.
I have an application where I would like to demodulate an IR signal (my own home brew RC5 - AKA Manchester Coded ASK). While it is easy enough to modulate the data with a simple timer set at 2x the Carrier Frequency. it is more difficult in demodulating it. In your opinion is this do-able? For the readers reference 38kHz = 26uSecs for a 50% duty cycle this gives a 13uSec Logic one then a 13uSec Logic zero. I have the data coming in on a non interrupt pin on a LPC925, I was going to simply sit in a loop and wait for a state change on the incoming pin, to begin with not the flashest but that is all I have to work with at the moment. My Code would work like the following: When I have detected the change after sitting in my loop, I could start a timer (say 2uSec, is this too fast) and have a counter tick over wherby the state must not change until I have a counter greater than 5 (10uSecs) before I register it is a logic one this gives a wee bit of a window incase I start the count late. Then I wait until I get 2 consequtive lows counts and begin a timer to allow for the logic zero, again looking for a transition at around 10uSec. When I have the required number of transitions, in my case 50 (380bps seems like a good place to start), then I register this as the first complete 1/2 bit of my manchester code. I then wait 50x 13uSecs for silence, to complete the bit. The point is all this seems a bit of a headache, has anyone done it before? is it worth it? are there any better approaches (not using the 3pin demod jobbers please) I already have the hardware. Ay comments are appreciated. Hope that all made sense. Regards Marshall |
Topic | Author | Date |
Practical 38kHz Demodulation? | 01/01/70 00:00 | |
Demod | 01/01/70 00:00 | |
Demod hardware | 01/01/70 00:00 | |
Demod | 01/01/70 00:00 | |
CPU Resources | 01/01/70 00:00 | |
ISP - No it's not going | 01/01/70 00:00 | |
Why not using a reciever modul?? | 01/01/70 00:00 | |
Just buy the receivers with built in demod | 01/01/70 00:00 | |
cpld manchester decoder | 01/01/70 00:00 | |
Thanks Jez - That's brilliant | 01/01/70 00:00 | |
yeah you can start with altera boards![]() | 01/01/70 00:00 |