piclist 2005\08\23\202614a >
Thread: Timer 1 on the DS30F
www.piclist.com/techref/timers.htm?key=time
picon face BY : John Nall email (remove spam text)



I think that I am beginning to get the hang of how the timers work on
the ds30F, and would greatly appreciate it if someone would confirm my
thinking.  (If I am wrong on any or all points, please let me know).  I
am going to only talk with reference to Timer1, although some of these
things are general.

1.  TMR1, the timer register, begins incrementing once the timer has
been enabled (by setting bit TON in T1CON).  It increments once for each
instruction cycle (unless prescaled).

2.  If a value is entered into PR1, (the period register) then when TMR1
reaches the value that is in PR1 it will trigger a Timer1  interrupt,
provided that the interrupt control bit (T1IE) in IFS0 has been set.  
One presumes that most likely TMR1 is incremented before checking, so
that if PR1 starts out as zero then the interupt will not occur until
65535 instruction cycles have passed.

3.  Bit T1IF of IFS0 is set by the action of the value in TMR1 reaching
the value in PR1.

Does that seem to be correct?  I am looking at sample code in the
Microchip Family Reference Manual, but now you guys have me convinced
that I have to take that with a grain of salt.  :-(

John
<430BBE9C.7000402@gmail.com> 7bit

See also: www.piclist.com/techref/timers.htm?key=time
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Timer 1 on the DS30F

month overview.

new search...