English
Language : 

PIC16F87 Datasheet, PDF (71/214 Pages) Microchip Technology – 18/20/28-Pin Enhanced FLASH Microcontrollers with nanoWatt Technology
PIC16F87/88
EXAMPLE 6-1: CHANGING THE PRESCALER ASSIGNMENT FROM WDT TO TIMER0
CLRWDT
BANKSEL
MOVLW
MOVWF
OPTION
b'xxxx0xxx'
OPTION
; Clear WDT and prescaler
; Select Bank of OPTION
; Select TMR0, new prescale
; value and clock source
TABLE 6-1: REGISTERS ASSOCIATED WITH TIMER0
Address Name Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1 Bit 0
Value on
POR, BOR
Value on
all other
RESETS
01h,101h TMR0 Timer0 Module Register
xxxx xxxx uuuu uuuu
0Bh,8Bh, INTCON GIE
10Bh,18Bh
PEIE TMR0IE INTE RBIE TMR0IF INTF RBIF 0000 000x 0000 000u
81h,181h OPTION RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 1111 1111 1111 1111
Legend: x = unknown, u = unchanged, - = unimplemented locations read as ‘0’. Shaded cells are not used by Timer0.
 2003 Microchip Technology Inc.
Preliminary
DS30487B-page 69