??? 04/05/07 17:08 Read: times |
#136701 - Still Stuck? Responding to: ???'s previous message |
Asif Ali said:
Well sir i havent got your idea, that what do you want say exactly, well its right that the Ack will stuck the MCu, and it can also be the problem that device is not accessed, but in the Datasheet of the AT24C04 it is written that its address is 1010+A0+A1+A2+R/W (A2 can be accessd as page for the lower and upper portion) so after combining it all the address would be 10100000 (For write), so i think that device must have to atlease being accessed, am i right ?
DareDevil Asif, You are fine with your device address of 0xA0 in your circuit. I can see no speed problems either. But after your basic functions you must always leave SCK low to hold onto the bus. And your i2c_stop() should release both SDA and SCK (ie leave them high). Make sure that your circuit is OK. Call i2c_start() and check that bus is free. Then when you call i2c_write(0xA0) to address the device, you should get an ACK. If not then you can always release the bus and cause another START condition. No response to addressing the device means that the eeprom slave is not listening. If you get no response with a single eeprom on the bus and you being the only master, then you have a hardware problem. David |