cop8tab9 National Semiconductor Corporation, cop8tab9 Datasheet - Page 20

no-image

cop8tab9

Manufacturer Part Number
cop8tab9
Description
8-bit Cmos Flash Microcontroller With 2k Byte Or 4k Byte Memory
Manufacturer
National Semiconductor Corporation
Datasheet
www.national.com
10.0 Functional Description
10.7.2 Crystal Oscillator
The Crystal Oscillator mode can be selected by program-
ming Option Bit 4 to 1. CKI is the clock input while G7/CKO
is the clock generator output to the crystal. An on-chip bias
resistor connected between CKI and CKO can be enabled
by programming Option Bit 3 to 0. The value of the resistor is
in the range of 0.3M to 2.5M (typically 1.0M).
Table 4 shows the component values required for various
standard crystal values. Resistor R2 is only used when the
on-chip bias resistor is disabled. Figure 13 and Figure 14
show the crystal oscillator connection diagrams.
10.7.3 External Oscillator
The External Oscillator mode can be selected by program-
ming Option Bit 3 to 0 and Option Bit 4 to 0. CKI can be
driven by an external clock signal provided it meets the
specified duty cycle, rise and fall times, and input levels.
G7/CKO is available as a general purpose input G7 and/or
Halt control. Figure 13 shows the external oscillator connec-
tion diagram.
10.7.4 Clock Prescaler
The device is equipped with a programmable clock prescaler
which allows the user to dynamically adjust the clock speed,
and thus the power dissipation, to the processing needs of
the application. By merely writing an eight-bit value to the
CLKPS register, the user can divide the input oscillator clock
by an integer multiple (1 — 256) and reduce the CPU clock
frequency. The format of the CLKPS Register is shown in
Table 5 . The value written to the CLKPS register is one less
than the desired divider. A value of 0 (zero) written to the
CLKPS register yields a CPU clock equal to the input clock
frequency. A value of 255 written to the CLKPS register
yields a CPU clock with a period equal to 256 input clock
periods.
R1 (kΩ) R2 (MΩ) C1 (pF) C2 (pF)
With External Frequency Control Resistor (R/C+R)
5.6
0
0
0
TABLE 4. Crystal Oscillator Configuration,
1
1
1
1
T
A
= 25˚C, V
100
18
18
45
100–156
30–36
CC
18
18
20047527
= 2.5V
CKI Freq. (MHz)
0.455
15
10
4
(Continued)
FIGURE 16. R/C Oscillator
20
10.8 CONTROL REGISTERS
10.8.1 CNTRL Register (Address X'00EE)
The Timer1 (T1) and MICROWIRE/PLUS control register
contains the following bits:
10.8.2 PSW Register (Address X'00EF)
The PSW register contains the following select bits:
The Half-Carry flag is also affected by all the instructions that
affect the Carry flag. The SC (Set Carry) and RC (Reset
Bit 7
T1C3
Bit 7
T1C3
T1C2
T1C1
T1C0
MSEL
IEDG
SL1 & SL0 Select the MICROWIRE/PLUS clock divide
HC
C
T1PNDA Timer T1 Interrupt Pending Flag (Autoreload RA
T1ENA
EXPND
BUSY
EXEN
GIE
Bit 7
HC
TABLE 5. Clock Prescale Register (CLKPS)
T1C2
C
With Fully On-Chip R/C Oscillator.
Half Carry Flag
Carry Flag
in mode 1, T1 Underflow in Mode 2, T1A capture
edge in mode 3)
Timer T1 Interrupt Enable for Timer Underflow
or T1A Input capture edge
External interrupt pending
MICROWIRE/PLUS busy shifting flag
Enable external interrupt
Global interrupt enable (enables interrupts)
T1PNDA
Timer T1 mode control bit
Timer T1 mode control bit
Timer T1 mode control bit
Timer
modes 1 and 2. T1 Underflow Interrupt
Pending Flag in timer mode 3
Selects G5 and G4 as MICROWIRE/PLUS
signals SK and SO respectively
External
(0 = Rising edge, 1 = Falling edge)
by (00 = 2, 01 = 4, 1x = 8)
T1C1
T1ENA
T1C0
T1
interrupt
CLKPS
Start/Stop
MSEL
EXPND
20047528
edge
IEDG
BUSY
control
polarity
SL1
EXEN
in
Bit 0
select
SL0
timer
Bit 0
GIE
Bit 0

Related parts for cop8tab9