PDA

View Full Version : hardware timers



Adam
- 5th March 2007, 10:14
hi to all, i am new to this forum thing,i wish to ask a question about taking advantage of the on board timers, where i wish to start one of the hardware timers, just before i start a repeat until loop, so the timer will time out within say 1us or less, if the until state of my loop has not been reached, and for the program to reset the timer jump out of the loop to a specific label, using PicBasic pro, to access the timer, set and reset it, can somebody pls help thanks pls any code samples

skimask
- 5th March 2007, 14:08
hi to all, i am new to this forum thing,i wish to ask a question about taking advantage of the on board timers, where i wish to start one of the hardware timers, just before i start a repeat until loop, so the timer will time out within say 1us or less, if the until state of my loop has not been reached, and for the program to reset the timer jump out of the loop to a specific label, using PicBasic pro, to access the timer, set and reset it, can somebody pls help thanks pls any code samples

Show us some of your code and we'll point you in the right direction...

Adam
- 6th March 2007, 23:01
thanks for replying so quick, i worked out how to use the timers today, thats not really what iam looking for but its a start, what i really wanted was to use a tmmer that i can initiate just before a loop , that runs in the background, so as not to consume any processor speed and when it times out it can jump to a label, i am thinking i may be able to do it with the WDT i will have to experment. i have no code as yet just this idear and urge to work it out, again thanks for any hlp you can give me, and your quick responce thankyy

skimask
- 7th March 2007, 00:10
thanks for replying so quick, i worked out how to use the timers today, thats not really what iam looking for but its a start, what i really wanted was to use a tmmer that i can initiate just before a loop , that runs in the background, so as not to consume any processor speed and when it times out it can jump to a label, i am thinking i may be able to do it with the WDT i will have to experment. i have no code as yet just this idear and urge to work it out, again thanks for any hlp you can give me, and your quick responce thankyy

Ok, since you don't have any code, show us some 'pseudo-code' that you might have, a flowchart, anything. We'll help you...