Altera_Forum
Honored Contributor
14 years agoI2C width problem...!
Hello,
Suppose if slave device data width is 32 bit (means if we want to read it through i2c,slave device will output 32 bit data).But my I2C IP- receive register width is only 8 bit.so reading i2c results only to display 8 bit at a time.then how to get all 32 bits between one START and one STOP condition. So,kindly tell me,if i get first 8 bits of data,how to get another 8 bits of data then another.. upto 32 bits? In Nios II, I have put "counter" which counts up to four (4 bytes=32 bits),after that it will again reset to 0 and again new START condition which i have put in while(1) loop to read continuously 32 bits(4 bytes). Just want to know,will this work or will i get 32 bits data all properly which was actually transmitted from the slave device? or if any other solution,kindly suggest me. I have attached the code. Thanks.