What Andy was saying is that you just remember the value of CCP1 when one event occurs. Then, when the next event occurs you do a 16-bit subtract of the new value of CCP1 minus the old value of CCP1, this will tell you the time between events. Note that you do _not_ have to worry about rollover of the timer between the two events (as long as the events are less than 65536 ticks apart), the subtract will still get the right answer. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: Ken Hewitt To: Sent: Monday, October 30, 2000 3:30 PM Subject: Re: [PIC]:Capture on PIC16C765 > In article <85256988.006B90BE.00@tdipower.com>, Andrew Kunz > writes > >They continue counting. > > > >That way you only need to subtract the old copy of CCP1 (you _did_ copy it > >somewhere, right) from the new value to determine the interval between the two > >events. > > > >Andy > > OK thanks, I will now have to think of a new way of doing what I need to > do now that I know they keep counting. > > Ken. > > +-----------------------------+--------------------------------------------+ > | Ken Hewitt G8PWC | Email ken@welwyn.demon.co.uk | > | /\/\/\/\/\/\/\/\/ | Homepage http://www.welwyn.demon.co.uk | > +-----------------------------+--------------------------------------------+ > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics