hello sir/madam, using LPC3250,i'm interfacing eeprom at24c64 it is based on I2C protocol. when i'm going to interface this module (eeprom), i'm not getting any clock pulses on SCL and SDA .so what can be the possible reason for not seeing any pulses on clock and data pin. we had check the hardware connection properly and also provided pullup(1k) to both SDA and SCL.below we are adding initialization code please have a look and let us know your opinion.
void i2c1_init(void) { I2CCLK_CTRL = 0x00000001 ; I2C1_CTRL = 0x00000000 ; I2C1_CLKH = 520 ; // 520 I2C1_CLKL = 520 ; // 520 }
how controller knows he is configured in master or slave mode
Thanks & Regards madhu krishna.G
From the values that you write to the configuration registers!
Given that you missed the clear instructions on how to post source code:
www.danlhenry.com/.../keil_code.png
there must be a high likelihood that you have similarly missed other important details in the LPC3250 documentation - so you should go back and check very carefully.
Don't NXP provide any examples of using the I2C on this chip?
Or Keil: http://www.keil.com/download/ ?
Hi, Sorry for the improper posting of source code in future will take the correct measure. as for as in lpc3250 I2C pin are not multiplexed with any other pins . what can be the other possible check we can make.We are once again looking into datasheet of lpc3250. For reference code we are using NXP cdl library for lpc3250. Waiting for your reply.
Thanks & regards madhu krihna .G
You don't state which of the two I2C interfaces you want to use.
Your code conditions I2C1_CTRL, I2C1_CLKH and I2C1_CLKL - Which, if you're using the 'standard' Keil header file, would be the second of the two interfaces.
You condition I2CCLK_CTRL setting bit 0 - Which controls the first of the two interfaces.
The Keil header file refers to the I2C interfaces as #0 and #1.
The NXP documentation refers to the I2C interfaces as #1 and #2.
Yes, I noticed. It was the I2S that shared function with GPIO.
Sir,
We have already done that change. Few minutes back we were able to solve the problem if we change clock parameter to the values shown below we were able to read and write data from memory
I2C1_CLKH =94 I2C1_CLKL =166
Asymmetric I2c Clock(per 40khz i2c spec page no 516 of Usermanual UM10326 ) ,but one thing we didn't understand why it worked for Asymmetric clock case and not symmetric case.
Waiting for your reply
Regards & Thanks Madhu