View previous topic :: View next topic |
Author |
Message |
uni_student
Joined: 01 Aug 2007 Posts: 38 Location: AUckland, NEW ZEALAND
|
How to decode ASK receiver? |
Posted: Mon Feb 16, 2009 5:15 pm |
|
|
Hi, i have a wireless ASK module receiving characters which i need to decode using an analogue pin of a pic16f716. Is it as easy as reading the analogue pin every 3ms (seems to be the average time between bits) to determine either a high or low and determining the character from there or is there a more accurate way of doing this? Has anyone decoded ASK before? Any help appreciated. Cheers |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
Re: How to decode ASK receiver? |
Posted: Mon Feb 16, 2009 5:34 pm |
|
|
uni_student wrote: | Hi, i have a wireless ASK module receiving charactors which i need to decode using an analogue pin of a pic16f716. Is it as easy as reading the analogue pin every 3ms (seems to be the average time between bits) to determine either a high or low and determining the charactor from there or is there a more accurate way of doing this? Has any1 decoded ASK before? Any help appreciated. Cheers |
No, that will will lead to problems. You need to synchronize to the ASK bit cells. This is usually done by using a hardware comparator and Phase Locked Loop rather than reading analog values and trying to process them. But the bit rate is slow enough that you could read the analog values about 8 times per bit cell (every 375 usec) and running a software phase-locked loop, but that gets pretty complicated.
Normally ASK is encoded with some sort of bit-stuffing to guarantee that you won't have any long runs of the same bit. That would make it harder to lock on to. So if you want to decode ASK, you need to research what kind of encoding is being used by your particular flavor of ASK. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
Guest
|
|
Posted: Mon Feb 16, 2009 11:57 pm |
|
|
You can look at this page for an example of a ASK demodulator done in hardware. WWVB is low rate, but the basic concept can and has been used at much higher rates (like ACARS). All you need to do is find the edges with a data slicer - and sample in between. Simple with high signal to noise ratios, more work with noisy signals, but that's half the fun!
;-)
http://geocities.com/hagtronics/wwvb.html
HTH - Steve H |
|
|
uni_student
Joined: 01 Aug 2007 Posts: 38 Location: AUckland, NEW ZEALAND
|
|
Posted: Tue Feb 17, 2009 3:01 am |
|
|
Thanx for the replies. Now I've read enough to start with my coding. |
|
|
|