At 16:00 29.04.1998 +1200, you wrote: Hi, >the data takes about 1 second to obtain. Is there a way >I can get the master that sent the request to wait for >the PIC without the PIC becoming the master and >transmitting the data back. one possibility (which I used) is to provide another line for handshaking. The master is requesting data (by sending a write-command) and if the line is activated the master will issue a read-command. > >Does the I2C protocol define a way of communicating with >very slow devices on the bus? Another way is what they call "clockstretching". If a slave gets a read-command it is allowed to pull the SCL high until it is able to provide the data. In your case this would result in a 1sec wait for the master. Here it depends on its hard- and software how to handle this waitstate. The time this will be take is not defined by the I2C-protocol ! Or: provide a statusregister in your slave. After the datarequest (a write-command, too) of the master it will poll this register until it is set. Then the readcommand will follow by the master. > >Maybe I2C is not the best protocol, please comment. The protocol is really fine. The problem is that all the PICs doesn't have the masterability hardwareimplemented. So here is the fourth (and hardest) way: implement a "softwaremaster" in your PIC which arbitrates the I2C bus on its own. Regards Thomas =8-) -- ********************************************************** * Thomas Magin FON: ++49-761-4543-489 * * marquette-Hellige GmbH FAX: -507 * * M&E-FW / Emergency Systems email: magin@hellige.de * * Munzinger Str. 3 * * D-79111 Freiburg / Germany * **********************************************************