??? 06/09/09 23:37 Read: times |
#165963 - back in the days of tape cassettes ... Responding to: ???'s previous message |
Marshall Brown said:
Hi all, I have an application where I would like to get the HART protocol off an incoming 4-20mA signal.
A quick overview HART is an FSK signal superimposed on analog line 1200Hz = "1" 2200Hz ="0". My hardware is existing so, addition of other Modem devices is not possible. The input is currently connected to an ADC on a LPC925, where I am measuring the 4-20mA on a slow update. My thoughts were Speed up the sampling on the ADC to around 8.8kHz (4x Oversample highest HART frequency of 2200Hz), Then OPEN TO SUGGESTIONS HERE>>>> Are you sure you need an ADC? back in the old days, we did this with simple analog (RC) filtering and an input port. One simply waits for a transition and times the high frequency half-cycle +10% and then concludes, if there wasn't a transition, that it's the lower frequency, but waits for and times the next transition anyway, then restarts the timer. The whole thing fits in a single software loop, but it's more efficient if you have a timer available. Keep in mind, too, that you could differentiate the incoming waveform with LSTTL, with a series cap and a pulldown resistor. I used to use about ~220 pf and a <1K pulldown. That generates a positive pulse of somewhat under 100 ns on a rising waveform and, a negative one for a falling waveform if a pullup is provided. Take your pick, you only need one of them, i.e. only rising OR falling. My thoughts are.
Create 2 lookup tables with 4points being the 1200Hz and the 2200Hz voltages with respect to time, then continually compare each sample with both lookup tables, if after 4 samples, I have matches on all points, I have successfully found FreqA or FreqB, if there are no matches then there is noise or no FSK information. Is this feasible, and logical or is there a better way to do it? Remembering I have only the ADC line and the raw FSK data to play with. Regards Marshall We drove our cassette drives, the popular storage medium of the time, with an output port bit, filtered (rounded) somewhat, and the receiver generated a pulse on the rising edge of the waveform. 4800 bps was what we used, though it was quite possible to get to 8k bps, though tape and drive became a factor by that point. Your code has to be in a precisely timed loop, of course, so you end up with a byte and can put it away before the next edge. If you use a timer to measure the interval between edges, you can probably use interrupts to handle other processes in your system, so long as the ISR's are short. RE |
Topic | Author | Date |
FSK / HART - Demodulation on ADC | 01/01/70 00:00 | |
Unknown phase. | 01/01/70 00:00 | |
back in the days of tape cassettes ... | 01/01/70 00:00 | |
Goertzel algorithm to detect tones | 01/01/70 00:00 | |
/Goertzel_algorithm is a good tone FFT decoder | 01/01/70 00:00 | |
Thanks - I'll have a look![]() | 01/01/70 00:00 | |
Suggestions | 01/01/70 00:00 |