TIMER1 Newbie Question
- From: "Cap'n Ahab" <space.invader@xxxxxxxxx>
- Date: 8 Aug 2006 14:18:53 -0700
Hi,
Although I have Googled TIMER1 info. on MicroChip devices, as a novice,
I am somewhat confused and would appreciate a little help.
I have a project I am developing where I wish to count the number of
pulses from a 1 MHz square wave source. (I am measuring the time a
light beam has been broken)
Now, the 16 bits of Timer1 will allow me to count up to 65535 pulses,
which at 1 MHz should give me a window of around a 1/15th of a second.
That is good enough for me, as the light beam will be broken by a
small, quite a fast moving object - around 5 metres per sec and the
object is only 40 mm long - I figure around 1/125th of a second to pass
through the beam.
HOWEVER, I cannot for the life of me figure out what I am supposed to
be doing with Timer1 and which pin I connect the external pulse to.
Any pointers, tips regarding Timer1 and/or code for
initialising/reading it will be great? I have a feeling I should be
using Timer1 in Asynchronous Counter Mode - is that correct?
Cap'n Ahab
.
- Follow-Ups:
- Re: TIMER1 Newbie Question
- From: cbarn24050
- Re: TIMER1 Newbie Question
- Prev by Date: Re: Next generation products - microprocessor family
- Next by Date: Re: Next generation products - microprocessor family
- Previous by thread: VxWorks Tornado 1 and IDE controller 2
- Next by thread: Re: TIMER1 Newbie Question
- Index(es):