EPROM Version Available for Prototyping:
PMS430E337A
D
Available in the following packages:
100 Pin Quad Flat-Pack (QFP),
100 Pin Ceramic Quad Flat-Pack (CFP)
(EPROM Version)
The T exas Instruments MSP430 is an ultra-low power mixed signal microcontroller family consisting of several
devices which features different sets of modules targeted to various applications. The controller is designed to
be battery operated for an extended application lifetime. With the 16-bit RISC architecture, 16 integrated
registers on the CPU, and a constant generator, the MSP430 achieves maximum code efficiency. The
digital-controlled oscillator, together with the frequency lock loop (FLL), provides a wake up from a low-power
mode to an active mode in less than 6 ms. The MSP430x33x series micro-controllers have built in hardware
multiplication and communication capability using asynchronous (UART) and synchronous protocols.
Typical applications of the MSP430 family include electronic gas, water, and electric meters and other sensor
systems that capture analog signals, converts them to digital values, processes, displays, or transmits them to
a host system.
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.
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.
CIN2IInput port. CIN is used as an enable for counter TPCNT1 – (Timer/Port).
COM0–356–53OCommon outputs. COM0-3 are used for LCD backplanes – LCD
P0.09I/OGeneral-purpose digital I/O
P0.1/RXD10I/OGeneral-purpose digital I/O, receive digital Input port – 8-bit Timer/Counter
P0.2/TXD11I/OGeneral-purpose digital I/O, transmit data output port – 8-bit Timer/Counter
P0.3–P0.712–16I/OFive general-purpose digital I/Os, bit 3-7
P1.0–P1.717–24I/OEight general-purpose digital I/Os, bit 0-7
P2.0–P2.725–27,
31–35
P3.0, P3.136,37I/OTwo general-purpose digital I/Os, bit 0 and bit 1
P3.2/TACLK38I/OGeneral-purpose digital I/O, clock input – Timer_A
P3.3/TA039I/OGeneral-purpose digital I/O, capture I/O, or PWM output port – Timer_A CCR0
P3.4/TA140I/OGeneral-purpose digital I/O, capture I/O, or PWM output port – Timer_A CCR1
P3.5/TA241I/OGeneral-purpose digital I/O, capture I/O, or PWM output port – Timer_A CCR2
P3.6/TA342I/OGeneral-purpose digital I/O, capture I/O, or PWM output port – Timer_A CCR3
P3.7/TA443I/OGeneral-purpose digital I/O, capture I/O, or PWM output port – Timer_A CCR4
P4.044I/OGeneral-purpose digital I/O, bit 0
P4.145I/OGeneral-purpose digital I/O, bit 1
P4.2/STE46I/OGeneral-purpose digital I/O, slave transmit enable – USART/SPI mode
P4.3/SIMO47I/OGeneral-purpose digital I/O, slave in/master out – USART/SPI mode
P4.4/SOMI48I/OGeneral-purpose digital I/O, master in/slave out – USART/SPI mode
P4.5/UCLK49I/OGeneral-purpose digital I/O, external clock input – USART
P4.6/UTXD50I/OGeneral-purpose digital I/O, transmit data out – USART/UART mode
P4.7/URXD51I/OGeneral-purpose digital I/O, receive data in – USART/UART mode
R0388IInput port of fourth positive (lowest) analog LCD level (V5) – LCD
R1389IInput port of third most positive analog LCD level (V3 of V4) – LCD
R2390IInput port of second most positive analog LCD level (V2) – LCD
R3391OOutput of most positive analog LCD level (V1) – LCD
RST/NMI96IReset input or non-maskable interrupt input port
S057OSegment line S0 – LCD
S158OSegment line S1 – LCD
S2/O2–S5/O559–62OSegment lines S2 to S5 or digital output ports, O2-O5, group 1 – LCD
S6/O6–S9/O963–66OSegment lines S6 to S9 or digital output ports O6-O9, group 2 – LCD
S10/O10–S13/O1367–70OSegment lines S10 to S13 or digital output ports O10-O13, group 3 – LCD
S14/O14–S17/O1771–74OSegment lines S14 to S17 or digital output ports O14-O17, group 4 – LCD
S18/O18–S21/O2175–78OSegment lines S18 to S21 or digital output ports O18-O21, group 5 – LCD
S22/O22–S25/O2579, 81–83OSegment line S22 to S25 or digital output ports O22-O25, group 6 – LCD
S26/O26–S29/O29/CMPI84–87OSegment line S26 to S29 or digital output ports O26-O29, group 7 – LCD. Segment line S29
TCK95ITest clock. TCK is the clock input port for device programming and test
TDI/VPP93ITest data input. TDI/VPP is used as a data input port or input for programming voltage
I/OEight general-purpose digital I/Os, bit 0-7
can be used as comparator input port CMPI – Timer/Port
4
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
I/O
DESCRIPTION
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227 – OCTOBER 1999
Terminal Functions
TERMINAL
NAMENO.
TMS94ITest mode select. TMS is used as an input port for device programming and test
TDO/TDI92I/OTest data output port. TDO/TDI data output or programming data input terminal
TP0.03OGeneral-purpose 3-state digital output port, bit 0 – Timer/Port
TP0.14OGeneral-purpose 3-state digital output port, bit 1 – Timer/Port
TP0.25OGeneral-purpose 3-state digital output port, bit 2 – Timer/Port
TP0.36OGeneral-purpose 3-state digital output port, bit 3 – Timer/Port
TP0.47OGeneral-purpose 3-state digital output port, bit 4 – Timer/Port
TP0.58I/OGeneral-purpose 3-state digital input/output port, bit 5 – Timer/Port
VCC11Positive supply voltage
VCC229Positive supply voltage
VSS1100Ground reference
VSS228Ground reference
VSS352Ground reference
XBUF97OSystem clock (MCLK) or crystal clock (ACLK) output
Xin99IInput port for crystal oscillator
Xout/TCLK98I/OOutput terminal of crystal oscillator or test clock input
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 is
distinguished due to ease of programming. All operations, other than program-flow instructions consequently
are performed as register operations in conjunction with seven addressing modes for source and four modes
for destination operand.
CPU registers
Sixteen registers are located inside the CPU,
providing reduced instruction execution time. This
reduces a register-register operation execution
time to one cycle of the processor frequency.
Four of the registers are reserved for special use
as a program counter, a stack pointer, a status
register and a constant generator. The remaining
registers are available as general purpose
registers.
Peripherals are connected to the CPU using a
data address and control bus and can be handled
easily with all instructions for memory manipulation.
Program Counter
Stack Pointer
Status Register
Constant Generator
General Purpose Register
General Purpose Register
General Purpose RegisterR14
PC/R0
SP/R1
SR/CG1/R2
CG2/R3
R4
R5
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
General Purpose Register
R15
5
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227 – OCTOBER 1999
instruction set
The instruction set for this register-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.
T able 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
Instructions that can operate on both word and byte data are differentiated by the suffix .B when a byte operation
is required.
Examples:Instructions for word operation:Instructions for byte operation:
Computed branches (BR) and subroutine calls (CALL) instructions use the same addressing modes as the other
instructions. These addressing modes provide
indirect
addressing, ideally suited for computed branches and
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.
6
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227 – OCTOBER 1999
operation modes and interrupts
The MSP430 operating modes support various advanced requirements for ultra-low power and ultra-low energy
consumption. This is achieved by the intelligent 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 is a multiple of ACLK and is used as the system clock.
The following five operating modes are supported:
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 (LMP2). 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 (LMP3). 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 (LMP4). 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.
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
interrupts
Software determines the activation of interrupts through the monitoring of hardware set interrupt flag status bits,
the control of specific interrupt enable bits in SRs, the establishment of interrupt vectors, and the programming
of interrupt handlers. The interrupt vectors and the power-up starting address are located in ROM address
locations 0FFFFh through 0FFE0h. Each vector contains the 16-bit address of the appropriate interrupt handler
instruction sequence. Table 3 provides a summation of interrupt functions and addresses.
Watchdog TimerWDTIFGMaskable0FFF4h10
Timer_ACCIFG0 (see Note 3)Maskable0FFF2h9
Timer_ATAIFG (see Note 3)Maskable0FFF0h8
UART receiveURXIFGMaskable0FFEEh7
UART transmitUTXIFGMaskable0FFECh6
I/O port P2P2IFG.07 (see Note 2)Maskable0FFE6h3
I/O port P1P1IFG.07 (see Note 2)Maskable0FFE4h2
Basic Timer1BTIFGMaskable0FFE2h1
I/O port P0.2 – P0.7P0IFG.27 (see Note 2)Maskable0FFE0h0, lowest
NOTES: 2. Multiple source flags
3. Interrupt flags are located in the individual module registers.
4. Non-maskable : neither the individual or the general interrupt enable bit will disable an interrupt event.
5. (Non)-maskable: the individual interrupt enable bit can disable an interrupt event, but the general interrupt enable bit cannot.
NMIIFG (see Notes 2 and 4)
OFIFG (see Notes 2 and 5)
RC1FG, RC2FG, EN1FG
(see Note 3)
Non-maskable
(Non)-maskable
Maskable0FFF6h11
0FFFCh14
0FFEAh5
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
321
P0IE.1OFIEWDTIE
rw-0 rw-0 rw-0 rw-0
P0IE.0
WDTIE:Watchdog Timer interrupt enable signal
OFIE:Oscillator fault interrupt enable signal
P0IE.0:Dedicated I/O P0.0 interrupt enable signal
P0IE.1:P0.1 or 8-bit Timer/Counter, RXD interrupt enable signal
Address
01hBTIE
76540
rw-0
321
TPIEUTXIEURXIE
rw-0 rw-0 rw-0
URXIE:USART receive interrupt enable signal
UTXIE:USART transmit interrupt enable signal
TPIE:Timer/Port interrupt enable signal
BTIE:Basic Timer1 interrupt enable signal
8
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MIXED SIGNAL MICROCONTROLLERS
interrupt flag registers 1 and 2
Address
02hNMIIFGP0IFG.0
76540
321
P0IFG.1OFIFGWDTIFG
MSP430C33x, MSP430P337A
SLAS227 – OCTOBER 1999
WDTIFG:Set on overflow or security key violation
or
Reset on VCC1 power-on or reset condition at RST/NMI-pin
OFIFG:Flag set on oscillator fault
P0IFG.0:Dedicated I/O P0.0
P0IFG.1:P0.1 or 8-bit Timer/Counter, RXD
NMIIFG:Signal at RST
Address
03hBTIFG
76540
rw
/NMI-pin
URXIFG:USART receive flag
UTXIFG:USART transmit flag
BTIFG:Basic Timer1 flag