The DS1624 consists of two separate functional units: a 256-byte nonvolatile E2 memory and a direct-to-digital temperature sensor.
The nonvolatile memory is made up of 256 bytes of E2 memory. This memory can be used to store any type of information the user wishes. These memory locations are accessed through the 2-wire serial bus.
The direct-to-digital temperature sensor allows the DS1624 to measure the ambient temperature and report the temperature in a 12-bit word with 0.0625°C resolution. The temperature sensor and its related registers are accessed through the 2-wire serial interface. Figure 1 in the full data sheet shows a block diagram of the DS1624.
Features
Reduces Component Count with Integrated Temperature Sensor and Nonvolatile E2 Memory
Measures Temperatures from -55°C to +125°C in 0.0625°C Increments
±0.5°C Accuracy from 0°C to 70°C
256 Bytes of E2 Memory for Storing Information Such as Frequency Compensation Coefficients
No External Components
Easy-to-Use 2-Wire Serial Interface
Temperature is Read as a 12-Bit Value (2-Byte Transfer)
Available in 8-Pin SO and DIP Packages
Connection
Module | Arduino |
VDD | 5v |
Gnd | Gnd |
SDA | SDA – A4 |
SCL | SCL – A5 |
Code
Install https://github.com/federico-galli/Arduino-i2c-temperature-sensor-DS1624 in the Arduino IDE first
[codesyntax lang=”cpp”]
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
‘These global variables will be declared once when the application starts.
‘Public variables can be accessed from all modules.
Public Serial1 As Serial
Public timer1 As Timer
Public dstemp As Float
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log(“AppStart”)
RunNative(“setup”,Null)
timer1.Initialize(“timer1_Tick”,1000)
timer1.Enabled = True
End Sub
Private Sub Timer1_Tick
RunNative(“loop”,Null)
Log(“Temperature is: “, dstemp, “°C”)
End Sub
#if C
#include <Wire.h>
#include “DS1624.h”
DS1624 temperature(0x48);
void setup(B4R::Object* o){
temperature.start();
}
void loop (B4R::Object* o) {
b4r_main::_dstemp =temperature.getTemp();
}
#End if
[/codesyntax]
Testing
Temperature is: 30.3125°C
Temperature is: 30.4375°C
Temperature is: 30.3750°C
Temperature is: 30.2187°C
Temperature is: 30.1250°C
Temperature is: 30.0625°C
Temperature is: 29.9687°C
Temperature is: 29.9375°C
Temperature is: 29.3750°C
Temperature is: 29.6562°C
Temperature is: 30.6562°C
Temperature is: 30.5000°C
Link
https://datasheets.maximintegrated.com/en/ds/DS1624.pdf
CJMCU-1624 DS1624 temperature sensor, high precision digital thermometer with memory function