by sjn3 on Sun Nov 18, 2012 10:42 pm

Has anyone tried reading the temperature data registers in a Chronodot? I'm getting good time and date data off the chip using the appropriate register offset & quantity with this code so I believe I _am_ addressing registers 11h & 12h; but tempMSB is always 2h and tempLSB is always 12h even while heating or cooling the chip (which automatically updates the registers every 64 seconds).

Any ideas/comments? Thanks.

My code:
Wire.beginTransmission(0x68); // 0x68 is DS3231 device address
Wire.write((byte)11); // start at register 11h
Wire.endTransmission();
Wire.requestFrom(0x68, 2); // read 11h & 12h
while(Wire.available()) {
tempMSB = Wire.read(); //get signed integer: MSB=sign, 7 LSB = integer
tempLSB = Wire.read(); //get binary decimal: 2 MSB = data, 6 LSB = 0
}
sjn3
 
Posts: 15
Joined: Fri Nov 19, 2010 11:36 am

by macegr on Sun Nov 18, 2012 11:52 pm

11 is not the same as 11h :)
macetech LLC - http://www.macetech.com
User avatar
macegr
 
Posts: 287
Joined: Fri Apr 04, 2008 3:46 pm