Hi all,
I am trying to drive an I2C device from a windows CE board, unfortunately without success. I am trying the following test program...
void I2CStart() { // Initialize the unit
// put slave address in ISAR g_wISAR = 0x20;
// enable desired interrupts in ICR. // Arbitration loss detect interrupt NOT enabled
g_wICR |= (ICR_ITEIE | ICR_IRFIE | ICR_BEIE | ICR_SSDIE | ICR_SADIE);
// enable i2c and scl g_wICR |= (ICR_IUE | ICR_SCLE);
// write to motor driver g_byIDBR = (0xb0);
// disable stop and arbitration in icr g_wICR &= ~(ICR_STOP | ICR_ALDIE);
// enable start and transfer byte in icr g_wICR |= ICR_START; g_wICR |= ICR_TB;
Sleep(100);
PrintI2C(); }
PrintI2C() is a very simple function that lists all the I2C registers. All but ISR have the expected values; ISR value is 0. I Think that at this stage it should have had the Transmit Empty flag enabled (?).
Controller I2C supply voltage is 3.3 volts, board is 5V. I am using a PCA9306 to shift levels. I have soldered two 2k2 (from SCL and SDA to supply) both sides.
Any Ideas please?
Thanks Best Regards
Carmel Gafa