Tool/software: Code Composer Studio
Hi everyone,
I am using I2C to connect to a slave (MCP9808) that has the following timing diagram:
I have a bunch of questions concerning I2C Module in TMS320F28027:
1/ Does setting I2caRegs.I2CSAR = 0x18; means that i shouldn't send the slave address only the register address and MCU will do that automatically!! and does the slave respond with 2 ACK (1 for slave address and 1 for register address)?
2/ Why i can't see the frequancy of SCL after setting up the clock ? even if the transmitting and receiveing isn't done at least i should see the SCL clock, right !?
//============================================= configuring the I2C module clocks. I2caRegs.I2CMDR.bit.IRS = 0; //put the I2C module to reset state to config clocks I2caRegs.I2CPSC.all = 5;//setting IPSC to 5 results in a module clock of 10 MHz (module clock = CPU clock / (IPSC + 1)) //The master clock //Tmod * (ICCH + d) and Tmod * (ICCL + d) formulas respectively, where Tmod = 1/module clock, and d = 5 //both high-time and low-time to be 12.5 us, resulting in 25 us periodic time, equivalent to 40 kHz I2C frequency I2caRegs.I2CCLKL = 10;//120; I2caRegs.I2CCLKH = 5; //120; //I2caRegs.I2CMDR.bit.MST = 1; //resets after each stop condition I2caRegs.I2CMDR.bit.IRS = 1;//put the I2C module out of reset state
3/ In the eeprom example i got the following signal in SCL, is it suppose to be like this !?
Thank you,
Regards,
