On Thu, Aug 22, 2002 at 06:42:54PM +0200, Johan Fredriksson wrote: > Hi, > > Well...I've been reading the datasheets a couple of time before sending > this mail. I must say that it hasn't made me any wiser. > My DS18S20 is used with +5, Gnd and signal so it should not be a need > for a strong pullup. And as I can read the ROM ID I know it's connected > correct. > > This is my code for reading the temp. In this code I tried with pullup also. > As before all chars from DS2480B is read by the interrupt routine. Well, I've never interfaced to a DS18S20 using the DS2480B. But I have recently written code to talk directly to a DS18S20 using bit-banging 1-wire routines. Here's a snippet that reads the temperature. OwReset sends a 1-wire reset pulse. OwTouchByte essentially writes a byte of data over a 1-wire link. OwReadByte reads a byte over a 1-wire link. call OwReset btfss OwPresence ; Is presence set? goto No1820 ; No... movlw 0xcc ; Issue Skip ROM command call OwTouchByte ; . movlw 0x44 ; Start temperature conversion call OwTouchByte ; . delayS 2 ; Wait 2 seconds for conversion to complete call OwReset ; Reset again movlw 0xcc ; Issue Skip ROM command call OwTouchByte ; . movlw 0xbe ; Read the temperature call OwTouchByte ; . call OwReadByte ; Read 2 bytes, and store in tempL and tempH movwf tempL call OwReadByte movwf tempH call OwReset ; We only care about the first 2 ; bytes, so abort the rest of the ; transaction It looks like you have the DS18S20 protocol correct. So maybe you have something wrong talking to the DS2480B. -Dave -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.