SLAA249B April 2005 – September 2018 MSP430F169 , MSP430F169 , MSP430F5252 , MSP430F5252 , MSP430F5253 , MSP430F5253 , MSP430F5254 , MSP430F5254 , MSP430F5255 , MSP430F5255 , MSP430F5256 , MSP430F5256 , MSP430F5257 , MSP430F5257 , MSP430F5258 , MSP430F5258 , MSP430F5259 , MSP430F5259
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.