I am trying to use TMR0 to synchronize my code length, but when I simulate
with the stopwatch running the STOPWATCH increments 2 cycles(exactly
following single step mode) for every TMR0 cycle on average. I do not have
the prescaler turned on.
I initialize TMR0 with the following code:
On Wed, 17 Feb 1999 16:34:15 -0800 GregH <ZIRCON.COM> writes: greg
>I do not have the prescaler turned on.
>I initialize TMR0 with the following code:
This setting turns the prescaler on to the timer with a value of 2. If
the PSA bit is 0, assigning the prescaler to the timer, the timer can run
with prescale of 2, 4, 8, 16, 32, 64, 128, or 256. In order to use the
timer without any prescaler, set the PSA bit to 1, assigning the
prescaler to the WDT. If you want to keep the WDT time the same, set the
other bits to 0 so WDT has a 1:1 prescale. Set OPTION to 00001000.
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]
> movlw b'00000000'
When TMR0 is assigned to the prescaler the minimum scale ratio is 1:2,
that is why you are getting 2 'ticks' per tmr0 increment. The ratio is
set 1:1 when the prescaler is assigned to the WDT.
Multimedia 16F84 Beginners PIC Tools.
** NEW PicNPro Programmer and Port Interface **
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- New search...