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