> After almost a whole day of trying to look at code and fixing mine, I think I > finally got somewhere. The procedure for obtaining the temperature for a TC74 > seems to be this (correct me if I'm wrong: > http://www.microchip.com/download/lit/pline/analog/thermal/tempsens/serial /2146 > 2c.pdf). Anyway, the way I'm doing it is: > > Send 7-bits of address (I have the part # with address 1001 000) and then one > bit of R/W. The first phase of transfer always seems to be write, so I send a > 0. > First byte out then becomes: 1001 0000. > I then get a successful ACK (I set SDA high intentionally, and the slave > succesfully pulls it low). > > I then send the command to read the temperature, You should do a bus STOP here, followed by a bus START before the next command. > which is 00h. I also get a > successful ACK on this. According to the datasheet, it says to re-send the > slave address accept with the R/W bit set this time, so I send: 1001 0001. > And again, I get a successful ACK. > > Next, I should just send 8 clock pulses and be able to read the data on SDA, > but instead I get all 0's. Good. That's better than all 1s because somebody is at least pulling the bus low. Did you make sure the master released SDA before sending the 8 clocks? If it did, then the slave thinks it's addressed but probably confused. That could be explained by the missing STOP/START. Or, is it really cold in your office ? ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.