- TI MSP430
The MSP430 is a
microcontroller family fromTexas Instruments . Built around a 16-bit CPU , the MSP430 is designed for low cost, low power consumption embedded applications. The architecture is reminiscent of the DECPDP-11 .The MSP430 is particularly well suited for wireless RF or battery powered applications.The device comes in a variety of configurations featuring the usual peripherals: internal oscillator, timer including PWM, watchdog, USART, SPI,
I2C , 10/12/14/16-bit ADCs, and brownout reset circuitry. 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 DAC, LCD driver, hardware multiplier, and DMA for ADC results. Apart from some olderEPROM (PMS430E3xx) and high volumemask ROM (MSP430Cxxx) versions, all of the devices are in-system programmable viaJTAG or a built in bootstrap loader (BSL) usingRS-232 .The MSP430 is a popular choice for low powered measurement devices. The current drawn in idle mode can be less than 1
microamp . The top CPU speed is 16 MHz. It can be throttled back for lower power consumption. Note that MHz is not equivalent to MIPS, and there are more efficient architectures that obtain higher MIPS rates at lower CPU clock frequencies, which can result in lower dynamic power consumption for an equivalent amount of processing.There are, however, limitations that prevent it from being used in more complex embedded systems. The MSP430 does not have an external memory bus, so is limited to on-chip memory (up to 256 KB Flash and 16 KB RAM) which might be too small for applications that require large buffers or data tables.
MSP430 CPU
The MSP430 CPU uses a
von Neumann architecture , with a single address space for instructions and data. Memory isbyte -addressed, and pairs of bytes are combinedlittle-endian to make 16-bit words.The processor contains 16 16-bit registers.cite web | url=http://www-s.ti.com/sc/techlit/slab034.pdf | title=MSP430 Ultra-Low-Power Microcontroller | accessdate=2008-07-09 | publisher=Texas Instruments] R0 is the
program counter , R1 is thestack pointer , R2 is thestatus register , and R3 is a special register called the "constant generator", providing access to 6 commonly used constant values without requiring an additional operand. R4 through R15 are available for general use.The instruction set is very simple; there are 27 instructions in three families. Most instructions are available in 8-bit (byte) and 16-bit (word) versions, depending on the value of a B/W bit - the bit is set to 1 for 8-bit and 0 for 16-bit. Byte operations to memory affect only the addressed byte, while byte operations to registers clear the most significant byte.Ports P7 and P8 may be accessed using 16-bit loads and stores; when used this way, the combination is known as PA. Similarly, P9 and P10 bay be combined into a 16-bit PB.
Hardware multiplier
Some MSP430 models include a memory-mapped hardware multiplier peripheral which performs various 16×16+32→33-bit multiply-accumulate operations.
Unusually for the MSP430, this peripheral does include an implicit 2-bit write-only register, which makes it effectively impossible to
context switch .The 8 registers used are:
The first operand is written to one of four 16-bit registers. The address written determines the operation performed. While the value written can be read back from any of the registers, the register number written to cannot be recovered.
If a multiply-accumulate operation is desired, the
ResLo
andResHi
registers must also be initialized.Then, each time a write is performed to the
OP2
register, a multiply is performed and the result stored or added to the result registers. TheSumExt
register is a read-only register that contains the carry out of the addition (0 or 1) in case of an unsigned multiply), or the sign extension of the 32-bit sum (0 or -1) in case of a signed multiply. In the case of a signed multiply-accumulate, theSumExt
value must be combined with the most significant bit of the priorSumHi
contents to determine the true carry out result (-1, 0, or +1).The result is available after three clock cycles of delay, which is the time required to fetch a following instruction and a following index word. Thus, the delay is typically invisible. An explicit delay is only required if using an indirect addressing mode to fetch the result.
Development tools
Texas Instruments provides software development tools that can be downloaded for free. The TI-provided toolchain is a Kickstart edition of the IAR C/C++ compiler, which is limited to 4K of C/C++ code in the compiler and debugger (assembly language programs of any size can be developed and debugged with this free toolchain).TI also provides a version of Eclipse that it calls Code Composer Essentials, for which the Kickstart version can be downloaded for free.The open source community produces a freely available software development toolset ( [http://mspgcc.sourceforge.net/ MSPGCC] ) based on the GNU toolset, although the object code size and speed are not as optimal as the results from a commercial compiler.Fact|date=February 2007 Also various commercial development toolsets, which include editor, compiler, linker, assembler, debugger and in single cases code wizards, are available.
VisSim , a block diagram language for model based development, can generate efficient fixed point C-Code directly from the diagram. By clever use of inline interrupt functions, VisSim generates very efficient control programs that can access I2C, ADC, PWM etc, in a control loop and use less than 1K flash and 128 bytes RAM.Development platforms
The MSP430 has generated excitement with the availability of inexpensive development platforms. At a cost of $20 USD, TI has packaged a USB stick programmer, the eZ430-F2013, containing an MSP430F2013 on a detachable prototyping board, and CD with development software. This is helpful for schools, hobbyists and garage inventors. It is also welcomed by engineers in large companies prototyping projects with capital budget problems.
One other interesting thing about the MSP430F2013 and its siblings is that it is the only MSP430 part that is available in a
dual in-line package (DIP). Other variants in this family are only available in various surface-mount packages. It is clear that TI has gone to some trouble to support the eZ430 development platform by making the raw chips easily prototypable by hobbyists.While software development using Linux and other Open Source ispossible, support from TI is non-existent, and tool support for newprocessors is untimely late since they rely on volunteers.
Debugging interface
In common with other microcontroller vendors, TI has developed a two-wire debugging interface found on some of their MSP430 parts that can replace the larger JTAG interface. The eZ430 Development Tool contains a full USB-connected Flash Emulation Tool ("FET") for this new two-wire protocol, named "Spy-Bi-Wire" by TI. Spy-Bi-Wire was initially introduced on only the smallest devices in the 'F2xx family with limited number of I/O pins, such as the MSP430F20xx, MSP430F21x2, and MSP430F22x2. The support for Spy-Bi-Wire has been expanded with the introduction of the latest '5xx family, where all devices have support Spy-Bi-Wire interface in addition to JTAG.
The advantage of the Spy-Bi-Wire protocol is that it uses only two communication lines, one of which is the dedicated _RESET line. The JTAG interface on the lower pin count MSP430 parts is multiplexed with general purpose I/O lines. This makes it relatively difficult to debug circuits built around the small, low-I/O-budget chips, since the full 4-pin JTAG hardware will conflict with anything else connected to those I/O lines. This problem is alleviated with the Spy-Bi-Wire-capable chips, which are still compatible with the normal JTAG interface for backwards compatibility with the old development tools.
JTAG debugging and flash programming tools based on OpenOCD and widely used in the ARM community are not available for the MSP430. Programming tools specially designed for the MSP430 are marginally less expensive than JTAG interfaces that use OpenOCD. However, should a project discover midstream that more MIPS, more memory, and more I/O peripherals are needed, those tools will not transfer to a processor from another vendor.
References
External links
Community and information sites
* [http://www.ti.com/msp430 TI MSP430 Homepage]
* [http://www.designmsp430.com MSP430 Community sponsored by Texas Instruments]
* [http://www.msp430.ubi.pt MSP430@UBI group with MSP430 projects, forum and blog]
* [http://msp430.info/ MSP430.info]
* [http://groups.yahoo.com/group/msp430/ msp430 Yahoo!group]
* [http://www.elektronikladen.de/msp430/index.html MSP430web]
* [http://hardware-hacking.com/MSP430_JTAG MSP430 JTAG] at [http://hardware-hacking.com /]
* [http://passworld.co.jp/ForumMSP430 MSP430 English-Japanese forum]Visual programming C code generators
* [http://www.vissim.com/products/c2000/c2000.html VisSim MSP430 visual programming language]
Compilers and assemblers
* [http://www.quadravox.com/AQ430.htm AQ430 Development Tools for MSP430Fxxxx Microcontrollers]
* [http://www.rowley.co.uk/ CrossWorks for MSP430]
* [http://mspgcc.sourceforge.net/ GCC toolchain for the Texas Instruments MSP430 Microcontrollers (Free C-compiler)]
* [http://www.htsoft.com HI-TECH C for MSP430]
* [http://www.iar.com IAR Embedded Workbench for TI MSP430]
* [http://www.imagecraft.com/software/ ImageCraft C Tools]
* [http://www.forth.com/embedded/swiftx-embedded-systems-15.html ForthInc Forth-Compiler]
* [http://www.mpeltd.demon.co.uk/forth6.htm MPE Forth-Compiler]Other Tools
* [http://sourceforge.net/projects/mspsim MSPSim - a Java based MSP430 emulator/simulator]
* [http://msp430static.sourceforge.net/ MSP430Static - a reverse engineering tool in Perl]
Wikimedia Foundation. 2010.