Re: [請教]PIC32MX230F064D的I2C Slave Mode

作者 zero7386 於 2018年01月19日 14:55:34
謝謝大大的回覆.
原來我之前是位置設定到10bits的.

想請教另一個問題,我現在進到
void __ISR( _I2C_2_VECTOR, IPL1AUTO) _I2C_2 ( void )裡的

if (I2C2_READ_NOT_WRITE_STATUS_BIT == 0)
{

// it is a write, go to receive mode
not_busy = I2C2_StatusCallback(I2C2_SLAVE_RECEIVE_REQUEST_DETECTED);
i2c2_slave_state = S_SLAVE_RECEIVE_MODE;

if (not_busy == true)
{
// read the receive register only when
// we are ready for the next transaction.
// this one is a dummy read
dummy = I2C2_RECEIVE_REG;
}

}

就會在收不下來資料,請問"dummy = I2C2_RECEIVE_REG;"這裡是要怎麼處理?

來自: http://www.microchip.com.tw/newbb/viewtopic.php?forum=8&topic_id=22189&post_id=77708