//****************************************************************************** // MSP430G2x21/G2x31 Demo - I2C Slave Transmitter, single byte // // Description: I2C Slave communicates with I2C Master using // the USI Slave data is sent and increments 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 SLAVE CODE*** // // Slave Master // (msp430g2x21_usi_06.c) // MSP430G2x21/G2x31 MSP430G2x21/G2x31 // // /|\| 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 // October 2010 // Built with CCS Version 4.2.0 and IAR Embedded Workbench Version: 5.10 //****************************************************************************** #include char SLV_Data = 0; char SLV_Addr = 0x90; int I2C_State = 0; // Variable for transmitted data // Address is 0x48