Chủ Nhật, 12 tháng 8, 2012

[dientu686.com]TI MSP430Phần 1


TI MSP430

Applications

The MSP430 can be used for low powered embedded devices. The electric current drawn in idle mode can be less than 1 microamp. The top CPU speed is 25 MHz. It can be throttled back for lower power consumption. The MSP430 also utilizes six different Low-Power Modes, which can disable unneeded clocks and CPU. This allows the MSP430 to sleep, while its peripherals continue to work without the need for an energy hungry processor. Additionally, the MSP430 is capable of wake-up times below 1 microsecond, allowing the microcontroller to stay in sleep mode longer, minimizing its average current consumption. Note that MHz is not equivalent to Million instructions per second (MIPS), and different architectures can obtain different MIPS rates at lower CPU clock frequencies, which can result in lower dynamic power consumption for an equivalent amount of digital processing.
The device comes in a variety of configurations featuring the usual peripherals: internal oscillatortimer including PWMwatchdogUSARTSPII²C, 10/12/14/16-bit ADCs, and brownout resetcircuitry. Some less usual peripheral options include comparators (that can be used with the timers to do simple ADC), on-chip op-amps for signal conditioning, 12-bit DACLCD driver, hardware multiplierUSB, and DMA for ADC results. Apart from some older EPROM (MSP430E3xx) and high volume mask ROM (MSP430Cxxx) versions, all of the devices are in-system programmable viaJTAG (full four-wire or Spy-Bi-Wire) or a built in bootstrap loader (BSL) using RS-232.
There are, however, limitations that preclude its use in more complex embedded systems. The MSP430 does not have an external memory bus, so is limited to on-chip memory (up to 256 KBFlash memory and 16 KB RAM) which might be too small for applications that require large buffers or data tables. Also, although it has a DMA controller, it is very difficult to use it to move data off the chip due to a lack of a DMA output strobe.[2]

[edit]MSP430 part numbering


MSP430 Nomenclature
An MSP430 part number such as "MSP430F2618ATZQWT-EP" consists of the following pieces:
  • MSP430: Standard prefix.
  • F: Indicates a memory type or specialized application. "F" indicating flash memory is by far the most popular. Other options for memory type include "C" for masked ROM, "FR" for FRAM, "G" for Flash Value Line, and "L" as in the MSP430L09x series, which indicates a RAM-only part; it must remain continuously powered to retain its programming. A second letter (except for "FR") indicates a specialized application for the part. For example, "G" is an optional specialization letter indicating hardware support for a specialized use. "E" indicates special electricity meter functions, "G" devices are designed for medical instrumentation, and "W" devices include a special "scan interface" designed for flow meters. An exception is the MSP430FG2xx devices, which are considered a separate generation.
  • 2: The generation of device. There can be significant changes to core peripherals (clock generators, UARTs, etc.) in different generations. These are not in chronological order, but rather higher values roughly indicate greater size, complexity and cost. For example, generations 3 and 4 include LCD display controllers which the others do not.
  • 6: The model within the generation. This indicates the mixture of on-board peripheral devices and number of pins.
  • 18: One or two digits indicating the amount of memory on the device. The numbering is (mostly) consistent throughout the MSP430 series. Not all suffixes are valid with all models; most models are available in 3–6 memory sizes, chosen to match the other capabilities of the device. Larger numbers indicate increasing amounts of memory, but sometimes one type of memory (RAM or ROM) is sacrificed to fit more of the other.
MSP430 Memory configurations
SuffixRAMROMSuffixRAMROM
01281 K105 K32 K
11282 K1110 K48 K
22564 K125 K55/56 K
32568 K13
451212 K14
551216 K15
61 K24 K164 K92 K
71 K32 K178 K92 K
82 K48K188 K116 K
92 K60K194 K120 K
  • An optional suffix digit indicating a variant device, adding or deleting some analog peripherals. For example, a "1" suffix may indicate the addition of a comparator or deletion of an ADC. If the memory size is "1", this suffix can be confused with part of the memory size, but no single model is available in both "1" and "10" (or greater) memory sizes.
  • An optional "A" suffix indicating an upward-compatible revised version. The MSP430F11x1A has an additional 256 bytes of data flash not present in the plain 'F11x1.
Trailing suffix letters indicate options not visible to software:
  • T: Indicates a temperature range of −40°C to +105 °C.
  • ZQW: Indicates the package the part is kept in. "ZQW" is a TI-specific name for a ball grid array.
  • T: Indicates that the parts are shipped in small reel (7-inch) packaging.
  • -EP: Indicates an additional feature. "-Q1" specifies that the part is automotive qualified. "-EP" and "-HT" indicate extended temperature products. Enhanced products, "-EP", have a temperature range from -40°C to 125°C, and extreme temperature parts, "-HT", have a temperature range from -56°C to 150°C.

[edit]MSP430 generations

There are six general generations of MSP430 processors. In order of development, they were the '3xx generation, the '1xx generation, the '4xx generation, the '2xx generation, the '5xx generation, and the '6xx generation. The digit after the generation identifies the model (generally higher model numbers are larger and more capable), the third digit identifies the amount of memory on board, and the fourth, if present, identifies a minor model variant. The most common variation is a different on-chip analog-to-digital converter.
The 3xx and 1xx generations were limited to a 16-bit address space. In the later generations this was expanded to include '430X' instructions that allow a 20-bit address space. As happened with the PDP-11, and as one might expect, extending the addressing range beyond the 16 bit word size introduced some peculiarities and inefficiencies for programs larger than 64 kBytes.
In the following list, it helps to think of the typical 200 mA·Hr capacity of a CR2032 lithium coin cell as 200,000 μA·Hr, or 22.8 μA·year. Thus, considering only the CPU draw, such a battery could supply a 0.7 μA current draw for 32 years. (In reality, battery self-discharge would reduce this number.)
The significance of the 'RAM retention' vs the 'real-time clock mode' is that in real time clock mode the CPU can go to sleep with a clock running which will wake it up at a specific future time. In RAM retention mode, some external signal is required to wake it, e.g. I/O pin signal or SPI slave receive interrupt.

[edit]MSP430x1xx Series

The MSP430x1xx Series is the basic generation without an embedded LCD controller. They are generally smaller than the '3xx generation. These Flash or ROM-based Ultra-Low Power MCUs offer 8 MIPS, 1.8–3.6 V operation, up to 60 KB Flash, and a wide range of analog and digital peripherals.
  • Power Specs Overview, as low as:
    • 0.1 μA RAM retention
    • 0.7 μA real-time clock mode
    • 200 μA / MIPS active
    • Feature Fast Wake-Up From Standby Mode in <6 μs
  • Device Parameters:
    • Flash Options: 1–60 KB
    • ROM Options: 1–16 KB
    • RAM Options: 128 B–10 KB
    • GPIO Options: 14, 22, 48 pins
    • ADC Options: Slope, 10 & 12-bit SAR
    • Other Integrated peripherals: 12-bit DAC, up to 2 16-bit Timers, Watchdog Timer, Brown-out Reset, SVS, USART module (UART, SPI), DMA, 16×16 Multiplier, Comparator_A, Temp Sensor

[edit]MSP430F2xx Series

The MSP430F2xx Series are similar to the '1xx generation, but operate at even lower power, support up to 16 MHz operation, and have a more accurate (±2%) on-chip clock that makes it easier to operate without an external crystal. These Flash-based Ultra-Low Power offer 1.8–3.6 V operation. Includes the Very-Low power Oscillator (VLO), internal pull-up/pull-down resistors, and low-pin count options.
  • Power Specs Overview, as low as:
    • 0.1 μA RAM retention
    • 0.3 μA Standby mode (VLO)
    • 0.7 μA real-time clock mode
    • 220 μA / MIPS active
    • Feature Ultra-Fast Wake-Up From Standby Mode in <1 μs
  • Device Parameters
    • Flash Options: 1–120 KB
    • RAM Options: 128 B–8 KB
    • GPIO Options: 10, 11, 16, 24, 32, 48 pins
    • ADC Options: Slope, 10 & 12-bit SAR, 16 & 24-bit Sigma Delta
    • Other Integrated peripherals: Op Amps, 12-bit DAC, up to 2 16-bit Timers, Watchdog Timer, Brown-out Reset, SVS, USI module (I²C, SPI), USCI module, DMA, 16×16 Multiplier, Comparator_A+, Temp Sensor

[edit]MSP430G2xx Series

The MSP430G2xx Value Series features flash-based Ultra-Low Power MCUs up to 16 MIPS with 1.8–3.6 V operation. Includes the Very-Low power Oscillator (VLO), internal pull-up/pull-down resistors, and low-pin count options, at lower prices than the MSP430F2xx series.
  • Ultra-Low Power, as low as (@2.2V):
    • 0.1 μA RAM retention
    • 0.4 μA Standby mode (VLO)
    • 0.7 μA real-time clock mode
    • 220 μA / MIPS active
    • Ultra-Fast Wake-Up From Standby Mode in <1 μs
  • Device Parameters:
    • Flash Options: 0.5–16 KB
    • RAM Options: 128–512 B
    • GPIO Options: 10, 16, 24 pins
    • ADC Options: Slope, 10-bit SAR
    • Other Integrated peripherals: Capacitive Touch I/O, up to 2 16-bit Timers, Watchdog Timer, Brown-out Reset, USI module (I²C, SPI), USCI module, Comparator_A+, Temp sensor

[edit]MSP430x3xx Series

The MSP430x3xx Series is the oldest generation, designed for portable instrumentation with an embedded LCD controller. This also includes a frequency-locked loop oscillator that can automatically synchronize to a low-speed (32 kHz) crystal. This generation does not support EEPROM memory, only mask ROM and UV-eraseable and one-time programmable EPROM. Later generations provide only flash memory and mask ROM options. These devices offer 2.5–5.5 V operation, up to 32 KB ROM.
  • Power Specs Overview, as low as:
    • 0.1 μA RAM retention
    • 0.9 μA real-time clock mode
    • 160 μA / MIPS active
    • Feature Fast Wake-Up From Standby Mode in <6 μs
  • Device Parameters:
    • ROM Options: 2–32 KB
    • RAM Options: 512 B–1 KB
    • GPIO Options: 14, 40 pins
    • ADC Options: Slope, 14-bit SAR
    • Other Integrated peripherals: LCD controller, Multiplier

[edit]MSP430x4xx Series

The MSP430x4xx Series are similar to the '3xx generation, and also include an integrated LCD controller, but are larger and more capable. These Flash or ROM based devices offers 8–16 MIPS at 1.8–3.6 V operation, with FLL, and SVS. Ideal for low power metering and medical applications.
  • Power Specs Overview, as low as:
    • 0.1 μA RAM retention
    • 0.7 μA real-time clock mode
    • 200 μA / MIPS active
    • Feature Fast Wake-Up From Standby Mode in <6 μs
  • Device Parameters:
    • Flash/ROM Options: 4 – 120 KB
    • RAM Options: 256 B – 8 KB
    • GPIO Options: 14, 32, 48, 56, 68, 72, 80 pins
    • ADC Options: Slope, 10 & 12-bit SAR, 16-bit Sigma Delta
    • Other Integrated peripherals: SCAN_IF, ESP430, 12-bit DAC, Op Amps, RTC, up to 2 16-bit Timers, Watchdog Timer, Basic Timer, Brown-out Reset, SVS, USART module (UART, SPI), USCI module, LCD Controller, DMA, 16×16 & 32x32 Multiplier, Comparator_A, Temp Sensor, 8 MIPS CPU Speed

[edit]MSP430x5xx Series

The MSP430x5xx Series are able to run up to 25 MHz, have up to 256 KB flash memory and up to 18 KB RAM. This flash-based family features low active power consumption with up to 25 MIPS at 1.8-3.6 V operation (165 uA/MIPS). Includes an innovative Power Management Module for optimal power consumption and integrated USB.
  • Power Specs Overview, as low as:
    • 0.1 μA RAM retention
    • 2.5 μA real-time clock mode
    • 165 μA / MIPS active
    • Feature Fast Wake-Up From Standby Mode in <5 μs
  • Device Parameters:
    • Flash Options: up to 256 KB
    • RAM Options: up to 18 KB
    • ADC Options: 10 & 12-bit SAR
    • GPIO Options: 29, 31, 47, 48, 63, 67, 74, 87 pins
    • Other Integrated peripherals: Hi Resolution PWM, 5V I/O's, USB, Backup Battery Switch, up to 4 16-bit Timers, Watchdog Timer, Real-Time Clock, Brown-out Reset, SVS, USCI module, USCI module, DMA, 32x32 Multiplier, Comp B, Temp Sensor

[edit]MSP430x6xx Series

The MSP430x6xx Series are able to run up to 25 MHz, have up to 256 KB flash memory and up to 18 KB RAM. This flash-based family features low active power consumption with up to 25 MIPS at 1.8-3.6 V operation (165 uA/MIPS). Includes an innovative Power Management Module for optimal power consumption and integrated USB.
  • Power Specs Overview, as low as:
    • 0.1 μA RAM retention
    • 2.5 μA real-time clock mode
    • 165 μA / MIPS active
    • Feature Fast Wake-Up From Standby Mode in <5 μs
  • Device Parameters:
    • Flash Options: up to 256 KB
    • RAM Options: up to 18 KB
    • ADC Options: 12-bit SAR
    • GPIO Options: 74 pins
    • Other Integrated peripherals: USB, LCD, DAC, Comparator_B, DMA, 32x32 Multiplier, Power Management Module (BOR, SVS, SVM, LDO), Watchdog Timer, RTC, Temp sensor

[edit]RF SoC (CC430) Series

The RF SoC (CC430) Series provides tight integration between the microcontroller core, peripherals, software, and RF transceiver. Features <1 GHz RF transceiver, with 1.8V-3.6V operation.
  • Power Specs Overview, as low as:
    • 1 μA RAM retention
    • 1.7 μA real-time clock mode
    • 180 μA / MIPS active
  • Device Parameters:
    • Speed Options: up to 20 MHz
    • Flash Options: up to 32 KB
    • RAM Options: up to 4 KB
    • ADC Options: 12-bit SAR
    • GPIO Options: 30 & 44 pins
    • Other Integrated peripherals: LCD Controller, up to 2 16-bit Timers, Watchdog Timer, RTC, Power Management Module (BOR, SVS, SVM, LDO), USCI module, DMA, 32x32 Multiplier, Comp B, Temp Sensor

[edit]FRAM Series (MSP430FR57xx)

The FRAM Series (MSP430FR57xx) from Texas Instruments provides unified memory with dynamic partitioning and memory access speeds 100 times faster than flash. FRAM is also capable of zero power state retention in all power modes, which means that writes are guaranteed,[dubious ] even in the event of a power loss. With a write endurance of over 100 trillion cycles, EEPROM is no longer required. Active power consumption at less than 100μA/MHz.
  • Power Specs Overview, as low as:
    • 320 nA RAM retention
    • 1.5 μA real-time clock mode
    • 82 μA / MIPS active
  • Device Parameters:
    • Speed Options: up to 24 MHz
    • FRAM Options: up to 16 KB
    • RAM Options: up to 1 KB
    • ADC Options: 10-bit SAR
    • GPIO Options: 33 pins
    • Other Integrated peripherals: MPU, up to 5 16-bit Timers, Watchdog Timer, RTC, Power Management Module (BOR, SVS, SVM, LDO), USCI module, DMA, Multiplier, Comp B, Temp Sensor

[edit]Low Voltage Series

The Low Voltage Series include the MSP430C09x and MSP430L092 parts. These 2 series of low voltage 16 bit microcontrollers have configurations with two 16-bit timers, an 8-bit analog-to-digital (A/D) converter, an 8-bit digital-to-analog (D/A) converter, and up to 11 I/O pins. For more information, see Low Voltage Wiki.
  • Power Specs Overview, as low as:
    • 1 μA RAM retention
    • 1.7 μA real-time clock mode
    • 180 μA / MIPS active
  • Device Parameters:
    • Speed Options: 4 MHz
    • ROM Options: 1-2 kB
    • SRAM Options: 2 kB
    • ADC Options: 8-bit SAR
    • GPIO Options: 11 pins
    • Other Integrated peripherals: up to 2 16-bit Timers, Watchdog Timer, Brown-out Reset, SVS, Comparator, Temp Sensor

[edit]Other MSP430 Families

Additional families within MSP430 include Fixed FunctionAutomotive, and Extended Temp parts.
Fixed Function: The MSP430BQ1010 16-bit microcontroller is an advanced fixed-function device that forms the control and communications unit on the receiver side for wireless power transfer in portable applications. MSP430BQ1010 complies with the Wireless Power Consortium (WPC) specification. For more information, see Contactless Power.
Automotive: Automotive MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are 16-bit, RISC-based, mixed-signal processors that are AEC-Q100 qualified and suitable for automotive applications in environments up to 105°C ambient temperature. LIN compliant drivers for the MSP430 MCU provided by IHR GmbH.
Extended Temp: MSP430 devices are very popular in harsh environments such as industrial sensing for their low power consumption and innovative analog integration. Some harsh environment applications include transportation/automotive, renewable energy, military/space/avionics, mineral exploration, industrial, and safety & security.
  • Device Definitions:
    • HT: -55°C to 150°C
    • EP: Enhanced Products -55°C to 125°C
    • Q1: Automotive Q100 Qualified -40°C to 105°C
    • T: Extended Temperature -40°C to 105°C Applications
Note that when the flash size is over 64K words (128 KBytes), instruction addresses can no longer be encoded in just two bytes. This change in pointer size causes some incompatibilities with previous parts.

[edit]Peripherals

The MSP430 peripherals are generally easy to use, with (mostly) consistent addresses between models, and no write-only registers.

[edit]General-purpose I/O ports 0–10

As is standard on microcontrollers, most pins connect to a more specialized peripheral, but if that peripheral is not needed, the pin may be used for general-purpose I/O. The pins are divided into 8-bit groups called "ports", each of which is controlled by a number of 8-bit registers. In some cases, the ports are arranged in pairs which can be accessed as 16-bit registers.
The MSP430 family defines 11 I/O ports, P0 through P10, although no chip implements more than 10 of them. P0 is only implemented on the '3xx family. P7 through P10 are only implemented on the largest members (and highest pin count versions) of the '4xx and '2xx families. The newest '5xx and '6xx families has P1 through P11, and the control registers are reassigned to provide more port pairs. Each port is controlled by the following registers. Ports which do not implement particular features (such as interrupt on state change) do not implement the corresponding registers.
PxIN 
Port x input. This is a read-only register, and reflects the current state of the port's pins.
PxOUT 
Port x output. The values written to this read/write register are driven out the corresponding pins when they are configured to output.
PxDIR 
Port x data direction. Bits written as 1 configure the corresponding pin for output. Bits written as 0 configure the pin for input.
PxSEL 
Port x function select. Bits written as 1 configure the corresponding pin for use by the specialized peripheral. Bits written as 0 configure the pin for general-purpose I/O. Port 0 ('3xx parts only) is not multiplexed with other peripherals and does not have a P0SEL register.
PxREN 
Port x resistor enable ('2xx & '5xx only). Bits set in this register enable weak pull-up or pull-down resistors on the corresponding I/O pins even when they are configured as inputs. The direction of the pull is set by the bit written to the PxOUT register.
PxDS 
Port x drive strength ('5xx only). Bits set in this register enable high-current outputs. This increases output power, but may cause EMI.
Ports 0–2 can produce interrupts when inputs change. Additional registers configure this ability:
PxIES 
Port x interrupt edge select. Selects the edge which will cause the PxIFG bit to be set. When the input bit changes from matching the PxIES state to not matching it (i.e. whenever a bit in PxIES XOR PxIN changes from clear to set), the corresponding PxIFG bit is set.
PxIE 
Port x interrupt enable. When this bit and the corresponding PxIFG bit are both set, an interrupt is generated.
PxIFG 
Port x interrupt flag. Set whenever the corresponding pin makes the state change requested by PxIES. Can be cleared only by software. (Can also be set by software.)
PxIV 
Port x interrupt vector ('5xx only). This 16-bit register is a priority encoder which can be used to handle pin-change interrupts. If n is the lowest-numbered interrupt bit which is pending in PxIFG and enabled in PxIE, this register reads as 2n+2. If there is no such bit, it reads as 0. The scale factor of 2 allows direct use as an offset into a branch table. Reading this register also clears the reported PxIFG flag.
Some pins have special purposes either as inputs or outputs. (For example, timer pins can be configured as capture inputs or PWM outputs.) In this case, the PxDIR bit controls which of the two functions the pin performs when the PxSEL bit is set. If there is only one special function, then PxDIR is generally ignored. The PxIN register is still readable if the PxSEL bit is set, but interrupt generation is disabled. If PxSEL is clear, the special function's input is frozen and disconnected from the external pin. Also, configuring a pin for general-purpose output does not disable interrupt generation.
General-purpose I/O register address map
'1xx–'4xx families
PxIN PxOUTPxDIRPxSELPxIESPxIE PxIFGPxREN
P00x100x110x120x130x140x15
P10x200x210x220x260x240x250x230x27
P20x280x290x2a0x2e0x2c0x2d0x2b0x2f
P30x180x190x1a0x1b0x10
P40x1c0x1d0x1e0x1f0x11
P50x300x310x320x330x12
P60x340x350x360x370x13
PAP70x380x3a0x3c0x3e0x14
P80x390x3b0x3d0x3f0x15
PBP90x080x0a0x0c0x0e0x16
P100x090x0b0x0d0x0f0x17
'5xx–'6xx & '0xx families
PxIN PxOUTPxDIRPxRENPxDS PxSELPxIV PxIESPxIE PxIFG
PAP10x2000x2020x2040x2060x2080x20A0x20E0x2180x21A0x21C
P20x2010x2030x2050x2070x2090x20B0x21E0x2190x21B0x21D
PBP30x2200x2220x2240x2260x2280x22A
P40x2210x2230x2250x2270x2290x22B
PCP50x2400x2420x2440x2460x2480x24A
P60x2410x2430x2450x2470x2490x24B
PDP70x2600x2620x2640x2660x2680x26A
P80x2610x2630x2650x2670x2690x26B
PEP90x2800x2820x2840x2860x2880x28A
P100x2810x2830x2850x2870x2890x28B
P110x2A00x2A20x2A40x2A60x2A80x2AA
PJ0x3200x3220x3240x3260x3284 bits only; shared with JTAG pins.

[edit]

Không có nhận xét nào:

Đăng nhận xét