25 functions for 25 cents: communication functions

Other Parts Discussed in Post: MSP430FR2000

Have you ever used a home entertainment system or a home security system? Have you ever toured an automated factory? You may have found yourself wondering how all of the devices in these systems work together. From complex industrial systems to home appliances, electronic systems that we use every day require the ability to communicate with each other and relay information to the various nodes within.

TI’s MSP430™ value line sensing family of microcontrollers (MCUs) combines communication functionality with the ability to process signals while making use of various other peripherals, all on a single integrated circuit (IC). The MSP430 value line sensing MCU TechNote series includes a communications category with papers that discuss various ways to make use of this communication functionality, including these four TechNotes:

One important aspect of communication between multiple ICs or systems is the ability to translate between different communication protocols. The “UART-to-SPI Bridge Using Low-Memory MSP430 MCUs” TechNote demonstrates how to use a low-cost MCU as a bridge between Universal Asynchronous Receiver Transmitter (UART) and Serial Peripheral Interface (SPI) serial protocols. You can implement this functionality on a low-cost MCU like the MSP430FR2000 that only contains one Universal Serial Communication Interface (eUSCI) module by making use of general-purpose input/outputs (GPIOs) to provide a software UART interface, while the eUSCI module handles SPI communication.

In the implementation discussed in the TechNote, the eUSCI module is an SPI master in three-wire mode. On the other side, two GPIOs and the Timer_B peripheral are used for UART communication. The system supports bidirectional communication over the bridge, and is triggered when the MSP430 MCU’s software UART receives a data byte. This data byte is sent to the SPI port’s transmit buffer and transferred over the SPI bus to the slave device. A data byte received over the SPI bus will travel back over the bridge for transmission by the software UART. Figure 1 is a block diagram showing this bridge and its interfaces.

Figure 1: UART-to-SPI bridge block diagram

In addition to translating between different communications protocols, it may also be necessary to communicate between devices operating at different baud rates. This is often necessary when using UART, for example, because it is an asynchronous protocol that requires that communicating devices use the same baud rate. Similar to the UART-to-SPI bridge, the “UART-to-UART Bridge Using Low-Memory MSP430 MCUs” TechNote demonstrates how to use a low-cost MCU as a bridge between two UART devices operating at different baud rates.

Another communication consideration important in electronic systems is reducing the number of hardware connections. The “Single-Wire Communication Host with MSP430 Microcontrollers” TechNote demonstrates an implementation of a one-wire serial interface that adheres to a protocol easily achievable with MSP430 MCUs acting as the master.

Designed to operate on our lowest-cost MSP430 devices, the code for the communication functions fit within the half kilobyte of memory on the MSP430FR2000 MCU. You can add additional functionality by using the up to 4KB of memory available with MSP430FR21xx MCUs. These devices are available in a 16-pin thin-shrink small outline package (TSSOP) and a 24-pin very thin quad-flat no lead (VQFN) package. With 1,000-unit suggested resale prices as low as 29 cents (25 cents in higher volumes), these MCUs enable a programmable alternative to many of today’s fixed-function ICs.


Additional resources