MAXQ3212
Microcontroller with Analog Comparator
and LED Driver
16 ____________________________________________________________________
System Timing
For maximum versatility, the MAXQ3212 generates its
internal system clock from several sources:
External clock source, including low-cost operation
from 3.58MHz “Colorburst” crystal
External crystal or ceramic resonator, using the
internal oscillator
External RC, using the internal relaxation oscillator
Internal ring oscillator
A crystal warmup counter enhances operational relia-
bility. Each time the external crystal oscillation must
restart, such as after exiting stop mode, the device initi-
ates a crystal warmup period of 65,536 oscillations.
This allows time for the crystal amplitude and frequency
to stabilize before using it as a clock source. While in
the warmup mode, the device operates from the inter-
nal 8kHz ring oscillator and can optionally switch back
to the crystal as soon as the warmup period expires.
MAXQ3212
GLITCH-FREE
MUX
GLITCH-FREE
MUX
DIV 1
DIV 2
DIV 4
DIV 8
DIV 256
CLOCK
DIVIDER
CLOCK
SELECTOR
WATCHDOG
TIMER
CLOCKRESET
STOP
POR
RC
OSCILLATOR
KILL
RC CLK
X-DOG
STARTUP
TIMER
XT CLK
RGMD
XT/RC
DONE
RESET
STOP
XTE
RGSL
XT/RC
SYSTEM
CLOCK
CRYSTAL/
RESONATOR
OSCILLATOR
KILL
STOP
RGSL
INTERNAL
NANO-RING
OSCILLATOR
RGSL
RGMD
RESET
RWT
EWT
EWDI
Figure 2. Clock Sources
MAXQ3212
Microcontroller with Analog Comparator
and LED Driver
____________________________________________________________________ 17
Power Management
Advanced power-management features minimize
power consumption by dynamically matching the pro-
cessing speed of the device to the required perfor-
mance level. This means device operation can be
slowed and power consumption minimized during peri-
ods of reduced activity. When more processing power
is required, the microcontroller can increase its operat-
ing frequency. Software-selectable clock-divide opera-
tions allow flexibility, selecting whether a system clock
cycle (SYSCLK) is 1, 2, 4, or 8 oscillator cycles. By per-
forming this function in software, a lower power state
can be entered without the cost of additional hardware.
For extremely power-sensitive applications, additional
low-power modes are available.
Divide-by-256 power-management mode (PMM)
(PMME = 1, CD1:0 = 00b)
Stop mode (STOP = 1)
In PMM, one system clock is 256 oscillator cycles, sig-
nificantly reducing power consumption while the micro-
controller functions at reduced speed. The optional
switchback feature allows enabled interrupt sources
including external interrupts to quickly exit the power-
management modes and return to a faster internal
clock rate.
Power consumption reaches its minimum in stop mode.
In this mode the external oscillator, system clock, and
all processing activity is halted. Stop mode is exited
when an enabled external interrupt pin is triggered, the
enabled wake-up timer expires, or an external reset
signal is applied to the RESET pin. Upon exiting stop
mode, the microcontroller starts execution immediately
from its internal 8kHz (approximately) ring oscillator
while the warmup period completes.
Interrupts
Multiple reset sources are available for quick response to
internal and external events. The MAXQ architecture uses
a single interrupt vector (IV), single interrupt-service rou-
tine (ISR) design. For maximum flexibility, interrupts can
be enabled globally, individually, or by module. When an
interrupt condition occurs, its individual flag is set, even if
the interrupt source is disabled at the local, module, or
global level. Interrupt flags must be cleared within the
user-interrupt routine to avoid repeated interrupts from
the same source. Application software must ensure a
delay between the write to the flag and the RETI instruc-
tion to allow time for the interrupt hardware to remove the
internal interrupt condition. Asynchronous interrupt flags
require a one-instruction delay and synchronous interrupt
flags require a two-instruction delay.
When an enabled interrupt is detected, software jumps
to a user-programmable interrupt vector location. The
IV register defaults to 0000h on reset or power-up, so if
it is not changed to a different address, the user pro-
gram must determine whether a jump to 0000h came
from a reset or interrupt source.
Once software control has been transferred to the ISR,
the interrupt identification register (IIR) can be used to
determine if a system register or peripheral register
was the source of the interrupt. The specified module
can then be interrogated for the specific interrupt
source and software can take appropriate action.
Because the interrupts are evaluated by user software,
the user can define a unique interrupt priority scheme
for each application. The following interrupt sources are
available.
Watchdog Interrupt
External Interrupt 0
Timer 2 Low Compare, Low Overflow, Capture/
Compare, and Overflow Interrupts
Analog Comparator Interrupt
Wake-Up Interrupt
Reset Sources
Several reset sources are provided for microcontroller
control. Although code execution is halted in the reset
state, the high-frequency oscillator and the ring oscilla-
tor continue to oscillate.
Power-On Reset/Brownout Reset
An internal power-on reset circuit enhances system reli-
ability. This circuit forces the device to perform a
power-on reset whenever a rising voltage on V
DD
climbs above approximately V
RST
. Additionally, the
device performs a brownout reset whenever V
DD
drops
below V
RST
, a feature that can be optionally disabled in
stop mode. The following events occur during a power-
on reset.
All registers and circuits enter their power-on reset
state
I/O pins revert to their reset state, with logic-1 states
tracking V
DD
The power-on reset flag is set to indicate the source
of the reset
The ring oscillator becomes the clock source
The external high-speed oscillator begins its
warmup
Code execution begins at location 8000h
MAXQ3212
Microcontroller with Analog Comparator
and LED Driver
18 ____________________________________________________________________
Watchdog Timer Reset
The watchdog timer functions are described in the
MAXQ Family User’s Guide
. Software can determine if
a reset is caused by a watchdog timeout by checking
the Watchdog Timer Reset Flag (WTRF) in the WDCN
register. Execution resumes at location 8000h following
a watchdog timer reset.
External System Reset
Asserting the external RESET pin low causes the
device to enter the reset state. The external reset func-
tions as described in the
MAXQ Family User’s Guide
.
Execution resumes at location 8000h after the RESET
pin is released. The external system reset function is
enabled by default on a power-on reset, but can be
disabled and the pin used as general-purpose I/O by
setting the Reset Pin Disable (RSTD) bit. The system
designer is cautioned not to disable the reset pin early
in the software as it could disable future JTAG access
and/or bootloader capability.
I/O Ports
The microcontroller uses a form of Type D bidirectional
I/O pins described in the
MAXQ Family User’s Guide
.
Each port has eight independent, general-purpose I/O
pins and three configure/control registers. Many pins
support alternate functions such as timers or interrupts,
which are enabled, controlled, and monitored by dedi-
cated peripheral registers. Using the alternate function
automatically converts the pin to that function. The I/O
pins on this device employ an optional “keeper” latch
that helps to maintain the input pin state in the absence
of external drive sources.
Port 0.7 is a special pin with a stronger pulldown capa-
bility to drive devices such as LEDs. It operates and is
configured the same as other pins.
Type D port pins have Schmitt Trigger receivers and
full CMOS output drivers, and can support special
functions. The pin is either tri-stated or weak pullup
when defined as an input, dependent on the state of
the corresponding bit in the output register. One pin of
the device has interrupt capability.
MAXQ3212
PD.x
SF DIRECTION
SF ENABLE
MUXMUX
PO.x
V
DDIO
SF OUTPUT
V
DD
WEAK
I/O PAD
PIN.x
INTERRUPT
FLAG
FLAG
PI.x OR SF INPUT
EIES.x
DETECT
CIRCUIT
Figure 3. Type D Port Pin Schematic

MAXQ3212-EJX+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
16-bit Microcontrollers - MCU Integrated Circuits (ICs)
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet