In-Circuit Programming with the Texas Instruments LaunchPad

The Texas Instruments MSP430 family of 16-bit microcontrollers was introduced way back in 1992. Just for a little context, George Bush (the first one) was president of the United States, the maiden voyage of the space shuttle Endeavor launched, and Microsoft introduced Windows 3.1. Needless to say, the MSP430 has been a long-lived microcontroller with a strong pedigree. It was designed as a mixed-signal, low-power, 16-bit microcontroller for embedded devices that has been used in countless products over the years.

Fast forward from 1992 to 2017; that’s when I had my own first encounter with the MSP430 series while working on a product design in my lab. I ultimately chose the MSP430G2553IPW20 (Figure 1) for my design because of its low cost, low power consumption, and its wide array of capabilities including multiple analog-to-digital converters (ADCs) and timers, 16 megahertz (MHz) performance, the large number of general purpose input/output pins (GPIO) pins, universal asynchronous receiver/transmitter (UART), serial peripheral interface (SPI), and inter-integrated circuit (I2C) communications.

Figure 1: The functional block diagram of the MSP430G2553IPW20 shows many of its capabilities. (Image source: Texas Instruments)

But if I’m being honest, my initial temptation to use it was because several years earlier, I’d purchased a Texas Instruments MSP-EXP430G2 (now obsolete) LaunchPad kit, which provided an emulator/programmer for the MSP430G2553. The kit had been collecting dust in my lab, and I thought I should at least give it a whirl.

I was not disappointed! Now, I have been accused of being somewhat of a Texas Instruments fan, but I found the MSP430G2553IPW20 to be quite powerful and easy to understand (even though the user guide is over 700 pages!)

Using the LaunchPad and Texas Instruments’ free Code Composer Studio integrated development environment (IDE), I was generating firmware for my product in no time. There is also an open-source IDE called Energia that supports the MSP430 product line. Energia provides a development environment very similar to the Arduino IDE that is just as intuitive.

Though I cut my teeth programming the MSP430G2553 with the MSP-EXP430G2 LaunchPad (the obsolete one), I have since upgraded to the MSP-EXP430G2ET (Figure 2). Besides changing the USB interface from USB Mini to a USB Micro, adding a 5 volt source, and nicer posts to support it on the bench, the two programmers are pretty much the same. Both programmers have a 20-pin, dual-in-line package (DIP) header for the MSP430G2553 microcontroller, and both support the MSP430G2xx2, MSP430G2xx3, and MSP430F20xx devices in 14-DIP or 20-DIP packages.

Figure 2: The MSP-EXP430G2ET LaunchPad simplifies programming of MSP430 microcontrollers (Image source: Texas Instruments)

Using the MSP430G2ET as an in-circuit programmer

While the MSP-EXP430G2ET programmer is easy enough to use when programming a microcontroller placed into the onboard DIP header, it can also be used as an in-circuit programmer. Texas Instruments developed a protocol specifically for the MSP430 called Spy-Bi-Wire (SBW). SBW is a two-wire implementation of the Joint Test Action Group (JTAG) protocol. The two pins associated with the SBW protocol on the MSP-EXP430G2ET LaunchPad are the RST and TEST pins.

If your design uses any of the supported MSP430 family mentioned above, you can use the MSP-EXP430G2ET for in-circuit programming by connecting Vcc, RST, TEST, and GND (pins 1, 16, 17, and 20 on the MSP430G2x13 and MSP430G2x53, 20-pin devices) from the programmer to an exposed header on your design (Figure 3). If your design is self-powered, then there is no need for the Vcc connection.

The RST pin is pulled HIGH when programming the MSP430, so it’s recommended that you put a 4.7 kilohm (kΩ) resistor in series with it to limit its current draw. I have been using this SBW approach for hundreds of my products, and it has worked like a charm.

Figure 3: The MSP-EXP430G2ET can be used as an in-circuit programmer by connecting it to an exposed MSP430 header on your design. (Image source: Doug Peters)

Conclusion

Given its age, the MSP430G2xx2 series might be considered old-school in some circles, but don’t overlook it for your next design. It has a surplus of capabilities and decades of solid, field-proven usage. You’ll find significant amounts of support online and hundreds of examples to help troubleshoot any issues you run into. Remember to get the MSP-EXP430G2ET LaunchPad, and you will have a great in-circuit programmer as well!

About this author

Image of Doug Peters

Doug Peters is the Founder of Bluebird Labs, LLC in Eden Prairie, MN. He has a B.S. degree in Electrical Engineering from Northeastern University in Boston, MA and an M.S. certificate in Applied Statistics, from Penn State University. He worked for 10 years at GE in Telematics and worked at NeXT computer as a systems engineer many, many years ago. You can reach him at [email protected].

More posts by Doug Peters
 TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum