On Thu, 23 Nov 2000 09:36:49 -0200, you wrote: >Hello Russell, > >> Using a comparator instead of the raw PIC input can help. > > I've never understood what the Capture/Compare ports do and how do it >works. Every documentation I've seen, assume you already know what a Capture >or Compare port does. Capture : Copies the contents of a free-running timer into a register when an external edge is detected on an input pin. An interrupt can be generated when the capture event has occurred. This allows precise timing of extrenal pulse inputs with minimal software overhead. Commonly used for infra-red remote control reception, frequency measurement, resistance measurement (with an extarnal capacitor) etc. Compare : controls an external pin (set/clear/toggle) when the count of a free-running timer reaches a certain value. Useful for generating precise timing pulses or continuous frequency outputs, e.g. for sound, servo pulse generation etc. Compare functions often also have PWM modes, as the functionality is very similar.