DS18B20 + Mega 2560 readings not coming back properly

I have a DS18B20 temperature sensor that has worked fine for me with my UNO, but i recently picked up a MEGA for a bigger project.

When i noticed the readings were not coming back properly from the MEGA (186 degrees fahrenheit in a room that is 68) I ran the temperature test example sketch that is in the IDE, and sure enough the UNO comes back correct, and the MEGA is way off.

Any ideas what this might be? Anything i need to do to compile it differently for the mega (I am setting the Tools -> Board -> to MEGA 2560) ?

ver of dallas i am using "// Version 3.7.2 modified on Dec 6, 2011 to support Arduino 1.0"
ver of onewire (has this fine stub at the top)

Copyright (c) 2007, Jim Studt  (original old version - many contributors since)

The latest version of this library may be found at:

Version 2.1: Arduino 1.0 compatibility, Paul Stoffregen

Version 2.0: Modifications by Paul Stoffregen, January 2010:

Modified to work with larger numbers of devices - avoids loop.
Tested in Arduino 11 alpha with 12 sensors.
26 Sept 2008 -- Robin James

Updated to work with arduino-0008 and to include skip() as of
2007/07/06. --RJL20

Modified to calculate the 8-bit CRC directly, avoiding the need for
the 256-byte lookup table to be loaded in RAM.  Tested in arduino-0010
-- Tom Pollard, Jan 23, 2008

Tom Pollard, pollard@alum.mit.edu, contributed around May 20, 2008

I have solved this issue with an updated version of DallasTemperature (although the version did or does not get incremented)


if (deviceAddress[0] == DS18S20MODEL) return 12; //


if (deviceAddress[0] == DS18S20MODEL) return 9; // this model has a fixed resolution