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 Texas Instruments MSP430 is an ultralow-power mixed signal microcontroller family consisting of several
devices featuring 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 ef ficiency. 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 microcontrollers 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, convert them to digital values, process, displays, or transmits data to a
host system.
AVAILABLE OPTIONS
PACKAGED DEVICES
T
A
°
–
°
°
PLASTIC QFP
(PJM)
MSP430C336IPJM
MSP430P337AIPJM
—
CERAMIC QFP
(HFD)
—
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.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
Copyright 2000, Texas Instruments Incorporated
1
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
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
MSP430C33x, MSP430P337A
I/O
DESCRIPTION
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
Terminal Functions (Continued)
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
V
CC1
V
CC2
V
SS1
V
SS2
V
SS3
XBUF97OSystem clock (MCLK) or crystal clock (ACLK) output
Xin99IInput port for crystal oscillator
Xout/TCLK98I/OOutput terminal of crystal oscillator or test clock input
1Positive supply voltage
29Positive supply voltage
100Ground reference
28Ground reference
52Ground reference
detailed 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, which is
distinguished by 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
The CPU has sixteen registers that provide
reduced instruction execution time. This reduces
the register-to-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
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
detailed description (continued)
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.
Table 1 provides a summation and example of the three types of instruction formats; the address modes are
listed in Table 2.
Table 1. Instruction Word Formats
Dual operands, source-destinatione.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 address 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
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
operation modes and interrupts
The MSP430 operating modes support various advanced requirements for ultralow-power and ultralow-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, a multiple of ACLK, 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 (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.
The most general bits that influence current consumption and support fast turnon 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
operation modes and interrupts (continued)
interrupt flag registers 1 and 2
Address
02hNMIIFGP0IFG.0
76540
321
P0IFG.1OFIFGWDTIFG
MSP430C33x, MSP430P337A
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
WDTIFG:Set on overflow or security key violation
or
Reset on VCC1 power-on or reset condition at RST
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/NMI-pin
Address
03hBTIFG
76540
rw
URXIFG:USART receive flag
UTXIFG:USART transmit flag
BTIFG:Basic Timer1 flag
Bit 1: USART mode: USART transmit enable, UTXE
SPI mode: not applicable
Legendrw:
rw-0:
Bit can be read and written
Bit can be read and written. It is reset by PUC.
SFR bit not present in device
rw-0 rw-0
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
9
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
ROM memory organization
FFFFh
FFE0h
FFDFh
A000h
05FFh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
MSP430C336
Int. Vector
24 kB ROM
1024B RAM
16b Per.
8b Per.
SFR
FFFFh
FFE0h
FFDFh
8000h
05FFh
0200h
01FFh
0100h
00FFh
0010h
000Fh
0000h
MSP430C337
Int. Vector
32 kB ROM
1024B RAM
16b Per.
8b Per.
SFR
FFFFh
FFE0h
FFDFh
05FFh
01FFh
00FFh
000Fh
8000h
0200h
0100h
0010h
0000h
MSP430P337A
PMS430E337A
Int. Vector
32 kB OTP
or
EPROM
1024B RAM
16b Per.
8b Per.
SFR
peripherals
Peripherals that are connected to the CPU through a data, address, and controls bus 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 any other external components required.
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 clocks have to deal with different requirements according to the application and system
condition. Requirements include:
D
High frequency in order to react quickly to system hardware requests or events
D
Low frequency in order to minimize current consumption, EMI, etc.
D
Stable frequency for timer applications e.g., real-time clock (RTC)
D
Enable start-stop operation with minimum delay to operation function
These requirements cannot all be met with fast frequency high-Q crystals or with RC-type low-Q oscillators. This
compromise and selected for the MSP430, uses a low-crystal frequency, which is multiplied to achieve the
desired nominal operating range:
f
(system)
+(N)1)
f
(crystal)
10
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
oscillator and system clock (continued)
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, which 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 PUC, the DCO
is reset to its lowest possible frequency . The control logic starts operation immediately after recognition of PUC.
multiplication
The multiplication operation is supported by a dedicated peripheral module. The module performs 16x16, 16x8,
8x16, and 8x8 bit operations. The module is capable of supporting signed and unsigned multiplication as well
as signed and unsigned multiply and accumulate operations. The result of an operation can be accessed
immediately after the operands have been loaded into the peripheral registers. No additional clock cycles are
required.
digital I/O
Five eight-bit I/O ports (P0 thru P4) are implemented. Port P0 has six control registers, P1 and P2 have seven
control registers, and P3 and P4 modules have four control registers to give maximum flexibility of digital
input/output to the application:
D
Individual I/O bits are independently programmable.
D
Any combination of input, output, and interrupt conditions is possible.
D
Interrupt processing of external events is fully implemented for all eight bits of the P0, P1, and P2 ports.
D
Read/write access is available to all registers by all instructions.
The seven registers are:
D
Input registercontains information at the pins
D
Output registercontains output information
D
Direction registercontrols direction
D
Interrupt edge selectcontains input signal change necessary for interrupt
D
Interrupt flagsindicates if interrupt(s) are pending
D
Interrupt enable contains interrupt enable pins
D
Function selectdetermines if pin(s) used by module or port
These registers contain eight bits each with the exception of the interrupt flag register and the interrupt enable
register which are 6 bits each. The two least significant bit (LSBs) of the interrupt flag and enable registers are
located in the special function register (SFR). Five interrupt vectors are implemented, one for Port P0.0, one
for Port P0.1, one commonly used for any interrupt event on Port P0.2 to Port P0.7, one commonly used for any
interrupt event on Port P1.0 to Port P1.7, and one commonly used for any interrupt event on Port P2.0 to Port
P2.7.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
11
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
LCD drive
The liquid crystal displays (LCDs) for static, 2-, 3-, and 4-MUX operation can be driven directly . The operation
of the controller LCD logic is defined by software through memory-bit manipulation. The LCD memory is part
of the LCD module, not part of 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 proper addressing mode. The segment information is stored into
LCD memory using instructions for memory manipulation.
The drive capability is defined by the external resistor divider that supports analog levels for 2-, 3-, and 4-MUX
operation. Groups of the LCD segment lines can be selected for digital output signals. The MSP430x33x
configuration has four common lines, 30 segment lines, and four terminals for adjusting the analog levels.
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 T imer1, to support
low current applications. The BTCTL control register contains the flags which control or select the different
operational functions. When the supply voltage is applied or when a reset of the device (RST
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 BT during
initialization.
/NMI pin), a
The Basic Timer1 has two eight bit timers which can be cascaded to a sixteen 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 Timer1 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 upset 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.
The Watchdog T imer counter (WDTCNT) is a 15/16-bit upcounter which is not directly accessible by software.
The WDTCNT is controlled using the Watchdog T imer control register (WDTCTL), which is an 8-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.
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 that configure the NMI
pin.
USART
The universal synchronous/asynchronous interface is a dedicated peripheral module which provides serial
communications. The USART supports synchronous SPI (3 or 4 pin) and asynchronous UART communications
protocols, using double buffered transmit and receive channels. Data streams of 7 or 8 bits in length can be
transferred at a rate determined by the program, or by a rate defined by an external clock. Low-power
applications are optimized by UART mode options which allow for the receipt of only the first byte of a complete
frame. The applications software then decides if the succeeding data is to be processed. This option reduces
power consumption.
When
Two dedicated interrupt vectors are assigned to the USAR T module, one for the receive and one for the transmit
channel.
12
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
Timer/Port
The Timer/Port module has two 8-Bit T imer/Counters, an input that triggers one counter , and six digital outputs
with 3-state capability . Both counters have an independent clock selector for selecting an external signal or one
of the internal clocks (ACLK or MCLK). One of the counters 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 to and written from by software. The two 8-Bit Timer/Counters can be cascaded to form
a 16-bit counter. A common interrupt vector is implemented. The interrupt flag can be set by three events in the
8-Bit Timer/Counter mode (gate signal or overflow from the counters) or by two events in the 16-bit counter mode
(gate signal or overflow from the MSB of the cascaded counter).
slope A/D conversion
Slope A/D conversion is accomplished with the Timer/Port module using external resistor(s) for reference (R
using external resistor(s) to the measured (R
), and an external capacitor. The external components are
meas
driven 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
The unknown resistors (R
resistor’s value R
is the value of R
meas
) charge or discharge time is represented by N
meas
multiplied by the relative number of counts (N
ref
) charge or discharge time is represented by N
ref
counts. The unknown
meas
meas/Nref
determines resistive sensor values that correspond to the physical data, for example temperature, when an NTC
or PTC resistor is used.
Timer_A
The Timer_A module (see Figure1) offers one sixteen bit counter and five capture/compare registers. The timer
clock source can be selected to come from an external source TACLK (SSEL=0), the ACLK (SSEL=1), or
MCLK (SSEL=2 or SSEL=3). The clock source can be divided by one, two, four, or eight. The timer can be fully
controlled (in word mode) since it can be halted, read, and written. It can be stopped or run continuously . It can
count up or count up/down using one compare block to determine the period. The five capture/compare blocks
are configured by the application software to run in either capture or compare mode.
The capture mode is primarily used to measure external or internal events with any combination of positive,
negative, or both edges of the clock. The clock can also be stopped in capture mode by software. One external
event (CCISx=0) per capture block can be selected. If CCISx=1, the ACLK is the capture signal; and if CCISx=2
or CCISx=3, software capture is chosen.
The compare mode is primarily used to generate timing for the software or application hardware or to generate
pulse-width modulated output signals for various purposes like D/A conversion functions or motor control. An
individual output module, which can run independently of the compare function or is triggered in several ways,
is assigned to each of the five capture/compare registers.
ref
counts.
ref
). This value
),
Two interrupt vectors are used by the Timer_A module. One individual vector is assigned to capture/compare
block CCR0 and one common interrupt vector is assigned to the timer and the other four capture/compare
blocks. The five interrupt events using the common vector are identified by an individual interrupt vector word.
The interrupt vector word is used to add an offset to the program counter to continue the interrupt handler
software at the correct location. This simplifies the interrupt handler and gives each interrupt event the same
interrupt handler overhead of 5 cycles.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
13
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
Timer_A (continued)
P3.2
MCLK
P3.3
ACLK
P3.4
ACLK
P3.5
ACLK
P3.6
ACLK
P3.7
ACLK
TACLK
ACLK
MCLK
INCLK
CCI0A
CCI0B
GND
V
CC
CCI1A
CCI1B
GND
V
CC
CCI2A
CCI2B
GND
V
CC
CCI3A
CCI3B
GND
V
CC
CCI4A
CCI4B
GND
V
CC
SSEL0SSEL1
0
1
2
3
ID1
CCIS00CCIS01
0
1
2
3
CCI0CCM00
CCIS10CCIS11
0
1
2
3
CCI1CCM10
CCIS20CCIS21
0
1
2
3
CCI2CCM20
CCIS30CCIS31
0
1
2
3
CCI3CCM30
CCIS40CCIS41
0
1
2
3
CCI4CCM40
32 kHz to 8 MHz
Timer Clock
Input
Divider
ID0
Capture
Mode
CCM01
Capture
Mode
CCM11
Capture
Mode
CCM21
Capture
Mode
CCM31
Capture
Mode
CCM41
15
CLK
POR/CLR
Capture
Capture
Capture
Capture
Capture
Data
16-Bit Timer
Carry/Zero
0
RC
15
Capture/Compare
Register CCR0
15
Comparator 0
15
Capture/Compare
Register CCR1
15
Comparator 1
15
Capture/Compare
Register CCR2
15
Comparator 2
15
Capture/Compare
Register CCR3
15
Comparator 3
15
Capture/Compare
Register CCR4
15
Comparator 4
Mode
Control
MC1MC0
16-Bit Timer
Equ0
Set_TAIFG
Capture/Compare Register CCR0Timer Bus
0
0
0
0
0
0
0
0
0
0
OM02OM00OM01
Output Unit 0
EQU0
Capture/Compare Register CCR1
OM12OM10OM11
Output Unit 1
EQU1
Capture/Compare Register CCR2
OM22OM20OM21
Output Unit 2
EQU2
Capture/Compare Register CCR3
OM32OM30OM31
Output Unit 3
EQU3
Capture/Compare Register CCR4
OM42OM40OM41
Output Unit 4
EQU4
Out 0
P3.3
Out 1
P3.4
Out 2
P3.5
Out 3
P3.6
Out 4
P3.7
14
Figure 1. Timer_A, MSP430x337 Configuration
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
8-Bit Timer/Counter
The 8-bit interval timer supports three major functions for applications:
D
Serial communication or data exchange
D
Plus counting or plus accumulation
D
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
Timer/Counter.
The 8-Bit Timer/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.
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.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
15
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
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.
NOTE: All voltages referenced to VSS.
V
V
V
V
CC1
SS1
CC1
SS1
J/X
T/B
A/U
G/F
Common Lines COM0 to COM3, Segment Lines S0 to S29Output Drivers O2 to O29
Core Logic With
Core CPU, System, JTAG/Test,
All Peripheral Modules
V
CC2
V
SS2
V
CC1
V
SS1
V
SS3
V
SS2
V
SS1
NOTES: A. Ground potential for all port output drivers and input terminals, excluding first inverter/buffer
B. Ground potential for entire device core logic and peripheral modules
Terminal of Timer/Port
(see Note A)
Input Buffers and Output Drivers of Port P0–P4
Substrate and Ground Potential For Input Inverters/Buffers
10. All Timer/Port pins (TP0.0 to TP0.5) are Hi-Z. Pins CIN and TP0.0 to TP0.5 are connected together during leakage current
measurement. In the leakage measurement mode, the input CIN is included. The input voltage is VSS or VCC.
11. The leakages of the digital port terminals are measured individually. The port terminal must be selected for input and there must
be no optional pullup or pulldown resistor.
Timer/Port:V
VCC = 3 V/5 V,
S27
Port P0: P0.x, 0 ≤×≤ 7,
(see Note 11)
TP0.x,
= VSS to VCC,VCC = 3 V/5 V± 50nA
CIN = VSS, VCC,
(see Note 10)
VCC = 3 V/5 V,
VCC–0.4V
VCC–1.0V
VCC–0.4V
VCC–1.0V
V
SS
V
SS
V
SS
V
SS
VSS+0.4
VSS+1
VSS+0.4
VSS+1
CC
CC
CC
CC
± 50nA
± 50nA
optional resistors (see Note 12)
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
R
(opt1)
R
(opt2)
R
(opt3)
R
(opt4)
R
(opt5)
R
(opt6)
R
(opt7)
R
(opt8)
R
(opt9)
R
(opt10)
NOTE 12: Optional resistors R
Resistors, individually programmable with ROM code, all port pins,
values applicable for pulldown and pullup
for pulldown or pullup are not programmed in standard OTP/EPROM devices P/E 337.
electrical characteristics over recommended operating free-air temperature range (unless
otherwise noted) (continued)
inputs and outputs
PARAMETERTEST CONDITIONSVCCMINNOMMAXUNIT
Port P0, P1 to P2:
t
(int)
t
(cap)
f
(IN)
t
or t
(H)
(L)
t
or t
(H)
(L)
f
(XBUF)
f
(TAx)
f
(UCLK)
t
(Xdc)
∆t
(TA)
∆t
(UC)
t
(τ)
NOTES: 13. The external signal sets the interrupt flag every time t
14. The external interrupt signal cannot exceed the maximum input frequency (f
15. The external capture signal triggers the capture event every time t
16. The signal applied to the USART receive signal/terminal (URXD) should meet the timing requirements of t
External interrupt timing
Timer_A, capture timing
Input frequency
Output frequency
Duty cycle of output
USART: Deglitch timeSee Note16
conditions to set the flag must be met independently from this timing constraint. T
than t
flip-flop is set. The URXS flip-flop is set with negative pulses meeting the minimum timing condition of t
to set the flag must be met independently from this timing constraint. The deglitch circuitry is active only on negative transitions on
the URXD line.
. The conditions to set the flag must be met independently from this timing constraint.
(cap)
External trigger signal for the interrupt
flag (see Notes 13 and 14)
electrical characteristics over recommended and operating free-air temperature range (unless
otherwise noted) (continued)
RAM
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
V
(RAMh)
NOTE 17: This parameter defines the minimum supply voltage when the data in the program memory RAM remains unchanged. No program
execution should happen during this supply voltage condition.
Timer/Port comparator
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
(com)
V
ref(COM)
hys(COM)
p
Internal reference voltage at (–) terminal
p
p
CPON = 1VCC = 5 V1042mV
JT AG, program memory
PARAMETERTEST CONDITIONSMINNOMMAXUNIT
(TCK)
R
(test)
(FB)
I
(FB)
t
(FB)
V
(PP)
I
(PP)
t
(pps)
t
(ppf)
P
n
t
NOTES: 18. The TMS and TCK pullup resistors are implemented in all ROM(C), OTP(P) and EPROM(E) versions. The pullup resistor on TDI
JTAG/fuse
(see Note 19)
EPROM(E) and
OTP(P) versions only
EPROM(E) version only
is implemented in C versions only.
19. Once the fuse is blown no further access to the MSP430 JTAG/test feature is possible.
20. The voltage supply to blow the fuse is applied to TDI/VPP pin during the fuse blowing procedure.
Pullup resistors on TMS, TCK, TDI
(see Note 18)
Fuse blow voltage, C versions (see Note 20)VCC = 3 V/5 V5.56
Fuse blow voltage, E/P versions (see Note 20) VCC = 3 V/5 V1112
Supply current on TDI/VPP to blow fuse100mA
Time to blow the fuse1ms
Programming voltage, applied to TDI/VPP12.012.513.0V
Current from programming voltage source70mA
Programming time, single pulse5ms
Programming time, fast algorithm100µs
Number of pulses for successful programming4100Pulse
Data retention TJ <55°C10Year
Erase time wave length 2537 Å at
15 Ws/cm2 (UV lamp of 12 mW/ cm2)
Write/erase cycles1000
y
CPU halted (see Note 17)1.8V
VCC = 3 V175350
=
VCC = 5 V600
VCC = 3 V/5 V0.230 × V
=
VCC = 3 V537mV
VCC = 3 VDC5
VCC = 5 VDC10
VCC = 3 V/5 V256090kΩ
CC1
0.260 × V
30min
CC1
µ
V
z
24
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
typical input/output schematics
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
(see Note B)
(see Note B)
CMOS INPUT
V
CC
(see Note A)
(see Note A)
GND
V
CC
(see Note A)
(see Note B)
(see Note B)
(see Note A)
GND
CMOS SCHMITT-TRIGGER INPUT
V
CC
60 k TYP
CMOS 3-STATE OUTPUT
NOTES: A. Optional selection of pullup or pulldown resistors available on ROM (masked) versions.
B. Fuses for the optional pullup and pulldown resistors can only be programmed at the factory.
Figure 14. Port P4, P4.0, P4.1, P4.2, P4.6 and P4.7, Input/Output With Schmitt-T rigger
P4SEL.3
P4DIR.3
SYNC
MM
STC
STE
(SI) MO From USART
P4IN.3
SI (MO) To USART
NOTES: A. Optional selection of pullup or pulldown resistors available on ROM (masked) versions.
B. Fuses for the optional pullup and pulldown resistors can only be programmed at the factory.
DCM_SIMO
P4OUT.3
EN
D
0
1
0
1
0: Input
1: Output
Pad Logic
V
CC2
Figure 15. Port P4, P4.3, Input/Output With Schmitt-Trigger
V
SS3
(see Note A)
(see Note B)
P4.3/SIMO
(see Note B)
(see Note A)
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
33
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
typical input/output schematics (continued)
P4SEL.4
P4DIR.4
SYNC
MM
STC
STE
(SO) MI From USART
P4IN.4
(SO) MI To USART
A. Optional selection of pullup or pulldown resistors available on ROM (masked) versions.
B. Fuses for the optional pullup and pulldown resistors can only be programmed at the factory.
DCM_SIMO
P4OUT.4
EN
D
0
1
0
1
0: Input
1: Output
Pad Logic
Figure 16. Port P4, P4.4, Input/Output With Schmitt-Trigger
SYNC
MM
STC
STE
P4SEL.5
P4DIR.5
DCM_UCLK
P4OUT.5
UCLK From USART
0
1
0
1
0: Input
1: Output
Pad Logic
V
DV
CC2
V
CC
(see Note A)
(see Note B)
P4.4/SOMI
(see Note A)
(see Note B)
SS3
(see Note D)
(see Note E)
P4.5/UCLK
(see Note E)
P4IN.5
UCLK To USART
EN
D
DV
SS
(see Note D)
Figure 17. Port P4, P4.5, Input/Output With Schmitt-Trigger
NOTES: A. UART mode: The clock can only be input if UART mode and UART function is selected, the direction of P4.5/UCLK is always input.
B. SPI, slave mode: The clock to UCLK is used to shift data in and out.
C. SPI, master mode: The clock shift data in and out is supplied on pin P4.5/UCLK for connected devices (in slave mode)
D. Optional selection of pullup or pulldown resistors available on ROM (masked) versions.
E. Fuses for the optional pullup and pulldown resistors can only be programmed at the factory.
34
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
typical input/output schematics (continued)
TPx.0
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
TPD.0
TPx.1
TPx.2
TPx.3
TPx.4
TPIN.5
TPx.5
TPE.0
TPD.1
TPE.1
TPD.2
TPE.2
TPD.3
TPE.3
TPD.4
TPE.4
TPD.5
TPE.5
Figure 18. Timer/Port TP0.0 to TP0.5
CPON
CIN
S20/O29/CMPI
V
CC/4
ENBENA
0
+
_
1
CMP
TPIN.5
Enable
Control
TPSSEL0
Set_EN1FG
EN1
8-Bit Counter TPCNT1
Figure 19. S29/O29/CMPI Pin Schematic
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
35
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
typical input/output schematics (continued)
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 during 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.
Fuse check current may or may not flow continuously while the fuse check mode is active, depending on which
type of device is in use and the state of the TMS pin.
For the mask ROM or C versions, the fuse check current will only flow when the fuse check mode is active and
the TMS pin is in a low state (see Figure 20). Therefore, the additional current flow can be prevented by holding
the TMS pin high (default condition).
Time TMS Goes Low After POR
TMS
I
TF
I
TDI
Figure 20. Fuse Check Mode Current, MSP430C33x
For the OTP or P versions, the fuse check current will flow continuously when fuse check mode is active,
regardless of the state of the TMS pin, until the fuse check mode is deactivated with the second positive edge
at the TMS pin (see Figure 21).
Time TMS Goes Low After POR
TMS
I
TF
I
TDI
Figure 21. Fuse Check Mode Current, MSP430P337A
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 millimeters.
B. This drawing is subject to change without notice.
C. Falls within JEDEC MS-022
0,25 MIN
Seating Plane
0,25
0°–7°
1,03
0,73
0,10
4040022/B 03/95
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
37
MSP430C33x, MSP430P337A
MIXED SIGNAL MICROCONTROLLERS
SLAS227A – OCTOBER 1999 – REVISED JUNE 2000
MECHANICAL DATA
HFD (S-GQFP-G100) CERAMIC QUAD FLATPACK
81
100
80
0,65
1
18,85 TYP
20,20
19,20
23,45
22,95
0,30 TYP
30
51
50
12,35 TYP
31
14,2017,45
13,8016,95
0,15 TYP
3,70 TYP
4,25 MAX
NOTES: A. All linear dimensions are in millimeters.
B. This drawing is subject to change without notice.
0,10 MIN
Seating Plane
0,10
0°–8°
1,00
0,60
4081530/A 09/95
38
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
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.