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 am driving the input pin via an 4N25 optocoupler, with the input pin connected between the collector of the phototransistor (with the emitter grounded) and a 4.7K pullup resistor. I believe the software is working correctly, and the problem is With the hardware implementation. Do I need any special filtering on input ports to reduce false triggering? Am is missing something?? - Bruce -- ----------------------------------------------------- <<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ----------------------------------------------------- Bruce A. Bowling Staff Scientist Thomas Jefferson National Accelerator Facility 12000 Jefferson Ave - Newport News, VA 23602 (804) 249-7240 bowling@cebaf.gov http://devserve.cebaf.gov/~bowling ----------------------------------------------------- <<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -----------------------------------------------------