Usart serial ports, Real-time clock, Programmable timers – Rainbow Electronics MAXQ2010 User Manual

Page 26: Watchdog timer, Table 1. serial port operating characteristics

Advertising
background image

MAXQ2010

16-Bit Mixed-Signal Microcontroller with LCD

26

______________________________________________________________________________________

The time base of the serial ports is derived from either a
division of the system clock or the dedicated baud-
clock generator. Table 1 summarizes the operating
characteristics of each mode.

Real-Time Clock

A binary real-time clock (RTC) keeps the time of day in
absolute seconds with 1/256-second resolution. The
32-bit second counter can count up to approximately
136 years and be translated to calendar format by
application software. A time-of-day alarm and indepen-
dent subsecond alarm can cause an interrupt or wake
the device from stop mode.

The independent subsecond alarm runs from the same
RTC and allows the application to support interrupts
with a minimum interval of approximately 3.9ms. This
creates an additional timer that can be used to mea-
sure long periods of time without performance degra-
dation. Traditionally, long time periods have been
measured using multiple interrupts from shorter inter-
rupt intervals. Each timer interrupt required servicing,
with each accompanying interruption slowing system
operation. By using the RTC subsecond timer as a
long-period timer, only one interrupt is needed, elimi-
nating the performance hit associated with using a
shorter timer.

An internal crystal oscillator clocks the RTC using inte-
grated 6pF load capacitors, and yields the best perfor-
mance when mated with a 32.768kHz crystal rated for a
6pF load. No external load capacitors are required.
Higher accuracy can be obtained by supplying an
external clock source to the RTC.

Programmable Timers

The microcontroller incorporates three instances of the
16-bit programmable Timer/Counter B peripheral,
denoted TB0, TB1, and TB2. They can be used in
counter/timer/capture/compare/PWM functions, allow-

ing precise control of internal and external events.
These timer/counters support clock input prescaling
and set/reset/toggle PWM/output control functionality
not found on other MAXQ timer implementations. A new
register, TBC, supports certain PWM/output control
functions in some implementations. A distinguishing
characteristic of Timer/Counter B is that its count
ranges from 0000h to the value stored in the 16-bit cap-
ture/reload register (TBR), whereas in other implemen-
tations (e.g., Timer 1) the count ranges from the value
in the reload register to FFFFh. These timers are fully
described in the

MAXQ Family User’s Guide

.

Timer B operational modes include the following:

• Autoreload

• Autoreload Using External Pin

• Capture Using External Pin

• Up/Down Count Using External Pin

• Up-Count PWM/Output

• Up/Down PWM/Output

• Clock Output on TBB Pin

Watchdog Timer

An internal watchdog timer greatly increases system reli-
ability. The timer resets the device if software execution
is disturbed. The watchdog timer is a free-running
counter designed to be periodically reset by the applica-
tion software. If software is operating correctly, the
counter is periodically reset and never reaches its maxi-
mum count. However, if software operation is interrupted,
the timer does not reset, triggering a system reset and
optionally a watchdog timer interrupt. This protects the
system against electrical noise or electrostatic discharge
(ESD) upsets that could cause uncontrolled processor
operation. The internal watchdog timer is an upgrade to
older designs with external watchdog devices, reducing
system cost and simultaneously increasing reliability.

MODE

TYPE

START BITS

DATA BITS

STOP BIT

Mode 0

Synchronous

8

Mode

1

Asynchronous

1 8 1

Mode 2

Asynchronous

1

8 + 1

1

Mode 3

Asynchronous

1

8 + 1

1

Table 1. Serial Port Operating Characteristics

Advertising