A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
I'm using PicBasic and my project requires taking an analog reading every 100th of a second. Is using TMR0 the best way to do the timing? It looks like the prescaler ratios do not make it possible. |
|
|
|
Even is written on picbasic or not, you have at least two good options: a. tmr0 with rollover, it works with a good prescaler and tmr0 initial value "100th of a second" 1/100 = 10mS b. tmr0 in free running, start tmr0 and count the number of counts ( including prescaler ) until the tmr0 is equal with a comparison number. ( you have to count also the delay need for comparison by extra instructions ) regards, Vasile http://www.geocities.com/vsurducan On Wed, 30 Oct 2002, dino308gt4 wrote: > ________________________________________________________________________________ > Note: The author of this message has chosen not to reveal an email > address. You won't be able to reply to the author directly. > > ________________________________________________________________________________ > > I'm using PicBasic and my project requires taking an analog reading > every 100th of a second. > Is using TMR0 the best way to do the timing? > It looks like the prescaler ratios do not make it possible. > Yahoo! Groups Sponsor > ADVERTISEMENT > > to unsubscribe, go to http://www.yahoogroups.com and follow the > instructions > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. |