Hi Christoph, Running a 8MHz crytal will give you double the resolution. You could also use an interrupt to start the timer and another to stop it (by changing the interrupt level on one of the pins.) I think there's some examples in the App Notes. I use PicBasic and the resolution with the "built-in" pulse measurement routine is 10 microseconds on a 4 Mhz crystal. This is really easy to do with PicBasic - a simple command measures the pulse and puts the result into a variable. Rudie Shepherd > -----Original Message----- > From: vulcan@ihug.co.nz [SMTP:vulcan@ihug.co.nz] > Sent: Saturday, March 07, 1998 10:10 PM > To: 'pic microcontroller discussion list' > Subject: RE: Interval > > A PIC running at 4MHz will produce an internal clock > of 4MHz / 4 giving 1MHz. So each instruction is taking > place at 1uS. > To time the duration of something you can clear the > timer and start it at the beginning of the sample and stop > it again at the end. With the timer set to increment on the > internal clock and the prescaller set to 1:1 you can get > a resolution in the micro-second range. > > Gavin > -------------------------- > vulcan@ihug.co.nz > http://www.geocities.com/TheTropics/Cabana/2625 > -------------------------- > > > -----Original Message----- > From: Christoph Klein [SMTP:hyla@MAYN.DE] > Sent: Sunday, 8 March 1998 04:17 > To: PICLIST@MITVMA.MIT.EDU > Subject: Interval > > Dear PicListers, > > I would like to measure time intervals which are presented to > a Pic16C84 (possibly) as short TTL-compatible spikes. > Supposing that measuring the interval would be the pic's only > task: > > What would be the best time resolution I could expect using a > 4 MHz pic with a Xtal? > > And how about accuracy? > > Is there a chance to measure with a resolution in the msec range > or > isn't there? > I haven't got a clue ... > > Christoph >