SLAA249B April   2005  – September 2018 MSP430F169 , MSP430F169 , MSP430F5252 , MSP430F5252 , MSP430F5253 , MSP430F5253 , MSP430F5254 , MSP430F5254 , MSP430F5255 , MSP430F5255 , MSP430F5256 , MSP430F5256 , MSP430F5257 , MSP430F5257 , MSP430F5258 , MSP430F5258 , MSP430F5259 , MSP430F5259

 

  1.   Implementing SMBus Using MSP430™ Hardware I2C
    1.     Trademarks
    2. 1 Introduction
    3. 2 SMBus Protocols
    4. 3 Software
    5. 4 Example Code
      1. 4.1 Example 1
        1.       fet140_SMB_mstr.c(.s43)
        2.       fet140_SMB_slav.c(.s43)
      2. 4.2 Example 2
        1.       fet140_SMB_mstr_slvrst.c(.s43)
        2.       fet140_SMB_slav_slvrst.c(.s43)
      3. 4.3 Example 3
        1.       fet140_SMB_mstr_PEC.c
        2.       fet140_SMB_slave_PEC.c
      4. 4.4 Example 4
        1.       fet140_SMB_tmp175.c
    6. 5 SMBus Using the USCI I2C Peripheral
      1. 5.1 Example 1a: Timeout Implementation for Master/Slave on a MSP430F2xx Device
        1.       msp430x26x_SMB_MST_timeout.c
        2.       msp430x26x_SMB_SLV_timeout.c
      2. 5.2 Example 1b: Timeout Implementation for Master/Slave on a MSP430F5xx Device
        1.       msp430x5xx_SMB_MST_timeout.c
        2.       msp430x5xx_SMB_SLV_timeout.c
      3. 5.3 Example 2: Implementation of CRC-8 PEC
        1.       msp430x26x_SMB_mstr_PEC.c
        2.       msp430x26x_SMB_slave_PEC.c
      4. 5.4 Example 3: Implementation With SMBUS Slave TMP175
        1.       msp430x26x_SMB_tmp175.c
    7. 6 Conclusion
    8. 7 References
  2.   Revision History

msp430x26x_SMB_tmp175.c

This is the master code source used to communicate with the TMP175 digital temperature sensor. [3] The TMP175 is a SMBus-compatible slave device. This example sets up the TMP175 in 9-bit temperature mode with interrupt (TM = 1) to test the SMBALERT function. The master reads the temperature from the TMP175. Since the TMP175 is in the interrupt mode, the ALERT pin becomes active when the temperature equals or exceeds T(high) or equals or falls below T(low). See the TMP175 data sheet for more details. [3] The ALERT pin remains active until the device successfully responds to the SMBus alert response address. The alert pin is pulled up to VCC through a resistor. This pin is tied to P2.0 of the MSP430F2619. P2.0 is set to detect a falling edge transition, and the MSP430 master responds by sending the Alert Response Address (ARA) on the bus. The slave device that pulled the alert line low responds by sending its device address as the data byte. The master then receives the slave device address, determines which slave issued the alert, and proceeds accordingly. This portion has not been implemented in the example code but the I2C transaction framework is provided for the user. See reference [2] for more details on Alert Response Address.

TimerA0 (clocked by SMCLK/DCO at 1.1 MHz) is set to have the master periodically send out the start condition to request a new temperature reading from the TMP175.