Skip to content Skip to navigation

OpenStax_CNX

You are here: Home » Content » Overview of the MSP430™ Microcontroller from Texas instruments

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Overview of the MSP430™ Microcontroller from Texas instruments

Module by: Zack Albus. E-mail the authorEdited By: Gene Frantz

Summary: This module gives a brief overview of the MSP430™ microcontroller, how to read a data sheet for an MSP430™ microcontroller, and how to pick the right one for some sample applications. This module is one of many in a textbook designed to help seniors select TI products for use in their senior project.

MSP430™ microcontrollers

MSP430™ microcontrollers (MCUs) from Texas Instruments are 16-bit, RISC-based, mixed-signal processors designed specifically for ultra-low power. MSP430 MCUs have the right mix of analog and digital integrated intelligent peripherals, ease of use, low cost and lowest power consumption for thousands of applications ranging from simple sensor designs to complex electricity meters.

To get a better idea of what the MSP430 MCU is and how you can use it to solve a system design need or application problem, let’s take a look at a typical block diagram for a device. Figure 1 is the device block diagram for the MSP430G2553, one of the MSP430 Value Line devices.

Figure 1
Figure 1 (graphics1.png)

The purpose of the block diagram is to provide a high-level reference of the integration and feature set found in a given device. You can find the block diagram for any MSP430 MCU in the data sheets at www.msp430.com.

The block diagram contains key features of the device that can help you quickly identify if an MSP430 MCU is a fit for a given application need. There are a few features you will need to consider:

  • Integrated memory:
    • Includes both volatile (RAM) and nonvolatile (flash) sizes.
    • When multiple values are listed, it shows which device memory size variants are available with the same peripherals.
  • General-purpose I/O pins:
    • The MSP430G2553 has up to 24 I/Os available: eight Port1 (P1), eight P2 and eight P3 I/Os.
      • Package-dependent: Check the pinout for the total number.
    • All pins have configurable integrated pullup or pulldown resistors.
    • P1 and P2 I/Os when inputs can provide an interrupt to the CPU.
  • CPU and emulation capabilities:
    • 16 MHz is the maximum CPU clock speed for the MSP430G2553.
    • Integrated emulation for the MSP430G2553 has two hardware breakpoints (2BP) for use when debugging.
  • Simplified clock system:
    • One external clock source on XIN/XOUT can be sourced.
    • The internal clock tree provides three clock tree branches.
  • Digital and analog peripheral mix. The MSP430G2553 device includes:
    • 10-bit, eight-channel analog-to-digital converter (ADC) with internal voltage reference for voltage measurement (sensors, power rails, etc).
    • Comp_A+: eight-channel analog comparator with internal voltage reference for simple measurements or voltage threshold detection.
    • WDT+: watchdog timer for resetting the CPU in case of timeout (can also be used as a simple interval timer generating an interrupt).
    • Timer0,1_A3: two 16-bit general-purpose timers, each with three capture-compare (CC) I/Os.
    • USCI (A0/B0): universal serial communication interface module capable of providing standard UART, SPI and I2C communication protocols used to interface with external digital devices (sensors, data converters, radio ICs).

Figure 2 is the corresponding pinout also found in each device data sheet for the MSP430G2553. Here you can see exactly how peripheral functions are mapped onto the multiplexed I/Os of the device. Each I/O pin can be configured in software to provide the desired pin function for a given I/O based on its internal connectivity.

Figure 2
Figure 2 (graphics2.png)

Figure 2 also shows the necessary power-supply connections (DVCC, DVSS), programmer/debugging tool connections (SBWTCK, SBWTDIO), and general I/O and peripheral connections (P3.1, TA1.0, CA2, UCB0SDA). When beginning any design with the MSP430 MCU, reviewing the given device’s block diagram and package pinout can provide a great guide to what is possible, as well as any constraints (such as memory size or pinout limitations).

Connecting the MSP430 MCU in any system is, in most cases, very straightforward. The first consideration should be the power-supply requirements. Most MSP430 devices operate at 1.8 V to 3.6 V, so a typical 3-V supply will work great. Connecting the JTAG to support device memory programming and debugging is also important. For MSP430G2xxx devices, there are two possibilities: standard four-wire JTAG or MSP430 MCU-specific Spy-Bi-Wire (SBW, or two-wire JTAG). Both interfaces are acceptable for programming and debugging application code. The main advantage of the four-wire mode is speed. The main advantage of the two-wire SBW mode is reduced pin-connection requirements.

Figure 3 is an example schematic thatshows the baseline connections for the MSP430G2553, as well as some examples of other connections that can be made to the I/Os and integrated peripherals.

Figure 3
Figure 3 (graphics3.png)

Figure 3 shows the connections of the MSP430G2553 in a typical sensor interface application. In this example, the MSP430G2553's integrated ADC10 is used to measure an analog signal via a thermistor that changes resistance as temperature increases or decreases, and also interfaces using an I2C bus from the USCI module to an external humidity sensor. In addition, a 32.768-kHz watch crystal keeps accurate timing; two switches, along with one PWM-controlled LED, provide a simple user interface. To save power from the 3-V coin cell battery, when not in use the humidity sensor and thermistor ladder can be powered off using a general-purpose I/O (P2.5) and the internal voltage reference (VREF+), respectively.

Now that we've covered the basics and how to understand the capabilities of a given MSP430 device, let’s look more closely at the documentation and how to use it most effectively. MSP430 device documentation can be broken up into three main categories:

  • Device-specific data sheet (e.g., MSP430G2553 data sheet.) Here, you will find anything device-specific: pinouts, block diagrams, absolute operating conditions (supply voltage and operating temperature ranges), electrical parameters and performance tolerances (power consumption, ADC accuracy, and internal clock minimum and maximum frequencies).
  • Device family user’s guide (e.g., MSP430x2xx family user's guide). This document contains information applicable to all devices in a family: peripheral detailed descriptions, register and bit function definitions, CPU and instruction set, power mode definitions and settings. Some peripherals included in the user’s guide will not be present in a given device, as it is intended to cover all peripherals within a given family.
  • Device-specific errata sheet (e.g., MSP430G2553 device errata sheet). The errata sheet is a critical document that lists any device bugs that can affect a given use-case along with potential workarounds. Errata can vary by device as well as device revisions.

You can find these documents, as well as additional reference material such as application notes, example code and development tool documentation, by navigating to the device-specific product folder (e.g., MSP430G2553 product folder). Here, you can find the latest information as well as links to all pertinent documentation and software to aid your design efforts.

Arguably, the most valuable document is the device-specific data sheet. We have already looked at two core aspects (pinout and block diagram), but let’s dive a bit deeper into the information provided. The front page of the data sheet is designed to highlight all of the key aspects of the device organized into bulleted lists (Figure 4). It is comprehensive, showing typical power consumption, clock system capabilities, peripheral mix and package options.

Figure 4
Figure 4 (graphics4.png)

This information is a great start, but is targeted as more of a marketing message than a reference. Going beyond the first page is critical to fully assess the given device’s capabilities and its limitations. Looking beyond the first page begins to yield the information needed to really design a system with the MSP430 MCU. This begins with the available options for the device and variants. For example, there are 40 device and orderable part number variants for the MSP430G2553 device. These variants provide different mixes of flash or RAM, peripherals available, number of I/Os supported, and package options such as DIP or surface-mount options.

While all information in a data sheet should be considered important, we recommend focusing on these areas when reviewing a data sheet for a specific MSP430 MCU:

  • Supported interrupt sources, corresponding flags and priority (Figure 5).
Figure 5
Figure 5 (graphics5.png)
  • Calibration data such as internal clock defaults and ADC offset/gain settings (Figure 6).
Figure 6
Figure 6 (graphics6.png)
  • Timer functions and pinouts for each capture-compare I/O (Figure 7).
Figure 7
Figure 7 (graphics7.png)
  • Absolute maximum ratings and recommended operating conditions, including voltage and temperature, as well as CPU clock speeds vs. Vcc (Figure 8).
Figure 8
Figure 8 (graphics8.png)
  • Performance specifications for power consumption, analog accuracy, clock tolerances, etc. (Current consumption and ADC performance excerpts shown in Figure 9).
Figure 9
Figure 9 (graphics9.png)
  • Port schematics and pin function tables that detail exactly how to select a given multiplexed function on a given pin using the I/O control registers (Figure 10).
Figure 10
Figure 10 (graphics10.png)
  • Package information providing package tolerances, useful when creating device footprints in schematic/PCB CAD tools (Figure 11).
Figure 11
Figure 11 (graphics11.png)

Now that we have reviewed the MSP430 device documentation and where to find information about what a device can do, let’s walk through the process of actually selecting the part that best suits a given design need.

Let’s start by answering the questions below:

  • 1. “What problem am I trying to solve?” This is fundamental. Until you understand this, nothing else can happen. Knowing what problem you face at a system level allows you to identify how the MCU's features can help you solve that problem most efficiently.
  • Do analog signals need to be measured, such as a voltage from a strain gauge or an output from a potentiometer? If so, perhaps an integrated ADC is of value. If a simple analog threshold is all you need, an integrated comparator will likely do the trick.
  • What is the user interface? Switches likely translate into simple digital interrupt inputs, while displays may require a communication bus such as SPI in order to refresh the data displayed.
  • Are time-sensitive signals needed off-chip? Perhaps you need a PWM signal to control a motor’s speed or LED brightness.
  • What are the other devices or circuits that the MCU needs to interface with? Identifying potential analog inputs, logic-level digital I/O signals, or communication interfaces such as I2C or UART will all help you find the right MCU to fit the application need.
  • 2. “How many 'things' need to be input into the device or driven from the device [as outputs])?” Determining this at a block level for the system, and then at a more detailed MCU pinout level, will clarify exactly how many I/O pins you will need.
  • 3. “What are my power-supply requirements/limitations?” This is important, as the MCU supply may impact the overall system design. For example, if powered from a 9-V battery, the MSP430 MCU will need a regulator to bring its supply to within the 1.8- to 3.6-V range.
  • 4. “How much memory will my application need?” This is not always obvious, as the software may not yet be written. But if you plan on using existing code, or modifying code already written, you can get an idea of what a given function in software might require in terms of program and data-memory needs. And when you need certain algorithms such as fast Fourier transform or filtering, you can often estimate RAM requirements before ever selecting the device by simulating the functions on a PC.
  • 5. “Are any ‘special’ features needed?” For example, do you need a USB interface to a PC? Or a high-resolution ADC (>12 bits) to get a certain system performance? Consider looking for MCUs that offer such features integrated to minimize the system-level design effort and complexity required.
  • 6. “Are there any physical design or assembly constraints (package size, pin spacing, PCB or assembly capability)?” Often, the box the final system must fit into is a factor. This can have big implications on package requirements, pin-count limits and PCB design complexity/cost. Also consider testing a final system – the more dense a design or package is with respect to PCB routing, the more challenging it is to assemble and debug. DIPs are easiest, with BGAs being quite challenging.

Numerous devices available in the MSP430 family portfolio can meet the given system requirements uncovered in these questions. We've listed a few in Table 1, with their own unique feature sets. A key driver in listing these specific parts is their ease of use. They are available in DIP packages and are supported by a flexible and scalable development tool that can accelerate prototyping of a given application.

graphics12.png

Table 1. Three MSP430 devices with typical characteristics.

Each of the devices can be used with the MSP430 MCU LaunchPad to provide an easy, intuitive and out-of-the-box development experience (Figure 12).

Figure 12
Figure 12 (graphics13.png)

Solving any design challenge begins by understanding the problem and any constraints that the system may have. Once you have established a clear picture of the problem you need to solve, finding the ideal way to solve that problem – using an MCU – can be straightforward if you understand the capabilities that MCUs offer. Being able to navigate the MSP430 family, its feature set, and the available devices and development tools are keys to success in meeting such a system design challenge.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks