How are you connecting to your PIC. I would try using Timer1 with TMR1CS set (Timer1 clocks on the rising edge of RC0) Then you can clear Timer1 and it will count rising edges until it overflows or you clear it again. Make sure your prescaler settings, etc. are appropriate. Nick ----- Original Message ----- From: "Phil" To: Sent: Sunday, February 08, 2004 1:33 AM Subject: [PICLIST] [EE:]Pulse counting > Hello everyone, > > I'm trying to accurately count reed switch closures on the end of a cable that > is 20 metres in length. The pulses occur at a rate of about 4 per second and > are feed to the input port of a PIC for processing. > > The best that I have been able to achieve is a variation of 2.5% in the count > and that was through the use of a Schmitt Trigger (74LS13 with the inputs > tied together). > > Should I expect an accuracy better than 2.5%? How do commercial satellite dish > trackers, for example, achieve an accurate count? > > -- > Regards, > Phil. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.