Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > Digital Signal Processing (DSP) > Re: Low pass fi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 13 Topic 14031 of 14332
Post > Topic >>

Re: Low pass filter on a PIC

by Jerry Avins <jya@[EMAIL PROTECTED] > Oct 11, 2008 at 02:00 PM

Randy Yates wrote:
> Jerry Avins <jya@[EMAIL PROTECTED]
> writes:
>> [...]
>> I think he said 420 Hz jitter.
> 
> Yeah. I'm not thinking too clearly on this one.
> 
> What *would* the zero-crossings of A*sin(2*pi*50*t) + B*sin(2*pi*420*t)
> look like? 
> 
> How are the zero-crossings detected? Does the detection fire off an
> interrupt to the PIC, in addition to stopping the counter? Wouldn't
> Manfred possibly get a bunch of interrupts then (i.e., not just an
> average of 50 samples / second)?

I don't know how _he_ detects zero crossings. I have done it with a 
hardware comparator* tied to the trigger of a catch register. The catch 
register latches the contents of a continuously running counter. The 
trigger (if I remember 68HC1x correctly) not only transfers the count, 
but also can set an interrupt. There are several independently clocked 
registers, so by clocking one with the positive-going comparator edge 
and the other with the negative, you have independent whole-cycle 
measurements twice per cycle. The interrupt routine subtracts the 
register contents from the stored previous reading. Magically, counter 
wraparound washes out (but of course, Mr. Fixedpoint, you know that). 
*Because the counter never stops, there is no ***ulative error.* That's 
fraction saving of a different kind. :-)

Jerry
___________________________
* The cheap way is just a diode tied to the positive power-supply rail 
in series with a resistor tied to the AC of 12V or more. The junction of 
the resister and diode switches pretty fast between logic 0 and 1. 
Still, for noise immunity, I prefer a little hysteresis.
-- 
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
** Posted from http://www.teranews.com
**
 




 13 Posts in Topic:
Low pass filter on a PIC
"Manfred" <m  2008-10-09 22:19:19 
Re: Low pass filter on a PIC
Tim Wescott <tim@[EMAI  2008-10-09 21:06:31 
Re: Low pass filter on a PIC
HardySpicer <gyansorov  2008-10-09 21:22:55 
Re: Low pass filter on a PIC
Jerry Avins <jya@[EMAI  2008-10-10 11:13:59 
Re: Low pass filter on a PIC
Scott Seidman <namdies  2008-10-10 12:27:20 
Re: Low pass filter on a PIC
Vladimir Vassilevsky <  2008-10-10 08:54:05 
Re: Low pass filter on a PIC
Jerry Avins <jya@[EMAI  2008-10-10 11:33:04 
Re: Low pass filter on a PIC
Randy Yates <yates@[EM  2008-10-10 16:35:44 
Re: Low pass filter on a PIC
"Manfred" <m  2008-10-10 20:33:40 
Re: Low pass filter on a PIC
Randy Yates <yates@[EM  2008-10-10 22:13:39 
Re: Low pass filter on a PIC
Jerry Avins <jya@[EMAI  2008-10-10 23:39:27 
Re: Low pass filter on a PIC
Randy Yates <yates@[EM  2008-10-11 00:23:53 
Re: Low pass filter on a PIC
Jerry Avins <jya@[EMAI  2008-10-11 14:00:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 4:39:49 CST 2008.