I'm trying to interface a Dalsemi DS1721 Temp chip to the i2c bus of a PIC16F877... Everything seems to work for a little bit, I tell the DS1721 to start free running mode with default setup, then start looping and reading the temp every 2 seconds or so.. but after 5 or so reads of the temperature the PIC locks up in the temp recieve macro.. The macros are based off John Sand's stuff on the piclist page and are as follows: This function initilizes the DS1721...seems to work ok init_temp call start_i2c movlw TEMP_ADDR_W movwf SSPBUF call wait_for_ack_i2c movlw TEMP_STC ; Send StarT Conversion movwf SSPBUF call wait_for_ack_i2c ; Get ACK call stop_i2c return This one reads the current temp from the chip, locks up at some point, cant tell where due to lack of any debugging hardware. read_temp call start_i2c ; Send Start bit movlw TEMP_ADDR_W movwf SSPBUF call wait_for_ack_i2c movlw TEMP_RT ; Send Read Temp movwf SSPBUF call wait_for_ack_i2c ; Wait for ACK call start_i2c ; Send start again movlw TEMP_ADDR_R ; Send read address movwf SSPBUF call wait_for_ack_i2c ; Wait for ACK call enable_receive_i2c ; Get temperature MSB movf SSPBUF, W movwf Local_TempMSB ; Save it call enable_receive_i2c ; Get temperature LSB movf SSPBUF, W movwf Local_TempLSB ; Save it call stop_i2c ; We done return Again the call'd functions in these are John Sand's at http://www.piclist.com/techref/microchip/i2c87xjs.htm. Anyone have any idea what I'm doing wrong? BTW i added the mono. cap on the SDA line to correct the 16F877's I2C bug. Thanks in advance, Tim Thompson - Remember, 'kill' doesn't kill processes, users kill processes. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.