View Single Post
  #7   Spotlight this post!  
Unread 25-10-2006, 14:45
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Help needed timing a pulse (2004 Robovation)

Quote:
Originally Posted by yongkimleng
May I ask, is there a possibility where during the copy of the first 8 bits, the value is something like 255, and when it proceeds to copy the next 8 its, it increments by 1 (due to the overflow of the first 8 bits when the timer ticks a few more times) before it gets copied, resulting in a larger value than expected?..
That would be why you'd prefer having the timer in 16-bit read mode. In this mode, when TMRxL is read, TMRxH is instantly copied to a buffer, which can be read without fear of this problem. Writing is reversed. you write to TMRxH, which is stored to a buffer, then wrtie to TMRxL, which write that value and copies the buffer to the timer at the exact same time.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter