2006-07-05 01:28 AM
2006-07-04 01:34 AM
hi,
I'm trying to make the communication between the I2C bus with a M24C02 EEPROM . what is the difference between it and other m24cxx. can anyone send an example of working I2C with it. thanks in advance2006-07-04 01:41 AM
Hi,
There is an ST application note 'STR71x I2C Communication with M24Cxx EEPROM' available on the following link: http://mcu.st.com/mcu/modules.php?name=mcu&file=familiesdocs&fam=86 I hope that this can help you, Regards, Hich ;)2006-07-04 09:32 PM
hi,
thanks hich. it works now. But i had a new problem. i'm trying to get I2C0 and I2c1 to work. well I2C1 seems to be working fine, but not I2C0 which not giving out any signal. I probed it using oscilloscope. Does the 2 ports has a different bus address?? anyone can help me with this? thanks2006-07-04 10:30 PM
hi,
thanks RISC yes i've configured both as AF open drain but it seems only I2C1 is working.i included the code for I2C0 configuring which is basically about the same for I2C1. GPIO_Config(GPIO1, I2C_SCL0|I2C_SDA0, GPIO_AF_OD); //Open-drain output for SCL (P1.13), SDA (P1.14) I2C_Init(I2C0); //Initialize I2C1 Peripheral //APB_ClockConfig( APB1, ENABLE, 0x0004 ); //Enabling I2C clock via APB I2C_FCLKConfig(I2C0); //Config I2C freq. according for FCLK freq. I2C_OnOffConfig(I2C0, ENABLE); //Enable I2C Peripheral //I2C_AddressConfig ( I2C0, 0xC0, I2C_Mode7);//configure the BUS address I2C_SpeedConfig(I2C0,100000); //Select I2C Clock speed = 100khz I2C_AcknowledgeConfig(I2C0, ENABLE); //Enable Acknowledge feature I2C_ITConfig (I2C0, ENABLE); // // Enable the interrupt generation thanks,2006-07-04 11:42 PM
hi,
yes all gpios and i2cs has been uncommented. ive tested the 2 programs which uses i2c1 and i2c0 respectively with the exact same code. i2c1 works but i2c0 doesnt. i'm using raisonance reva starter kit btw. thanks2006-07-05 01:28 AM
hi,
thats what i figured out this morning that I2C0 not connected to the HW but i;m not entirely sure. but since you mention it then its should be true. to answer your question, nope i havent made any HW modification. thanks a lot btw. thanks again.