I am trying to write a simple variable to 1 address and then read it, but the program gets stuck and never move for some reason. After I am finished with 1 eeprom, I will try with 2 on a bus.
It gets stuck on "i2c_start ()" in the driver and never moves on.
main.txt - main program
2432.txt - driver
i2c eeprom.png - circuit
It gets stuck on "i2c_start ()" in the driver and never moves on.
Code:
BOOLEAN ext_eeprom_ready() {
int1 ack;
i2c_start(); // If the write command is acknowledged,
ack = i2c_write(0xa0); // then the device is ready.
i2c_stop();
return !ack;
}
2432.txt - driver
i2c eeprom.png - circuit
Attachments
-
9.3 KB Views: 12
-
3.7 KB Views: 10
-
283.4 KB Views: 13