Excellent, thanks to all who helped clear this up for me! > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of promero > Sent: Friday, April 27, 2001 12:09 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: tmr0 on 16F84 interrupt period > > > > > Nick Veys wrote: > > > Ok, so I have the clock coming in @ 4MHz, effectively 1MHz to > the processor. > > If I set the prescalar to 1 and assign it to the WDT I'll get a 1:1 > > prescalar and an interrupt every ~244us. > > if you are using TMR0 as a free running timer (without > prescaler), then it will > set its interrupt flag every 256 us > > > Now I know that I can add to that > > value to speed it up so that's good, but my one problem with this is, I > > don't want to use the Watchdog timer... If I have it disabled but still > > assign the prescalar to the watchdog, will it be disabled? The /only/ > > interrupt I want is the tmr0 one. > > > > As long as you keep the watchdog timer disabled, you will never > get a WDT reset. > > > > > > >Just double checking this. At 4MHz, the timer will interrupt every: > > > >256((2^(prescaler+1)/(2^22)) seconds. So with a 0 prescalar > you'll be > > > >getting an interrupt every: 256(2/(2^22)) seconds (122us)? This > > > appears to > > > >be the smallest obtainable period with this clock speed. If > anyone can > > > >confirm this, it'd be much appreciated!! > > > > > > No, actually at 4MHz, TMR0 will interrupt every 256us with a 1:1 > > > prescaler. > > > > > > > >sheet, I'd appreciate that too. The datasheet merely says > 1:2 .. 1:256 > > > >prescalars are available and I only assume that means > > > clock/2^(prescale+1). > > > > > > The datasheet says that the minimum prescale value for TMR0 > is 1:2 when > > > assigned to TMR0. To achieve a 1:1 scale for TMR0, assign the > > > prescaler to > > > the WDT instead of TMR0. > > > > > > --Andrew > > > > -- > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads