I am using a Mega8 as TWI master and connected 4 EEPROM devices as slaves. The first slave address (in write mode) is 0xa0, the second 0xa2, the third 0xa4 and the fourth 0xa6. When I address the first chip I am able to read the data properly in the first go itself. But when I try to read the second device's data, for some peculiar reason, corrupted data comes. After many reads from the same device, correct data starts coming out!!!
Once the data comes out properly, any number reads there is no problem. If power is switched off and switched On after some time, the problem starts. I need to read the device at least 40-50 times before correct data starts coming out. I have tried all possible combinations including changing the pull-up resistors but to no avail. I am at my wits end to know what the problem is. Any help will be highly appreciated.
All manufacturers claim that multiple devices can be connected to a single TWI bus, so I wonder where I am going wrong.