English
Language : 

AT80C5112 Datasheet, PDF (11/97 Pages) ATMEL Corporation – 8-bit Microcontroller with A/D Converter
AT8xC5112
Timer 0: Clock Inputs
Registers
Clock Control Register
• A software instruction which sets X2 bit de-activates the prescaler/divider, so the
internal clock is either Xtal_Osc or RC_Osc depending on SEL_OSC bit.
CkIdle
:6
T0 pin
0
Sub Clock
1
SCLKT0
OSCCON
0
1
C/T
TMOD
Control
Timer 0
Gate
INT0
TR0
The SCLKT0 bit in OSCCON register allows to select Timer 0 Subsidiary clock. This
allow to perform a Real Time Clock function.
SCLKT0 = 0: Timer 0 uses the standard T0 pin as clock input (Standard mode)
SCLKT0 = 1: Timer 0 uses the special Sub Clock as clock input.
When the subclock input is selected for Timer 0 and the crystal oscillator is selected for
CPU and peripherals, the CKRL prescaler must be set to FF (division factor 2) in order
to assure a proper count on Timer 0
With an external a 32 kHz oscillator, the timer interrupt can be set from 1/256 to 256
seconds to perform a Real Time Clock (RTC) function. The power consumption will be
very low as the CPU is in idle mode at 32 KHz most of the time. When more CPU power
is needed, the internal RC oscillator is activated and used by the CPU and the others
peripherals.
The clock control register is used to define the clock system behavior.
Table 4. OSCCON - Clock Control Register (8Fh)
7
6
5
4
3
2
1
0
-
-
-
-
-
SCLKT0 OSCBEN OSCAEN
Bit
Number
7
6
5
4
Bit
Mnemonic
-
-
-
-
Description
Reserved
The value read from this bit is indeterminate. Do not set this bit.
Reserved
The value read from this bit is indeterminate. Do not set this bit.
Reserved
The value read from this bit is indeterminate. Do not set this bit.
Reserved
The value read from this bit is indeterminate. Do not set this bit.
11
4191B–8051–04/03