At a guess, I'd say that you have it set to higher than 9-bit resolution? AFAIK, the DS1822 has user configurable 9 to 12-bit resolution. -marc On Mon, Aug 10, 2009 at 9:23 AM, jim wrote: > All, > > I worked yesterday getting my one wire routines working, which I > accomplished. > The 1822 One Wire Temp Sensor is a 9 bit sensor. It has a range of -55C to > +125C. > It uses 2's complement math for the negative temps. It's temperature > measurement is > contained in 2 bytes. The LSB is the temp reading in .5C increments. The > MSB is the > sign bit. All 8 positions in the MSB are sign bits. So, I gather that if > the temp is negative, > all 8 bits of the MSB would be set. However, when the PIC reads the Temp > sensor, I get > the correct (approximately) reading in the LSB, but the MSB has 1 or 2 bits > set. It's not > clear to me from the datasheet whether all 8 bits should be set for > negative temps, or if it can > be any number of bits set for negative temps. > > Does anyone have any experience with one wire comms, especially with this > temp sensor? > If so, do you have any idea about the MSB and how the sign bit is supposed > to work? > Or any other insight that may give me an idea if I'm doing anything wrong. > > BTW, I've tried powering this sensor from Vdd and using parasite power, and > it acts the same either way. > Also, I opowered it from 5 volts and from 3 volts, and that doesn't change > anything either. > > Please advise. > > > Thanks > and Regards, > > > Jim > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist