i2c - slaa368 - Using the USI I2C Code Library

i2c - slaa368 - Using the USI I2C Code Library -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Application Report SLAA368–September 2007 Using the USI I 2 C Code Library Priya Thanigai ..................................................................................................... MSP430 Applications ABSTRACT This document serves as an overview of the master and slave code libraries for I 2 C communication using the USI module as found on the MSP430F20xx. The USI I 2 C master and slave libraries encapsulate all the functions necessary to transmit and receive multiple bytes. The functions are written in assembly and can be accessed by any C program that includes the required header files. Contents 1 Introduction .......................................................................................... 2 2 I 2 C Master Library .................................................................................. 2 3 I 2 C Slave Library .................................................................................... 9 4 Code Size .......................................................................................... 13 5 References ......................................................................................... 13 List of Figures 1 Program Flow for Master Code Library .......................................................... 3 2 Program Flow for Slave Code Library ........................................................... 9 List of Tables 1 Code Size (IAR) ................................................................................... 13 All trademarks are the property of their respective owners. SLAA368–September 2007 1 Using the USI I 2 C Code Library Submit Documentation Feedback
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
www.ti.com 1 Introduction 2 I 2 C Master Library Introduction The USI module provides the basic functionality needed to support synchronous serial communication. When configured in the I 2 C mode, the USI module is an 8-bit shift register that can output a stream of serial data. With minimal software, it can be used to setup a master/slave relationship to implement serial communication. A software I 2 C library is especially useful for lower-pin-count devices that do not include a hardware module dedicated to I 2 C communication. The USI I 2 C libraries offer the functionality needed to configure the MSP430 as either a master or a slave device capable of transmission and reception of multiple bytes. The library functions are capable of servicing interrupts while allowing I 2 C transactions to take place in the background, without interfering with user applications. The definitions of the interrupt service routines, however, prevent the master and slave libraries from existing on the same device. The example files include a master MSP430 interface to a slave EEPROM device and to a slave MSP430 device. Note:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

i2c - slaa368 - Using the USI I2C Code Library -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online