AnsweredAssumed Answered

I2C and Processor Expert

Question asked by Nathan Hay on May 10, 2006
Latest reply on May 23, 2006 by Processor Expert

I am relatively new to micro-controllers and having trouble with my first I2C application. I am using a MC9S1C32 processor to communicate with an external capacitance to digital Converter (AD7746). I have the micro correctly hooked up to the data/clock lines of the converter, and the I2C bean added in my project. I am using code warrior 5.5.1272 and processor expert 2.95. In the I2C bean settings, I entered in the slave address 72 which is specified in the AD7746 datasheet. I believe my problems are in the way I am trying to call the functions generated by the I2C bean.

Currently my I2C code is as follows:

EI2C1_SendChar(0x01); //Send x01 over I2C to set sub address register of converter to 1

EI2C1_RecvBlock( 0xC000, 3); //Receive 3 blocks of data from the converter, store starting at address C000

That code then gets repeated every second.

When I look at address C000 with the debugger, the values never change from zero (I have a small capacitor hooked up to the converter capacitance measurement channel). I viewed the data/clock lines with a scope to verify messages where being send, and I was seeing serial like communication.

Also the AD7746 external ready pin never changes when viewed with a scope. So I believe another problem is I never "say go".

Anyone have any help, pointers?

Thanks.

Outcomes