COP8SGR728M8 National Semiconductor, COP8SGR728M8 Datasheet - Page 22

no-image

COP8SGR728M8

Manufacturer Part Number
COP8SGR728M8
Description
8-Bit Microcontroller IC
Manufacturer
National Semiconductor
Series
COP8r
Datasheet

Specifications of COP8SGR728M8

Controller Family/series
COP8
Core Size
8 Bit
Peak Reflow Compatible (260 C)
No
Leaded Process Compatible
No
Package
28SOIC W
Family Name
COP8
Maximum Speed
15 MHz
Ram Size
512 Byte
Program Memory Size
32 KB
Operating Supply Voltage
3.3|5 V
Data Bus Width
8 Bit
Program Memory Type
EPROM
Number Of Programmable I/os
40
Interface Type
USART
Operating Temperature
-40 to 85 °C
Number Of Timers
4
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
COP8SGR728M8/NOPB
Manufacturer:
National
Quantity:
296
www.national.com
5.0 Functional Description
T3CNTRL Register (Address X'00B6)
The T3CNTRL control register contains the following bits:
6.0 Timers
Each device contains a very versatile set of timers (T0, T1,
T2 and T3). Timer T1, T2 and T3 and associated autoreload/
capture registers power up containing random data.
6.1 TIMER T0 (IDLE TIMER)
Each device supports applications that require maintaining
real time and low power with the IDLE mode. This IDLE
mode support is furnished by the IDLE timer T0. The Timer
T0 runs continuously at the fixed rate of the instruction cycle
clock, t
which is a count down timer.
The Timer T0 supports the following functions:
The IDLE Timer T0 can generate an interrupt when the
twelfth bit toggles. This toggle is latched into the T0PND
pending flag, and will occur every 2.731 ms at the maximum
clock frequency (t
interrupt from the twelfth bit of Timer T0 to be enabled or
disabled. Setting T0EN will enable the interrupt, while reset-
ting it will disable the interrupt.
6.2 TIMER T1, TIMER T2 and TIMER T3
Each device have a set of three powerful timer/counter
blocks, T1, T2 and T3. Since T1, T2, and T3 are identical, all
comments are equally applicable to any of the three timer
blocks which will be referred to as Tx.
Each timer block consists of a 16-bit timer, Tx, and two
supporting 16-bit autoreload/capture registers, RxA and
RxB. Each timer block has two pins associated with it, TxA
and TxB. The pin TxA supports I/O required by the timer
block, while the pin TxB is an input to the timer block. The
timer block has three operating modes: Processor Indepen-
dent PWM mode, External Event Counter mode, and Input
Capture mode.
• Exit out of the Idle Mode (See Idle Mode description)
• WATCHDOG logic (See WATCHDOG description)
• Start up delay out of the HALT mode
• Timing the width of the internal power-on-reset
Bit 7
T3C3
T3C3
T3C2
T3C1
T3C0
T3PNDA Timer T3 Interrupt Pending Flag (Autoreload
T3ENA
T3PNDB Timer T3 Interrupt Pending Flag for T3B cap-
T3ENB
C
. The user cannot read or write to the IDLE Timer T0,
T3C2
Timer T3 mode control bit
Timer T3 mode control bit
Timer T3 mode control bit
Timer
modes 1 and 2, T3 Underflow Interrupt Pend-
ing Flag in timer mode 3
RA in mode 1, T3 Underflow in mode 2, T3A
capture edge in mode 3)
Timer T3 Interrupt Enable for Timer Underflow
or T3A Input capture edge
ture edge
Timer T3 Interrupt Enable for Timer Underflow
or T3B Input capture edge
T3C1
C
= 0.67 µs). A control flag T0EN allows the
T3
T3C0
Start/Stop
T3PNDA
T3ENA
control
T3PNDB
(Continued)
in
T3ENB
timer
Bit 0
22
The control bits TxC3, TxC2, and TxC1 allow selection of the
different modes of operation.
6.2.1 Mode 1. Processor Independent PWM Mode
One of the timer’s operating modes is the Processor Inde-
pendent PWM mode. In this mode, the timer generates a
“Processor Independent” PWM signal because once the
timer is setup, no more action is required from the CPU
which translates to less software overhead and greater
throughput. The user software services the timer block only
when the PWM parameters require updating. This capability
is provided by the fact that the timer has two separate 16-bit
reload registers. One of the reload registers contains the
“ON” timer while the other holds the “OFF” time. By contrast,
a microcontroller that has only a single reload register re-
quires an additional software to update the reload value
(alternate between the on-time/off-time).
The timer can generate the PWM output with the width and
duty cycle controlled by the values stored in the reload
registers. The reload registers control the countdown values
and the reload values are automatically written into the timer
when it counts down through 0, generating interrupt on each
reload. Under software control and with minimal overhead,
the PMW outputs are useful in controlling motors, triacs, the
intensity of displays, and in providing inputs for data acqui-
sition and sine wave generators.
In this mode, the timer Tx counts down at a fixed rate of t
Upon every underflow the timer is alternately reloaded with
the contents of supporting registers, RxA and RxB. The very
first underflow of the timer causes the timer to reload from
the register RxA. Subsequent underflows cause the timer to
be reloaded from the registers alternately beginning with the
register RxB.
Figure 15 shows a block diagram of the timer in PWM mode.
The underflows can be programmed to toggle the TxA output
pin. The underflows can also be programmed to generate
interrupts.
Underflows from the timer are alternately latched into two
pending flags, TxPNDA and TxPNDB. The user must reset
these pending flags under software control. Two control
enable flags, TxENA and TxENB, allow the interrupts from
the timer underflow to be enabled or disabled. Setting the
timer enable flag TxENA will cause an interrupt when a timer
underflow causes the RxA register to be reloaded into the
timer. Setting the timer enable flag TxENB will cause an
interrupt when a timer underflow causes the RxB register to
be reloaded into the timer. Resetting the timer enable flags
will disable the associated interrupts.
Either or both of the timer underflow interrupts may be
enabled. This gives the user the flexibility of interrupting
once per PWM period on either the rising or falling edge of
the PWM output. Alternatively, the user may choose to inter-
rupt on both edges of the PWM output.
6.2.2 Mode 2. External Event Counter Mode
This mode is quite similar to the processor independent
PWM mode described above. The main difference is that the
timer, Tx, is clocked by the input signal from the TxA pin. The
Tx timer control bits, TxC3, TxC2 and TxC1 allow the timer to
be clocked either on a positive or negative edge from the
TxA pin. Underflows from the timer are latched into the
TxPNDA pending flag. Setting the TxENA control flag will
cause an interrupt when the timer underflows.
C
.

Related parts for COP8SGR728M8