The MSP430 is an ultralow-power mixed signal microcontroller family consisting of several devices that feature
different sets of modules targeted to various applications. The microcontroller is designed to be battery operated
for an extended application lifetime. With 16-bit RISC architecture, 16-bit integrated registers on the CPU, and
a constant generator, the MSP430 achieves maximum code efficiency. The digitally-controlled oscillator,
together with the frequency-locked-loop (FLL), provides a wakeup from a low-power mode to active mode in
less than 6 ms.
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of
Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
†
MSP430P313/E313 not recommended for new designs – replaced by MSP430P315/E315.
PRODUCTION DATA information is current as of publication date.
Products conform to specifications per the terms of Texas Instruments
standard warranty. Production processing does not necessarily include
testing of all parameters.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
Copyright 2000, Texas Instruments Incorporated
1
MSP430x31x
40°C to 85°C
†
25°C
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
description (continued)
Typical applications include sensor systems that capture analog signals, converting them to digital values, and
then processes the data and displays them or transmits them to a host system. The timer/port module provides
single-slope A/D conversion capability for resistive sensors.
AVAILABLE OPTIONS
PACKAGED DEVICES
T
A
SSOP
48-Pin
(DL)
SSOP
56-Pin
(DL)
MSP430C312IDL
MSP430C313IDL
°
–
MSP430C311SIDL
°
MSP430P315SIDL
MSP430C314IDL
MSP430C315IDL
MSP430P313IDL
†
MSP430P315IDL
°
†
MSP430P313/E313 not recommended for new designs – replaced by MSP430P315/E315.
——
JLCC
68-Pin
(FZ)
PMS430E313FZ
PMS430E315FZ
functional block diagram
MSP430C312,313,314,315 and MSP430P313†,315 and PMS430E313,315
CIN27ICounter enable. CIN input enables counter (TPCNT1) (timer/port).
COM0–COM352–55OCommon output pins. COM0–COM3 are used for LCD back planes.
P0.013I/OGeneral-purpose digital I/O pin
P0.1/RXD14I/OGeneral-purpose digital I/O pin, receive data input port – 8-bit (timer/counter)
P0.2/TXD15I/OGeneral-purpose digital I/O pin, transmit data output port – 8-bit (timer/counter)
P0.3–P0.716–20I/OFive general-purpose digital I/O pins, bit 3–7
R239IInput of second positive analog LCD level (V2) (LCD)
R1310IInput of third positive analog LCD level (V3 of V4) (LCD)
RST/NMI5IReset input or nonmaskable interrupt input
S029OSegment line S0 (LCD)
S130OSegment line S1 (LCD)
S2/O2–S5/O531–34OSegment lines (S2 to S5) or digital output port O2 to O5, group 1 (LCD)
S6/O6–S9/O935–38OSegment lines (S6 to S9) or digital output port O6 to O9, group 2 (LCD)
S10/O10–S13/O1339–42OSegment lines (S10 to S13) or digital output port O10 to O13, group 3 (LCD)
S14/O14–S17/O1743–46OSegment lines (S14 to S17) or digital output port O14 to O17, group 4 (LCD)
S18/O1847OSegment line (S18) or digital output port O18 , group 5 (LCD)
S22/O22–S23/O2348,49OSegment lines (S22 to S23) or digital output port O22 to O23, group 6 (LCD)
S26/O2650OSegment line (S26) or digital output port O26, group 7 (LCD)
S27/O27/CMPI51I/OSegment line (S27) or digital output port O27 group 7, can be used as a comparator input port CMPI
TCK4ITest clock. TCK is a clock input terminal for device programming and test.
TDI/VPP2ITest data input port. TDI/VPP is used as a data input terminal or an input for programming voltage.
TDO/TDI1I/OTest data output port. TDO/TDI is used as a data output terminal or as a data input during
TMS3ITest mode select. TMS is an input terminal for device programming and test.
TP0.021O/ZGeneral-purpose 3-state digital output port, bit 0 (timer/port)
TP0.122O/ZGeneral-purpose 3-state digital output port, bit 1 (timer/port)
TP0.223O/ZGeneral-purpose 3-state digital output port, bit 2 (timer/port)
TP0.324O/ZGeneral-purpose 3-state digital output port, bit 3( timer/port)
TP0.425O/ZGeneral-purpose 3-state digital output port, bit 4 (timer/port)
TP0.526I/O/Z General-purpose 3-state digital I/O pin, bit 5 (timer/port)
V
CC
V
SS
XBUF6OClock signal output of system clock (MCLK) or crystal clock (ACLK)
Xin11IInput terminal of crystal oscillator
Xout/TCLK12I/OOutput terminal of crystal oscillator or test clock input
†
MSP430P313/E313 not recommended for new designs – replaced by MSP430P315/E315.
8Supply voltage
7Ground reference
(timer/port)
programming.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
3
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
functional block diagram
MSP430C31 1S and MSP430P315S
XINXoutXBUFRST/NMI
VCCV
SS
P0.1–6
TDI/VPP
TDO/TDI
TMS
TCK
Oscillator
FLL
System Clock
CPU
Incl. 16 Reg.
Test
JTAG
ACLK
MCLK
MAB, 16 Bit
MDB, 16 Bit
2 kB
ROM
16 kB
OTP
C: ROM
P: OTP
Watchdog
Timer
15/16 Bit
128/512B
RAM
Bus
Conv
TP0.5
Power-On-
Reset
MAB, 4 Bit
MCB
MDB, 8 Bit
Timer/Port
Applications:
A/D Conv.
Timer, O/P
4
TP0.0–3
8-bit Timer/
Serial Protocol
CIN
Counter
Support
CMPI
Basic
Timer1
f
LCD
TXD
RXD
6
I/O Port
6 I/O’s, All With
Interr. Cap.
2 Int. Vectors
LCD
64 Segments
1, 2, 3, 4 MUX
R13R23
COM0–3
S2–16/O2–16
S27/O27/CMPI
4
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
I/O
DESCRIPTION
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
Terminal Functions
MSP430C311S, MSP430P315S
48-pin SSOP package
TERMINAL
NAMENO.
CIN24ICounter enable. CIN input enables counter (TPCNT1) (timer/port).
COM0–COM344–47OCommon output pins, COM0–COM3 are used for LCD back planes.
P0.1/RXD12I/OGeneral-purpose digital I/O pin, receive data input port – 8-Bit (timer/counter)
P0.2/TXD13I/OGeneral-purpose digital I/O pin, transmit data output port – 8-Bit (timer/counter)
P0.314I/OGeneral-purpose digital I/O pins, bit 3
P0.415I/OGeneral-purpose digital I/O pins, bit 4
P0.516I/OGeneral-purpose digital I/O pins, bit 5
P0.617I/OGeneral-purpose digital I/O pins, bit 6
R238IInput of second positive analog LCD level (V2) (LCD)
R139IInput of third positive analog LCD level (V3 of V4) (LCD)
RST/NMI4IReset input or nonmaskable interrupt input
S2/O2–S5/O525–28OSegment lines (S2 to S5) or digital output port O2 to O5, group 1 (LCD)
S6/O6–S9/O929–32OSegment lines (S6 to S9) or digital output port O6 to O9, group 2 (LCD)
S10/O10–S13/O1333–36OSegment lines (S10 to S13) or digital output port O10 to O13, group 3 (LCD)
S14/O14–S16/O1637–39OSegment lines (S14 to S17) or digital output port O14 to O17, group 4 (LCD)
S27/O27/CMPI43I/OSegment line (S27) or digital output port O27 group 7, can be used as a comparator input port CMPI
TCK3ITest clock. TCK is a clock input terminal for device programming and test.
TDI/VPP1ITest data input port. TDI/VPP is used as a data input terminal or an input for programming voltage.
TDO/TDI48I/OTest data output port. TDO/TDI is used as a data output terminal or as a data input during
TMS2ITest mode select. TMS is an input terminal for device programming and test.
TP0.019O/ZGeneral-purpose 3-state digital output port, bit 0 (timer/port)
TP0.120O/ZGeneral-purpose 3-state digital output port, bit 1 (timer/port)
TP0.221O/ZGeneral-purpose 3-state digital output port, bit 2 (timer/port)
TP0.322O/ZGeneral-purpose 3-state digital output port, bit 3 (timer/port)
TP0.523I/O/Z General-purpose 3-state digital I/O pin, bit 5 (timer/port)
V
CC
V
SS
XBUF5OClock signal output of system clock (MCLK) or crystal clock (ACLK)
Xin10IInput terminal of crystal oscillator
Xout/TCLK11I/OOutput terminal of crystal oscillator or test clock input
7Supply voltage
6, 41Ground references
(timer/port)
programming.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
5
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
short-form description
processing unit
The processing unit is based on a consistent and orthogonal designed CPU and instruction set. This design
structure results in a RISC-like architecture, highly transparent to the application development and
distinguishable by the ease of programming. All operations other than program-flow instructions are
consequently performed as register operations in conjunction with seven addressing modes for source and four
modes for destination operand.
CPU
Program Counter
Sixteen registers located inside the CPU provide
reduced instruction execution time. This reduces
Stack Pointer
a register-register operation execution time to one
cycle of the processor frequency.
Four registers are reserved for special use as a
Status Register
Constant Generator
program counter, a stack pointer , a status register,
and a constant generator. The remaining ones are
General-Purpose Register
available as general-purpose registers.
Peripherals connected to the CPU using a data
General-Purpose Register
address and control bus can be handled easily
with all instructions for memory manipulation.
instruction set
The instruction set for this register-register
General-Purpose RegisterR14
General-Purpose Register
architecture provides a powerful and easy-to-use
assembly language. The instruction set consists of 51 instructions with three formats and seven addressing
modes. Table 1 provides a summation and example of the three types of instruction formats; the addressing
modes are listed in Table 2.
Table 1. Instruction Word Formats
Dual operands, source-destination e.g. ADD R4, R5R4 + R5 → R5
Single operands, destination onlye.g. CALL R8PC → (TOS), R8 → PC
Relative jump, un-/conditionale.g. JNEJump-on equal bit = 0
PC/R0
SP/R1
SR/CG1/R2
CG2/R3
R4
R5
R15
Each instruction that operates on word and byte data is identified by the suffix B.
Examples:Instructions for word operationInstructions for byte operation
Computed branches (BR) and subroutine call (CALL) instructions use the same addressing modes as the other
instructions. These addressing modes provide
calls. The full use of this programming capability permits a program structure different from conventional 8- and
16-bit controllers. For example, numerous routines can easily be designed to deal with pointers and stacks
instead of using flag type programs for flow control.
operation modes and interrupts
indirect
addressing, ideally suited for computed branches and
The MSP430 operating modes support various advanced requirements for ultra low-power and ultra-low energy
consumption. This is achieved by the management of the operations during the different module operation
modes and CPU states. The requirements are fully supported during interrupt event handling. An interrupt event
awakens the system from each of the various operating modes and returns with the RETI instruction to the mode
that was selected before the interrupt event. The clocks used are ACLK and MCLK. ACLK is the crystal
frequency and MCLK , a multiple of ACLK, is used as the system clock.
The software can configure five operating modes:
D
Active mode (AM). The CPU is enabled with different combinations of active peripheral modules.
D
Low-power mode 0 (LPM0). The CPU is disabled, peripheral operation continues, ACLK and MCLK signals
are active, and loop control for MCLK is active.
D
Low-power mode 1 (LPM1). The CPU is disabled, peripheral operation continues, ACLK and MCLK signals
are active, and loop control for MCLK is inactive.
D
Low-power mode 2 (LPM2). The CPU is disabled, peripheral operation continues, ACLK signal is active,
and MCLK and loop control for MCLK are inactive.
D
Low-power mode 3 (LPM3). The CPU is disabled, peripheral operation continues, ACLK signal is active,
MCLK and loop control for MCLK are inactive, and the dc generator for the digital controlled oscillator (DCO)
(³MCLK generator) is switched off.
D
Low-power mode 4 (LPM4). The CPU is disabled, peripheral operation continues, ACLK signal is inactive
(crystal oscillator stopped), MCLK and loop control for MCLK are inactive, and the dc generator for the DCO
is switched off.
The special function registers (SFR) include module-enable bits that stop or enable the operation of the specific
peripheral module. All registers of the peripherals may be accessed if the operational function is stopped or
enabled. However, some peripheral current-saving functions are accessed through the state of local register
bits. An example is the enable/disable of the analog voltage generator in the LCD peripheral, which is turned
on or off using one register bit.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
7
MSP430x31x
P0.1IFG
Maskable
0FFF8h
12
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
operation modes and interrupts (continued)
The most general bits that influence current consumption and support fast turn-on from low power operating
modes are located in the status register (SR). Four of these bits control the CPU and the system clock generator:
SCG1, SCG0, OscOff, and CPUOff.
159870
Reserved For Future
Enhancements
rw-0rw-0rw-0rw-0rw-0rw-0rw-0rw-0rw-0rw-0
interrupt vector addresses
The interrupt vectors and the power-up starting address are located in the ROM with an address range of
0FFFFh-0FFE0h. The vector contains the 16-bit address of the appropriate interrupt handler instruction
sequence.
2. Timer/port interrupt flags are located in the timer/port registers
3. Non maskable: neither the individual nor the general interrupt enable bit will disable an interrupt event.
4. (Non) maskable: the individual interrupt enable bit can disable an interrupt event, but the general interrupt enable bit cannot.
VSCG1SCG0OscOffCPUOffGIENZC
WDTIFG (see Note 1)
NMIIFG (see Notes 1 and 3)
OFIFG (see Notes 1 and 4)
RC1FG, RC2FG, EN1FG
(see Note 2)
P0.27IFG (see Note 1)
Reset0FFFEh15, highest
Nonmaskable,
(Non)maskable
Maskable0FFEAh5
Maskable0FFE0h0, lowest
0FFFCh14
0FFF6h11
0FFF2h9
0FFF0h8
0FFEEh7
0FFECh6
0FFE8h4
0FFE6h3
0FFE4h2
8
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
special function registers
Most interrupt and module enable bits are collected into the lowest address space. Special function register bits
that are not allocated to a functional purpose are not physically present in the device. Simple software access
is provided with this arrangement.
interrupt enable 1 and 2
Address
0h
76540
WDTIE: Watchdog Timer enable signal
OFIE:Oscillator fault enable signal
P0IE.0:Dedicated I/O P0.0
P0IE.1:P0.1 or 8-Bit Timer/Counter, RXD
Address
01hBTIE
76540
321
P0IE.1OFIEWDTIE
rw-0rw-0rw-0rw-0
321
P0IE.0
TPIE
rw-0
TPIE: Timer/Port enable signal
BTIE: Basic Timer1 enable signal
interrupt flag register 1 and 2
Address
02hNMIIFGP0IFG.0
76540
rw-0rw-1rw-0
321
P0IFG.1OFIFGWDTIFG
rw-0rw-0
WDTIFG:Set on overflow or security key violation
OR
Reset on VCC power-on or reset condition at RST/NMI-pin
OFIFG:Flag set on oscillator fault
P0.0IFG:Dedicated I/O P0.0
P0.1IFG:P0.1 or 8-Bit Timer/Counter, RXD
NMIIFG:Signal at RST
Address
03hBTIFG
76540
rw
/NMI-pin
321
BTIFG:Basic Timer1 flag
module enable register 1 and 2
Address
04h
76540321
rw-0
Address
05h
Legendrw:
rw-0:
76540321
Bit can be read and written.
Bit can be read and written. It is reset by PUC
SFR bit is not present in device.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
9
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
memory organization
FFFFh
FFE0h
FFDFh
F800h
027Fh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
FFFFh
FFE0h
FFDFh
E000h
MSP430C31 1S
Int. Vector
2 kB ROM
128B RAM
16b Per.
8b Per.
SFR
MSP430P313
PMS430E313
Int. Vector
8 kB OTP
or
EPROM
MSP430C312
FFFFh
FFE0h
FFDFh
†
†
FFFFh
FFE0h
FFDFh
C000h
F000h
02FFh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
Int. Vector
4 kB ROM
256B RAM
16b Per.
8b Per.
SFR
MSP430P315
MSP430P315S
PMS430E315
Int. Vector
16 kB
OTP
or
EPROM
FFFFh
FFE0h
FFDFh
E000h
02FFh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
MSP430C313
Int. Vector
8 kB ROM
256B RAM
16b Per.
8b Per.
SFR
FFFFh
FFE0h
FFDFh
D000h
03FFh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
MSP430C314
Int. Vector
12 kB ROM
512B RAM
16b Per.
8b Per.
SFR
FFFFh
FFE0h
FFDFh
C000h
03FFh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
MSP430C315
Int. Vector
16 kB ROM
512B RAM
16b Per.
8b Per.
SFR
03FFh
512B RAM
02FFh
01FFh
00FFh
000Fh
†
MSP430P313/E313 not recommended for new designs – replaced by MSP430P315/E315.
0200h
0100h
0010h
0000h
256B RAM
16b Per.
8b Per.
SFR
10
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
16b Per.
8b Per.
SFR
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
peripherals
Peripherals connected to the CPU through a data, address, and control busses can be handled easily with
instructions for memory manipulation.
oscillator and system clock
Two clocks are used in the system: the system (master) clock (MCLK) and the auxiliary clock (ACLK). The MCLK
is a multiple of the ACLK. The ACLK runs with the crystal oscillator frequency . The special design of the oscillator
supports the feature of low current consumption and the use of a 32 768 Hz crystal. The crystal is connected
across two terminals without requiring any other external components.
The oscillator starts after applying VCC, due to a reset of the control bit (OscOff) in the status register (SR). It
can be stopped by setting the OscOff bit to a 1. The enabled clock signals ACLK, ACLK/2, ACLK/4, or MCLK
are accessible for use by external devices at output terminal XBUF.
The controller system clock has to operate with different requirements according to the application and system
conditions. Requirements include:
•High frequency in order to react quickly to system hardware requests or events
•Low frequency in order to minimize current consumption, EMI, etc.
•Stable frequency for timer applications e.g. real-time clock (RTC)
•Enable start-stop operation with a minimum delay
These requirements cannot all be met with fast frequency high-Q crystals or with RC-type low-Q oscillators. The
compromise selected for the MSP430 uses a low-crystal frequency , which is multiplied to achieve the desired
nominal operating range:
f
(system)
The crystal frequency multiplication is achieved with a frequency locked loop (FLL) technique. The factor N is
set to 31 after a power-up clear condition. The FLL technique, in combination with a digital controlled oscillator
(DCO), provides immediate start-up capability together with long-term crystal stability . The frequency variation
of the DCO with the FLL inactive is typically 330 ppm, which means that with a cycle time of 1 µs, the maximum
possible variation is 0.33 ns. For more precise timing, the FLL can be used. This forces longer cycle times if
the previous cycle time was shorter than the selected one. This switching of cycle times makes it possible to
meet the chosen system frequency over a long period of time.
The start-up operation of the system clock depends on the previous machine state. During a power-up clear
(PUC), the DCO is reset to its lowest possible frequency. The control logic starts operation immediately after
removal of the PUC condition. Correct operation of the FLL control logic requires the presence of a stable crystal
oscillator.
= (N+1) × f
(crystal)
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
11
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
peripherals (continued)
digital I/O
There is one eight-bit I/O port, Port0, that is implemented (MSP430C311S and MSP430P315S have six bits
available on external pins). Six control registers give maximum digital input/output flexibility to the application:
•All individual I/O bits are programmable independently.
•Any combination of input, output, and interrupt conditions is possible.
•Interrupt processing of external events is fully implemented for all eight bits of port P0.
•Provides read/write access to all registers with all instructions
The six registers are:
•Input register8 bitscontains information at the pins
•Output register8 bitscontains output information
•Direction register8 bitscontrols direction
•Interrupt flags6 bitsindicates if interrupt(s) are pending
•Interrupt edge select8 bitscontains input signal change necessary for interrupt
All these registers contain eight bits except for the interrupt flag register and the interrupt enable register. The
two least significant bits (LSBs) of the interrupt flag and interrupt enable registers are located in the special
functions register (SFR). Three interrupt vectors are implemented, one for Port0.0, one for Port0.1, and one
commonly used for any interrupt event on Port0.2 to Port0.7. The Port0.1 and Port0.2 pin function is shared with
the 8-bit timer/counter.
LCD drive
Liquid crystal displays (LCDs) for static, 2-, 3-, and 4-MUX operations can be driven directly . The controller LCD
logic operation is defined by software using memory-bit manipulation. LCD memory is part of the LCD module
and not part of the data memory . Eight mode and control bits define the operation and current consumption of
the LCD drive. The information for the individual digits can be easily obtained using table programming
techniques combined with the correct addressing mode. The segment information is stored in LCD memory
using instructions for memory manipulation.
The drive capability is mainly defined by the external resistor divider that supports the analog levels for 2-, 3-,
and 4-MUX operation. Groups of the LCD segment lines can be selected for digital output signals. The
MSP430x31x has four common signals and 23 segment lines. The MSP430C311S and MSP430P315S have
four common lines and 16 segment lines.
Timer/Port
The Timer/Port module has two 8-bit counters, an input that triggers one counter , and six digital outputs in the
MSP430x31x (MSP430C311S, MSP430C315S have five digital outputs available on external pins) with
high-impedance state capability. Both counters have an independent clock-selector for selecting an external
signal or one of the internal clocks (ACLK or MCLK). One counter has an extended control capability to halt,
count continuously, or gate the counter by selecting one of two external signals. This gate signal sets the
interrupt flag, if an external signal is selected, and the gate stops the counter.
Both timers can be read from and written to by software. The two 8-bit counters can be cascaded to a 16-bit
counter. A common interrupt vector is implemented. The interrupt flag can be set from three events in the 8-bit
counter mode (gate signal, overflow from the counters) or from two events in the 16-bit counter mode (gate
signal, overflow from the MSB of the cascaded counter).
12
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
peripherals (continued)
slope A/D conversion
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
Slope A/D conversion is accomplished with the timer/port module using external resistor(s) for reference (R
external resistor(s) to the measured (R
by software in such a way that the internal counter measures the time that is needed to charge or discharge
the capacitor. The reference resistor’s (R
unknown resistors (R
value (R
resistive sensor values that correspond to the physical data, for example temperature, when an NTC or PTC
resistor is used.
Basic Timer1
The Basic Timer1 (BT1) divides the frequency of MCLK or ACLK, as selected with the SSEL bit, to provide low
frequency control signals. This is done within the system by one central divider, the basic timer1, to support low
current applications. The BTCTL control register contains the flags which controls or selects the different
operational functions. When the supply voltage is applied or when a reset of the device (RST/NMI pin), a
watchdog overflow, or a watchdog security key violation occurs, all bits in the register hold undefined or
unchanged status. The user software usually configures the operational conditions on the BT1 during
initialization.
The Basic Timer1 has two 8 bit timers which can be cascaded to a 16 bit timer. Both timers can be read and
written by software. Two bits in the SFR address range handle the system control interaction according to the
function implemented in the Basic Timer1. These two bits are the Basic T imer1 interrupt flag (BTIFG) and the
basic timer interrupt enable (BTIE) bit.
Watchdog Timer
The primary function of the Watchdog Timer (WDT) module is to perform a controlled system restart after a
software problem has occurred. If the selected time interval expires, a system reset is generated. If this
watchdog function is not needed in an application, the module can work as an interval timer, which generates
an interrupt after the selected time interval.
) is the value of R
meas
) charge or discharge time is represented by N
meas
multiplied by the relative number of counts (N
ref
), and an external capacitor. The external components are driven
meas
) charge or discharge time is represented by N
ref
counts. The unknown resistor’s
meas
meas/Nref
). This value determines
counts. The
ref
ref
),
The Watchdog T imer counter (WDTCNT) is a 15/16-bit up-counter which is not directly accessible by software.
The WDTCNT is controlled using the Watchdog T imer control register (WDTCTL), which is a 16-bit read/write
register. W riting to WDTCTL, in both operating modes (watchdog or timer) is only possible by using the correct
password in the high-byte. The low-byte stores data written to the WDTCTL. The high-byte password is 05Ah.
If any value other than 05Ah is written to the high-byte of the WDTCTL, a system reset PUC is generated. When
the password is read its value is 069h. This minimizes accidental write operations to the WDTCTL register. In
addition to the Watchdog T imer control bits, there are two bits included in the WDTCTL which configure the NMI
pin.
8-Bit Timer/Counter
The 8-bit interval timer supports three major functions for the application:
•Serial communication or data exchange
•Pulse counting or pulse accumulation
•Timer
The 8-bit Timer/Counter peripheral includes the following major blocks: an 8-bit up-counter with
preload-register, an 8-bit control register, an input clock selector, an edge detection (e.g. start bit detection for
asynchronous protocols), and an input and output data latch, triggered by the carry-out-signal from the 8-bit
counter.
The 8-bit counter counts up with an input clock, which is selected by two control bits from the control register.
The four possible clock sources are MCLK, ACLK, the external signal from terminal P0.1, and the signal from
the logical AND of MCLK and terminal P0.1.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
13
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
8-Bit Timer/Counter (continued)
Two counter inputs (load, enable) control the counter operation. The load input controls load operations. A
write-access to the counter results in loading the content of the preload-register into the counter. The software
writes or reads the preload-register with all instructions. The preload-register acts as a buffer and can be written
immediately after the load of the counter is completed. The enable input enables the count operation. When
the enable signal is set to high, the counter will count up each time a positive clock edge is applied to the clock
input of the counter.
Serial protocols, like UART protocol, need start-bit edge-detection to determine, at the receiver, the start of a
data transmission. When this function is activated, the counter starts counting after start-bit condition is
detected. The first signal level is sampled into the RXD input data-latch after completing the first timing interval,
which is programmed into the counter. T wo latches used for input and output data (RXD_FF and TXD_FF) are
clocked by the counter after the programmed timing interval has elapsed.
UART
The serial communication is realized by using software and the 8-bit timer/counter hardware. The hardware
supports the output of the serial data stream, bit-by-bit, with the timing determined by the counter. The
software/hardware interface connects the mixed signal controller to external devices, systems, or networks.
peripheral file map
PERIPHERALS WITH WORD ACCESS
WatchdogWatchdog Timer controlWDTCTL0120h
PERIPHERALS WITH BYTE ACCESS
EPROMEPROM controlEPCTL054h
Crystal bufferCrystal buffer controlCBCTL053h
System clockSCG frequency control
SCG frequency integrator
SCG frequency integrator
Timer /PortTimer/Port enable
Timer/Port data
Timer/Port counter2
Timer/Port counter1
Timer/Port control
8-Bit Timer/Counter8-Bit Timer/Counter data
8-Bit Timer/Counter preload
8-Bit Timer/Counter control
Basic Timer1Basic Timer/Counter2
Basic Timer/Counter1
Basic Timer control
LCDLCD memory 15
:
LCD memory1
LCD control & mode
Port P0Port P0 interrupt enable
Port P0 interrupt edge select
Port P0 interrupt flag
Port P0 direction
Port P0 output
Port P0 input
Stresses beyond those listed under “absolute maximum ratings” may cause permanent damage to the device. These are stress ratings only, and
functional operation of the device at these or any other conditions beyond those indicated under “recommended operating conditions” is not
implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.
8. All timer/port pins TP0.0 to TP0.5 are Hi-Z. Pins CIN and TP .0 to TP0.5 are connected together during leakage current measurement.
In the leakage measurement the input CIN is included. The input voltage is VSS or VCC.
9. The port pin must be selected for input and there must be no optional pullup or pulldown resistor.
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
Timer/port:V
VCC = 3 V/5 V,
S27
Port P0: P0.x, 0 ≤×≤ 7,
(see Note 9)
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
TP0.x,
= VSS to VCC,VCC = 3 V/5 V±50nA
CIN = VSS, VCC,
(see Note 8)
VCC = 3 V/5 V,
±50nA
±50nA
17
MSP430x31x
yg
(system)
High level or low level time
t
Duty cycle of clock output frequenc
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
electrical characteristics over recommended operating free-air temperature range (unless
otherwise noted) (continued)
optional resistors, individually programmable with ROM code, P0.x, (see Note 10)
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
R
(opt1)
R
(opt2)
R
(opt3)
R
(opt4)
R
(opt5)Resistors, individually programmable with ROM code, all port pins,
R
(opt6)
R
(opt7)
R
(opt8)
R
(opt9)
R
(opt10)
NOTE 10: Optional resistors R
values applicable for pulldown and pullup
for pull-down or pull-up are not programmed in standard OTP/EPROM devices P/E313 (MSP430P313/E313
not recommended for new designs – replaced by MSP430P315/E315) and P/E315(s)
optx
inputs P0.x, CIN, TP.5; output XBUF
PARAMETERTEST CONDITIONSVCCMINNOMMAXUNIT
Port P0
t
(int)
f
(IN)
t
or t
(H)
t
or t
(H)
f
(XBUF)
(Xdc)
NOTES: 11. The external signal sets the interrupt flag every time t
External interrupt timing
Input frequency
(L)
(L)
Clock output frequencyXBUF, CL = 20 pF3 V/5 Vf
p
to set the flag must be met independently from this timing constraint. T
12. The external interrupt signal cannot exceed the maximum inut frequency (f
External trigger signal for the
interrupt flag, (see Notes 11 and 12)
P0.x, CIN, TP.5
XBUF, CL = 20 pF,
f
= 1.1 MHz3V/5V40%
y
(MCLK)
f
= f
(XBUF)
f
= f
(XBUF)
is met. It may be set even with trigger signals shorter than t
int
crystal oscillator, Xin, Xout
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
C
(Xin)
C
(Xout)
Integrated capacitance at inputVCC = 3 V/5 V12pF
Integrated capacitance at outputVCC = 3 V/5 V12pF
electrical characteristics over recommended operating free-air temperature range (unless
otherwise noted)
LCD
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
V
23
V
13
V
O(HLCD)
V
O(LLCD)
I
I(R13)
I
I(R23)
r
to S
o(R13)
r
to S
o(R23)
NOTE 13: I
(IRxx)
Output 1 (HLCD)I
Output 0 (LLCD)I
Input leakage
(see Note 13)
(XX)
(XX)
p
is measured with no load on the segment or common LCD I/O pins.
comparator (Timer/Port)
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
(com)
V
ref(com)
com
p
Internal reference voltage at (–) terminalCPON = 1VCC = 3 V/5 V0.230×V
p
Voltage at R23VCC = 3 V/5 V
Voltage at R13VCC = 3 V/5 V
<= 10 nAVCC–0.125V
(HLCD)
<= 10 nA
(LLCD)
R13 = VCC/3
R23 = 2 VCC/3
= –3 µA,
(SXX)
p
p
=
=
= 3
CC
= 3
CC
VCC = 3 V250350
VCC = 5 V450600
VCC = 3 V537
VCC = 5 V1042
V
SS
(VCC–VSS)×
2/3+V
(VCC–VSS) ×
1/3+V
0.25×V
CC
SS
SS
CC
CC
VSS+0.125
0.260×V
CC
V
V
µ
V
RAM
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
V
RAMh
NOTE 14: This parameter defines the minimum supply voltage when the data in the program memory RAM remains unchanged. No program
CPU halted (see Note 14)1.8V
execution should happen during this supply voltage condition.
PUC/POR
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
t
(POR_delay)
V
(POR)
V
(min)
t
(reset)
TA = –40°C1.52.4V
POR
PUC/PORReset is accepted internally2µs
TA = 25°C
TA = 85°C
CC
= 3
150250µs
1.22.1V
0.91.8V
00.4V
20
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
f
6
()
f
6
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
V
VCC
V
(POR)
No POR
2.1
POR
t
V
(min)
POR
Figure 4. Power-On Reset (POR) vs Supply Voltage
3
2.4
2.5
2
1.5
V POR [V]
1
0.5
0
–40–20020406080
wakeup from LPM3
t
(LPM3)
Delay time
1.8
1.5
1.2
25°C
Temperature [°C]
Figure 5. V
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
vs Temperature
(POR)
= 1 MHz
= 2 MHz
f = 3 MHzVCC = 5 V6
VCC = 3 V
VCC = 5 V
VCC = 3 V
VCC = 5 V
0.9
µs
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
21
MSP430x31x
f
TCK frequenc
MH
JTAG/Test
()
V
(see
8)
(see Note 18)
EPROM (E)
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
electrical characteristics over recommended operating free-air temperature range (unless
otherwise noted)
JT AG, program memory
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
(TCK)
R
(TEST)
V
(FB)
JTAG/Fuse (see Note 16)
I
(FB)
t
(FB)
(PP)
I
(PP)
t
(pps)
t
(ppf)
P
n
t
(erase)
NOTES: 15. The TMS and TCK pullup resistors are implemented in all ROM(C) and EPROM(E) versions.
P313, E313Programming voltage, applied to TDI/VPP1111.513V
P315(S), E315Programming voltage, applied to TDI/VPP1212.513V
EPROM (E) and OTP(P) –
versions only
Note 1
16. Once the JTAG fuse is blown no further access to the MSP430 JTAG/test feature is possible.
17. The voltage supply to blow the JTAG fuse is applied to TDI/VPP pin when fuse blowing is desired.
18. Refer to the Recommended Operating Conditions for the correct VCC during programing.
Pullup resistors on TMS, TCK, TDI
(see Note 15)
Fuse blow voltage, C versions (see Note 15)VCC = 3 V/ 5 V5.56
Fuse blow voltage, E/P versions
(see Note 17)
Supply current on TDI/VPP to blow fuse100mA
Time to blow the fuse1ms
Current from programming voltage source70mA
Programming time, single pulse5ms
Programming time, fast algorithm100µs
Pulses for successful programming4100 Pulses
Erase time wave length 2537 Å at 15 Ws/cm
(UV lamp of 12 mW/ cm2)
Write/erase cycles1000cycles
Data retention TJ < 55°C10years
y
VCC = 3 VDC5
VCC = 5 VDC10
VCC = 3 V/ 5 V256090kΩ
VCC = 3 V/ 5 V1112
2
30min
z
V
22
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
TYPICAL CHARACTERISTICS
JTAG fuse check mode
MSP430 devices that have the fuse on the TDI/VPP terminal have a fuse check mode that tests the continuity
of the fuse the first time the JT AG port is accessed after a power-on reset (POR). When activated, a fuse check
current, ITF, of 1 mA at 3 V, 2.5 mA at 5 V can flow from the TDI/VPP pin to ground if the fuse is not burned.
Care must be taken to avoid accidentally activating the fuse check mode and increasing overall system power
consumption.
Activation of the fuse check mode occurs with the first negative edge on the TMS pin, after power up, or if the
TMS is being held low after power-up. The second positive edge on the TMS pin deactivates the fuse check
mode. After deactivation, the fuse check mode remains inactive until another POR occurs. After each POR the
fuse check mode has the potential to be activated.
Care must be taken to avoid accidentally activating the fuse check mode, including guarding against EMI/ESD
spikes that could cause signal edges on the TMS pin.
Configuration of TMS, TCK, TDI/VPP and TDO/TDI pins in applications.
NOTES: A. All linear dimensions are in inches (millimeters).
B. This drawing is subject to change without notice.
C. Body dimensions do not include mold flash or protrusion not to exceed 0.006 (0,15).
D. Falls within JEDEC MO-118
MSP430P313/E313 not recommended for new designs – replaced by MSP430P315/E315.
28
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430x31x
MIXED SIGNAL MICROCONTROLLERS
SLAS165D – FEBRUARY 1998 – REVISED APRIL 2000
MECHANICAL DATA
FZ (S-CQCC-J**) J-LEADED CERAMIC CHIP CARRIER
28 LEAD SHOWN
0.040 (1,02) 45°
5
AB
11
12
A
B
1426
18
0.180 (4,57)
0.155 (3,94)
0.140 (3,55)
0.120 (3,05)
25
0.032 (0,81)
0.026 (0,66)
19
0.025 (0,64) R TYP
Seating Plane
0.050 (1,27)
C
(at Seating
Plane)
0.020 (0,51)
0.014 (0,36)
0.040 (1,02) MIN
0.120 (3,05)
0.090 (2,29)
NO. OFJEDEC
OUTLINE
MO-087AA
MO-087AB
MO-087AC
NOTES: A. All linear dimensions are in inches (millimeters).
B. This drawing is subject to change without notice.
C. This package can be hermetically sealed with a ceramic lid using glass frit.
PINS**
28
44
52
68MO-087AD
MINMAX
0.485
(12,32)(12,57)
A
0.495
BC
0.430
MAXMIN
0.455
(11,56)(10,92)
MINMAX
0.410
(10,41)(10,92)
0.430
0.6300.6100.6300.6550.6950.685
(16,00)(15,49)(16,00)(16,64)(17,65)(17,40)
0.7400.6800.7300.7650.7950.785
(18,79)(17,28)(18,54)(19,43)(20,19)(19,94)
0.9300.9100.9300.9550.9950.985
(23,62)(23,11)(23,62)(24,26)(25,27)(25,02)
4040219/B 03/95
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
29
IMPORTANT NOTICE
T exas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue
any product or service without notice, and advise customers to obtain the latest version of relevant information
to verify, before placing orders, that information being relied on is current and complete. All products are sold
subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those
pertaining to warranty, patent infringement, and limitation of liability.
TI warrants performance of its semiconductor products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent
TI deems necessary to support this warranty . Specific testing of all parameters of each device is not necessarily
performed, except those mandated by government requirements.
Customers are responsible for their applications using TI components.
In order to minimize risks associated with the customer’s applications, adequate design and operating
safeguards must be provided by the customer to minimize inherent or procedural hazards.
TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent
that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other
intellectual property right of TI covering or relating to any combination, machine, or process in which such
semiconductor products or services might be or are used. TI’s publication of information regarding any third
party’s products or services does not constitute TI’s approval, warranty or endorsement thereof.
Copyright 2000, Texas Instruments Incorporated
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.