You've only got one shot at the title!
The Timer (2.5) component offers a two "One Shot" Run Mode configuration options.
- One Shot
- One Shot (Halt on Interrupt)
This article discusses the standard One Shot option.
"One Shot" means that the timer only runs one and then stops.
So with exactly the same basic default schematic but with a one shot option selected. The timer can run only once. As usual the timer is started with a Timer_Start() statement. The timer will start and when it reaches its TC (Terminal Count) it will stop.
For the above schematic diagram the LED will only change state once with no way to reset the and re-enable the timer because the its reset pin is connected to a logic '0'.
If you carefully read the component Timer's datasheet (Document Number: 001-86926 Rev. *A) at the bottom of page 24 is says;
"After the One Shot period has completed, the Timer can be set up to run for another period by
using a hardware reset. The hardware reset reloads the counter from the period register. One
cycle after reset is removed, the Timer is enabled to count down again....."
I've found the easiest way to do this is to connect a digital input pin to the timer's reset pin.
This allows the timer to be reset by hardware or by software.
Ensure that this pin is usually kept low and only pulled high when you want to reset and re-enable the timer.
If you have any questions, please do not hesitate to leave a comment.



-
DAB
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Comment-
DAB
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Children