PicChip-Prescaler, is it Preserved or Reset to Zero?

In this example, the prescaler is connected to the oscillator, but I want to use it elsewhere temporarily.

Does anyone know if the picchip prescaler will reset itself back to zero because of this, or can I expect the prescaler to hold it's last value? Reason for asking is for timekeeping, if the prescaler keeps the last value, then this will keep reasonably good time, otherwise if it resets, then I've introduced error/drift into my timekeeping.

clrwdt ;make sure WDT doesn't trigger movf TMR0,w ;hold last TMR0 movwf temp movlw b'11111011' ;need TOCKI, switch prescaler to WDT

...do stuff...

movf 2 ;update TMR0 to new count addwf temp,w movwf TMR0 movlw b'11101011' ;switch prescaler back to OSC

Reply to
Amused
Loading thread data ...

Sorry about that, typed it without checking spelling on code :-( Code corrected with more comments, still same question.

clrwdt movf TMR0,w ;hold last TMR0 movwf temp movlw b'11111011' ;switch prescaler to WDT option ;matching option below 32 cycles later

...do stuff...

movlw 2 ;update TMR0 to new count addwf temp,w movwf TMR0 movlw b'11100011' ;switch prescaler to OSC option ;matching option above 32 cycles ago

Reply to
Amused

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.