DogFlu66
Member
DS1624 – Digital Thermometer and EEPROM
The DS1624 is a digital thermometer and memory device from Maxim Integrated that combines two key functions:
- Temperature sensing: It measures temperature digitally with a resolution of 0.03125°C, and provides output in a 2-byte format (MSB and LSB). It supports both continuous temperature conversions and one-shot mode for power-sensitive applications.
- EEPROM memory: It includes 256 bytes of non-volatile EEPROM, which can be used to store user data such as configuration settings, calibration parameters, or logging data. The EEPROM retains its contents even when power is removed.
DS1624 Library for PIC18 (Oshonsoft BASIC)
This library provides easy-to-use functions to interface with the DS1624 using I²C communication. It is written in Oshonsoft PIC18 Basic and requires the I2CLib.bas file for basic I²C operations.
Library Functions
DS1624_Config_Temp(mode As Bit) As Byte
Configures the temperature measurement mode:- mode = 0 → Continuous conversion mode (automatic, periodic measurements)
- mode = 1 → One-shot mode (conversion starts only when commanded)
DS1624_Init_Temp() As Byte
Initiates a temperature conversion. This function is only required when the device is in one-shot mode. It sends the Start Convert T (0xEE) command to the DS1624.DS1624_Rd_Temp() As Single
Reads and returns the current temperature in degrees Celsius (Single precision). The temperature is read in two bytes:- MSB: Whole degrees
- LSB: Fractional part (using 5 most significant bits)
Temperature = MSB + 0.03125 × (LSB >> 3)
DS1624_Wr_E2PROM(address As Byte, value As Byte) As Byte
Writes a single byte (value) to the specified EEPROM address (0 to 255). Internally, it uses the Write EEPROM (0x17) command followed by the address and data.After writing, the function waits 5 milliseconds for the EEPROM to complete the write cycle.
DS1624_Rd_E2PROM(address As Byte) As Byte
Reads a byte from the EEPROM at the specified address. It uses the Read EEPROM (0x17) command and returns the stored data byte.Attachments
Last edited: