Oh Dennis this thing is your KARMA, rigth? Or whatever you'd like to call ir. Anyway, I did the followin: I take your table and add this formula to the right of the measured value: =+IF(C27 > 6250,"HIGH",IF(C27<6100,"LOW","OK")) This was estimated, knowing that: MAX VAL = 6358 MIN VAL = 6043 AVG VAL = 6208 Then, I defined two limit Above 6250 is HIGH Below 6100 is LOW The rest is OK Yes? Well, I look that all the highs ocurr in (or near) every fifth measure (5 - 10 - 15 - etc) I think that this is not a coincidence. Remenber that there is a chance, a very high one, that the encoder is not well centered on the edge of the motor, so, the values will be disimilar to one each other, because the thick of the metal is not equal en every measure. Well ill live you with that. Regards Mauricio D. Jancic Janso Desarrollos - Microchip Consultant www.janso.com.ar info@janso.com.ar (54) - 11 - 4542 - 3519 Lugones 3238 "B" - C1430ECN Capital Federal Republica Argentina MSN: jansodesarrollos@hotmail.com >>-----Original Message----- >>From: pic microcontroller discussion list >>[mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Dennis Crawley >>Sent: Thursday, April 15, 2004 16:08 >>To: PICLIST@MITVMA.MIT.EDU >>Subject: Re: [PIC:] Capture >> >>Thank you Alan and Jan-Erik. >>If I where preoccupied about the +/-1 you'd probably LOL >>seeing my face when the motor encoder was connected! >> >>I wonder how can I filter THAT signal in 20ms or 10ms to >>apply some pi control! >> >>But don't worry by now, I'll figure it out. >>In the mean time I send to you the captures between 100ms >>each with the oscilator and with the motor. >> >> >>Thanks, >>Dennis Crawley >>Argentina >> >>----- Original Message ----- >>From: "Alan B. Pearce" >>To: >>Sent: Thursday, April 15, 2004 8:54 AM >>Subject: Re: [PIC:] Capture >> >> >>> >Is it normal that the capture module varies ~1 unit the >>capture of an >>> >stable sqare signal in all the range of frecuencies? >>> >4000Hz 250 and 251 >>> >2000Hz 500 and 501 >>> >800Hz 1250 and 1251 >>> >What this capture means? >>> >There is something wrong in my interrupt routine? >>> >>> Nothing wrong, just that your sampling and the measured >>signal are not >>> synchronous. >>> >>> Any digital measurement system is likely to show +/-1 in the least >>> significant digit over a number of measurements for a stable input >>> signal unless there is some special synchronising hardware to make >>> sure the measurement always starts at a given point on the measured >>> waveform. Even then at certain points there will be some >>uncertainty >>> which will cause >>what >>> you are seeing. >>> >>> -- >>> http://www.piclist.com hint: To leave the PICList >>> mailto:piclist-unsubscribe-request@mitvma.mit.edu >> >> >>-- >>http://www.piclist.com hint: To leave the PICList >>mailto:piclist-unsubscribe-request@mitvma.mit.edu >> >> >> >>-- >>Incoming mail is certified Virus Free. >>Checked by AVG Anti-Virus (http://www.grisoft.com). >>Version: 7.0.230 / Virus Database: 262.8.3 - Release Date: 15/04/2004 >> >> >> -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu