PIC16C620 Microchip Technology, PIC16C620 Datasheet - Page 35

no-image

PIC16C620

Manufacturer Part Number
PIC16C620
Description
EPROM-Based 8-Bit CMOS Microcontroller
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C620-04/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620-04I/P
Quantity:
8
Part Number:
PIC16C620/JW
Manufacturer:
MICROCH
Quantity:
20 000
Part Number:
PIC16C620A-04/P
Quantity:
19
Part Number:
PIC16C620A-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620A-04/SO
Manufacturer:
MICROCHI
Quantity:
84
Part Number:
PIC16C620A-04/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620A-041/P
Quantity:
358
Part Number:
PIC16C620A-04I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620A-04I/SS
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC16C620A-40/P
Manufacturer:
Microchip Technology
Quantity:
135
6.3.1
The prescaler assignment is fully under software
control (i.e., it can be changed “on the fly” during
program execution). To avoid an unintended device
RESET,
EXAMPLE 6-1:
TABLE 6-1:
(Example 6-1) must be executed when changing the
prescaler assignment from Timer0 to WDT.
10.BCF
Address
01h
0Bh/8Bh
81h
85h
Legend: — = Unimplemented locations, read as ‘0’.
1.BCF
2.CLRWDT
3.CLRF
4.BSF
5.MOVLW
6.MOVWF
7.CLRWDT
8.MOVLW
9.MOVWF
1998 Microchip Technology Inc.
Note:
SWITCHING PRESCALER ASSIGNMENT
the
Name
TMR0
INTCON
OPTION
TRISA
STATUS, RP0 ;Skip if already in
TMR0
STATUS, RP0 ;Bank 1
'00101111’b; ;These 3 lines (5, 6, 7)
OPTION
'00101xxx’b ;Set Postscaler to
OPTION
STATUS, RP0 ;Return to Bank 0
Shaded bits are not used by TMR0 module.
u = unchanged
x = unknown
REGISTERS ASSOCIATED WITH TIMER0
following
CHANGING PRESCALER
(TIMER0 WDT)
Timer0 module register
RBPU
Bit 7
GIE
;Clear WDT
;Clear TMR0 & Prescaler
; desired PS<2:0> are
; 000 or 001
; Bank 0
; are required only if
; desired WDT rate
INTEDG
instruction
PEIE
Bit 6
T0CS
Bit 5
T0IE
sequence
TRISA4
T0SE
INTE
Bit 4
Preliminary
TRISA3
RBIE
Bit 3
PSA
To change prescaler from the WDT to the TMR0
module use the sequence shown in Example 6-2. This
precaution must be taken even if the WDT is disabled.
EXAMPLE 6-2:
TRISA2
CLRWDT
BSF
MOVLW
MOVWF
BCF
Bit 2
T0IF
PS2
TRISA1
INTF
Bit 1
PS1
STATUS, RP0
b'xxxx0xxx' ;Select TMR0, new
OPTION_REG
STATUS, RP0
CHANGING PRESCALER
(WDT TIMER0)
TRISA0 ---1 1111 ---1 1111
RBIF
Bit 0
PS0
PIC16C62X
;Clear WDT and
;prescaler
;prescale value and
;clock source
xxxx xxxx uuuu uuuu
0000 000x 0000 000u
1111 1111 1111 1111
Value on
POR
DS30235G-page 35
All Other
Value on
Resets

Related parts for PIC16C620