hello,
Problem with Temp reading on DS1631 .
The first time i read the TH and TL value, i get 15.00°C and 10.00°C wich are the factory setting.
i can modifiy and read back the 2 theshold value TH and TL of thermostat
with 12 bits of resolution ... No problemo
But when i read Temper , i get a value 10°C above the normal
>30°C for Tamb around 20°C
if i use MSB=0x19 and LSB=0x10 as a Temp value to test the calculation
i get the good value of 25.0625 °C .
MikroC pro 6.50
PIC18F26K22
FOSC=Q=10Mhz, but tests also with internal FOSC at 16Mhz and 1Mhz
Pull up resistor for SDA,SCL tests with 4,7K ( and 2,7K)
IC2 at 100Khz
All test in real world .. (no simulation)
R0=1 R1=1 so 12bits resoluton mode,
1shot=0 so contineous conversions
external Power supply 5,0V
tested also with Pickit2 power up via VDD .. same problem
Even with 9 bits config, i get temp= 30°C for 20°C ambiant
I tested another device ..same bad result .
Some idea ?
View attachment 18F26K22_DS1631.zip