Bruce Bowling wrote: > I am using a 16C56 part to measure pulse widths (in the 0 to 10 ms > range). My problem is that I am getting unreliable input pin > detection within software. I am driving the pin with a test 50 > percent duty square wave, and the measued pulse is correct most of > the time, but on random occasions the software indicates that the > pulse is slightly longer than it really is. > .... > I believe the software is working correctly, and the problem is > With the hardware implementation. Bruce: Please (1) show the relevant portion of your code, (2) tell us your PIC's clock frequency and the frequency of your 50% duty-cycle square wave, (3) describe precisely what "slightly longer" means, and (4) tell us that you've looked at the incoming signal with an oscilloscpe ON THE PIC's I/O PIN and have seen nothing but clean, fast-risetime square-waves there. -Andy === Andrew Warren - fastfwd@ix.netcom.com === === Fast Forward Engineering - Vista, California === === === === Custodian of the PICLIST Fund -- For more info, see: === === http://www.geocities.com/SiliconValley/2499/fund.html ===