hello everybody;
I’m trying to write data to I2C eeprom Atmel 24C64AN by MSP430F1232. I have tried to use 2 pins of MSP430 to simulate I2C communication but it didn’t work. Can anyone give me some codes or hint to write it?
Thanks for advance.
hello everybody;
I’m trying to write data to I2C eeprom Atmel 24C64AN by MSP430F1232. I have tried to use 2 pins of MSP430 to simulate I2C communication but it didn’t work. Can anyone give me some codes or hint to write it?
Thanks for advance.
It’s a bit tedious but not difficult.
I used P1.2 for data and P1.3 for clock with 3K pull up resistor on each.
In order to avoid confusion I set up really simple procedures - like DataUP, DataDn, ClckUp, ClckDn… then just walked my way through the operating description.
The operation is straight forward until you get to the Acknowledge bit. The target device responds with an acknowledge bit immediately after it gets the bit stream. At that time P1.2 is configured as an output so there is a conflict. You have to reconfigure the I/O pin and then generate a clock pulse.
The other problem I had was not reading the memory device spec in detail. It said the write and read operations were identical so I did not go further. Wrong! The write procedure is used to set the memory address followed by a Stop condition and a Read command.
Crane