Forum Discussion
Altera_Forum
Honored Contributor
19 years agohi :
I write the i2c read and write function follow fischer's sample. The write function is work fine. But the read function hava a little problem. I find the i2c will work fail after use the read function. The reason is I didn't send the ACK to I2C slave. so the I2C slave still engross the I2C date. I try some ways to send the ACK signel to slave ,but not success. for instance: * * * IOWR(I2C_MASTER_0_BASE,I2C_CR,CR_IACK); // IOWR(I2C_MASTER_0_BASE,I2C_CR,CR_NACK ); *data=IORD(I2C_MASTER_0_BASE,I2C_RXR); * * * Who can give me some advice? Thanks a lot!