This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C SCL Issue



 Hi everyone,

I have been struggling to get the I2C communication to work on my 28027F Launchpad.  I am trying to implement master-transmitter to a Holtek 16k33 which runs a alphanumeric display.  The SCL seems to have some problems with consistancy. In the screen shot it ranges from 307kHz to 250kHz in the address transfer.  I need to send these 4 values to activate the Holtek {0x21, 0xA3, 0xEF, 0x81}.  For now I'm just trying to send the first byte.  I'm a little confused on how the status register should sequence as a transmission takes place.

Thanks.

void InitI2C()
{
	I2C_setMode(i2cHandle, 0x0000);//Clear IRS bit so clock can be initialized
	I2C_setupClock(i2cHandle, 7, 10, 5);//Prescale set to 60MHz/6 = 7-12MHz, clkLow 10, clkHigh 5
	I2C_setMode(i2cHandle, 0x0020);//Set IRS bit in MDR
	I2C_setMasterSlaveAddr(i2cHandle, Slave_Addr);//Slave_Addr = 0x70
	
	return;
}

void I2C_Send()
{
	I2C_setDataCount(i2cHandle, 1);
	I2C_putData(i2cHandle, I2C_Send_Data[0]);//Send Data = 0x21
	I2C_setTransmit(i2cHandle);//set TRX bit in MDR
	I2C_setMaster(i2cHandle);//set MST bit in MDR
	I2C_setFreeRun(i2cHandle);//set FREE bit in MDR
	I2C_clearStop(i2cHandle);//clear STP bit in MDR
	I2C_setStart(i2cHandle);//set STT bit in MDR

	return;
}