My understanding of CTC (Clear Timer on Compare) is to generate or output a PWM not time an input. -----Original Message----- From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of James Washer Sent: Tuesday, March 07, 2006 12:16 AM To: AVR-Chat@yahoogroups.com Subject: Re: [AVR-Chat] How to measure a pulse width In a word... well... 3 letters... CTC On Mon, 6 Mar 2006 23:14:48 -0500 "wbounce" <wbounce@safeplace.net> wrote: > I need to measure how long a pulse is. I have a m128. The pulse goes > +5V for 1ms to 36.9ms and then goes 0v for a fixed 65ms. I need to > time how long the +5V part is in 10us increments. How would I do that? > I will wire the sensor generating the pulse to a pin. I seem to > remember something about a capture ability but I do not understand how > it works or how to set it up. The fact that the pulse is assymetrical > probably does not help. > > I am already using timer0 fir a ms timer and timer3 (a and b) for pwm > output. so I guess I would have to use timer1 or 2. > Yahoo! Groups Links
Message
RE: [AVR-Chat] How to measure a pulse width
2006-03-08 by wbounce
Attachments
- No local attachments were found for this message.