PIC12C5XX
8.2.5
INTERNAL 4 MHz RC OSCILLATOR
Some registers are not reset in any way; they are
unknown on POR and unchanged in any other reset.
Most other registers are reset to “reset state” on power-
on reset (POR), MCLR, WDT or wake-up on pin
change reset during normal operation. They are not
affected by a WDT reset during SLEEP or MCLR reset
during SLEEP, since these resets are viewed as
resumption of normal operation. The exceptions to this
are TO, PD, and GPWUF bits. They are set or cleared
differently in different reset situations. These bits are
used in software to determine the nature of reset. See
Table 8-3 for a full description of reset states of all
registers.
The internal RC oscillator provides a fixed 4 MHz (nom-
inal) system clock at VDD = 5V and 25°C, see “Electri-
cal Specifications” section for information on variation
over voltage and temperature.
In addition, a calibration instruction is programmed into
the top of memory which contains the calibration value
for the internal RC oscillator. This location is never code
protected regardless of the code protect settings. This
value is programmed as a MOVLW XXinstruction where
XX is the calibration value, and is placed at the reset
vector. This will load the W register with the calibration
value upon reset and the PC will then roll over to the
users program at address 0x000. The user then has the
option of writing the value to the OSCCAL Register
(05h) or ignoring it.
OSCCAL, when written to with the calibration value, will
“trim” the internal oscillator to remove process variation
from the oscillator frequency. .
Note: Please note that erasing the device will
also erase the pre-programmed internal
calibration value for the internal oscillator.
The calibration value must be read prior to
erasing the part. so it can be repro-
grammed correctly later.
For the PIC12C508A, PIC12C509A, PIC12CE518,
PIC12CE519, and PIC12CR509A, bits <7:2>, CAL5-
CAL0 are used for calibration. Adjusting CAL5-0 from
000000 to 111111 yields a higher clock speed. Note
that bits 1 and 0 of OSCCAL are unimplemented and
should be written as 0 when modifying OSCCAL for
compatibility with future devices.
For the PIC12C508 and PIC12C509, the upper 4 bits of
the register are used. Writing a larger value in this loca-
tion yields a higher clock speed.
8.3
RESET
The device differentiates between various kinds of
reset:
a) Power on reset (POR)
b) MCLR reset during normal operation
c) MCLR reset during SLEEP
d) WDT time-out reset during normal operation
e) WDT time-out reset during SLEEP
f) Wake-up from SLEEP on pin change
DS40139E-page 38
1999 Microchip Technology Inc.