@AvionicsMaster1. Not wanting to be rude but that is a terrible idea, you will tie up the PIC doing nothing but pausing. The countdowntimer is so much better, little or no cpu time used for little or no programming effort.
George
@AvionicsMaster1. Not wanting to be rude but that is a terrible idea, you will tie up the PIC doing nothing but pausing. The countdowntimer is so much better, little or no cpu time used for little or no programming effort.
George
I got the idea the event wouldn't happen all time and wouldn't require a pause every second of .8 second.
Even if there was only .2 seconds couldn't he do like 200 commands doing something else?
Just to me, a pause for an intermittent event would make more sense.
PS Maybe ifn I knew all of what he was trying to do I wouldn't make a poor suggestion like that. You'd also have to work harder than that to be rude. Teach on.
Hi,
As far as I know there no count down timers in any PIC but I don't really see the need for one.
As have been said before, instead of counting from 100 to 0 you count from 156 to 0 (with an 8-bit timer). There's really no difference. What you need to do (which pedja089 also covered) is to set the timer up so you have enough "range" then simply calculate at what value you need to start in order to have it overflow after 0.8 seconds or whatever. Depending on the PIC and timer used you may not be able to get long enough time in "one" go. In that case you could, for example, set it up to give you "ticks" of 0.1s (or whatever) and count 8 of them.
/Henrik.
Bookmarks