Scott Dattalo wrote: > For frequency decoders, you really need quadrature sampling. > Fortunately, only 3/4'ths of the time is spent sampling and > 1/4'th spent processing. (Sampling all 8 DTMF freqeuncies > simultaneously is challenging!) ... > I decided to use the CCP module instead of a polling interrupt. > I first program the CCP module to capture every rising edge. > When I capture a rising I subtract from that the time I captured > for the last rising edge Olin Lathrop wrote: > I'm attacking it a little differently. I've got two 10KHz and two > 1KHz manchester streams to decode simultaneously. I just > can't sample at 100KHz and still have any cycles left for the > decoding and other logic. Instead I use two of the INT interrupts > of the 18F set to high priority to measure the time between edges. Let me take part in the combat. I have a secret mortal weapon: "Free-running counters". Variation with external parts: Let us assume that we have external clock 40 MHz and some very simple circuit that passed this 40 MHz to Timer1 when input (Manchester) line is low; and passed 40 MHz to Timer3 when input line is high. Let the Timers be configured as asynchronous counters. The code should poll counters (don't know if CCP Capture interrupts wok in asynchronous mode). Transitions from one state to another are those when value of one counter corresponds to Manchester period (or two) and value of another approaches one or two period values. No interrupt's code overhead (saving context, disabling/enabling interrupts etc), no interrupts fired by noise (noise is integrated). Is this expected to beat 100KHz barrier? Hope the idea is not stupid (or is stupid enough to be interesting). Mike. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body