Hi All, I am novice in this list. I have beginned to study and try to use a PIC 16C84 four weeks ago. As a case study i would build a RPM LED indicator for a two time engine for the moto (Aprilia). The problem is similar as your 1 -2 millisecond measuring. The engine i wont monitor , if running at 8.000 RPM have a period of 7.5 millisecon. My approach is to use a 4Mhz quartz as main oscillator, then setting the prescaler to divide by 256, and chekinh the FF-zero overflow you can reach it every 0.032 millisecond. Setting on RB0 the measuring signal, and set up the interrupt at level change, you can count how many overflow there are between the interrupts. Hi Leonardo De Palo leo.depalo@telesys.it -----Messaggio originale----- Da: ken A: PICLIST@MITVMA.MIT.EDU Data: giovedl 2 aprile 1998 21.34 Oggetto: Re: PULSE MEASURING >In article <01BC3E08.F3687160@dup4-wvb.iafrica.com.na>, Alastair > writes >>Hi All >>It looks as if the list is always divided into three types of users: those who >>do know, those who don't and those who don't care! >>Anyway as one who doesn't know I'd like any help you've got to give, please. >>I need to measure the width of a pulse which occurs at about 30Hz with a >>16c(f)84, the pulse width is variable between 1ms and 2ms and I need as high a >>resolution as possible(about 7bit should do) on the 1ms difference between the >>two extremes. >>As usual the routine needs to use as little as possible processor time. >>Any code will be most helpful. >> > >Be careful, the standard is always stated as 1 - 2mS but most RC >transmitters actually generate a pulse covering about 0.875 to 2.35mS so >make sure your code can handle this range or you will get all sorts of >unexpected problems. > >Ken. > >+-----------------------------+-------------------------------------------- + >| Ken Hewitt G8PWC | Email ken@welwyn.demon.co.uk | >| /\/\/\/\/\/\/\/\/ | Homepage http://www.welwyn.demon.co.uk | >+-----------------------------+-------------------------------------------- +