//****************************************************************************** // MSP430G2xx2 Demo - I2C Master Receiver, single byte // // Description: I2C Master communicates with I2C Slave using // the USI Slave data should increment from 0x00 with each transmitted byte // which is verified by the Master // LED off for address or data Ack; LED on for address or data NAck // ACLK = n/a, MCLK = SMCLK = Calibrated 1MHz // // ***THIS IS THE MASTER CODE*** // // Slave Master // (MSP430G2xx2_usi_09.c) // MSP430G2xx2MSP430G2xx2 // // /|\| XIN|/|\| XIN|// | | | | | | // |RST XOUT| |RST XOUT|// | | | | // LED LED // | SDA/P1.7| ->|P1.7/SDA | // | SCL/P1.6|< -|P1.6/SCL | // // Note: internal pull-ups are used in this example for SDA & SCL // // D Dang // Texas Instruments Inc // December 2010 // Built with CCS Version 4.2.0 and IAR Embedded Workbench Version: 5.10 //****************************************************************************** #include char SLV_data = 0x00; char SLV_Addr = 0x91; int I2C_State = 0; // Variable for received data // Address is 0x48