This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cygnal I2C Example Programs (Need HELP !!!)

Hi,

I'm using CYGNAL F020, I'm trying to communicate with a I2C LCD wich has 0x50 slave adress. I looked at "Cygnal I2C Example Programs" but its not functional. I'm locked up waiting for while (BUS_BUSY); in the I2C_init, why ???

My SYSCLK is 22118400 so for 50 000 bps I have loaded SMB0CR = -221;

also I just modified the
void write_byte (unsigned char data_out, unsigned int address)
{
i2c_start(); // Send start signal
i2c_write(address); // Send identifier I2C address
i2c_write(data_out); // Send address to EEPROM
}

Does anyone have an Idea or some sample code that works. I just need to send an adress and a byte of data.

Thank you,

Parents Reply Children