TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136218 times)
  2. FAT32 Library (69480 times)
  3. Network Ethernet Library (55705 times)
  4. USB Device Library (45989 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40780 times)
  7. GSM click (28788 times)
  8. PID Library (26327 times)
  9. mikroSDK (26053 times)
  10. microSD click (25139 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Project

DS1621 TEMP SENSOR using I2C with ATMEGA88

Rating:

5

Author: Robert Underwood

Last Updated: 2011-08-21

Package Version: 1.0.0.0

Category: Measurement

Downloaded: 993 times

Not followed.

License: MIT license  

Demonstration project developed for the Dallas Maxim DS1621 Digital Thermometer and Thermostat. Project defines and explains as much as to help you along with your developement with this device.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DS1621 TEMP SENSOR using I2C with ATMEGA88" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DS1621 TEMP SENSOR using I2C with ATMEGA88" changes.

Do you want to report abuse regarding "DS1621 TEMP SENSOR using I2C with ATMEGA88".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Project Blog

DALLAS MAXIM DS1621 Demo using an ATMEGA88 AVR

Demonstration project developed for the Dallas Maxim DS1621 Digital Thermometer and Thermostat. Project defines and explains as much as to help you along with your developement with this device.

Example of the Source Code showing COMMENTS

------------ CLIP ----------

ExcuteCmd(WAddress,CStatReg,POL1Shot,NilByte);
// 0x90 = Address Default address when A0,A1,A2 pins are grounded = 1001000x = x=ReadCmd(1)/WriteCmd(0)
// 0xAC=Write to the Configuration/Status Register
// 0x00= bRRRRXXab - R=Readonly bits, XX=Reserved bits, ab=Programmable
// a=POL=0=Low(output pin is normally HIGH goes LOW on ALERT,
// b=1Shot=0 force Contnuous Temp Conversion
// 0xFF Buffer Byte = NUL, Not excuted

ExcuteCmd(WAddress,THCmd,THMSB,THLSB);
ByteToStr(THMSB,CTHAStr);
LTrim(CTHAStr);
CTHAStr:='H'+CTHAStr+chr(0xDF);
// 0x90 = Address Default address when A0,A1,A2 pins are grounded = 1001000x = x=ReadCmd(1)/WriteCmd(0)
// THCmd = 0xA1=HiTemp Access(TH) CMD
// THMSB = Stores 45° C HighTemp Value = 113°F MSB (Whole Value)
// THLSB = Stores 0° C HighTemp Value = 0°F LSB (Decimal Value)

ExcuteCmd(WAddress,TLCmd,TLMSB,TLLSB);
ByteToStr(TLMSB,CTLAStr);
LTrim(CTLAStr);
CTLAStr:='L'+CTLAStr+Chr(0xDF);
// 0xA2=LoTemp Access(TL) CMD
// Stores 28° C HighTemp Value = 82°F MSB (Whole Value)
// Stores 0° C HighTemp Value = 0°F LSB (Decimal Value)

ExcuteCmd(WAddress,SConvCmd,NilByte,NilByte);
// Address Default address when A0,A1,A2 pins are grounded = 1001000x = x=ReadCmd(1)/WriteCmd(0)
// 0xEE=Initiates Temp Conversion process internally to the chip begin reading Temperatures.

Lcd_Init(); // Initialize LCD
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Cmd(_LCD_CLEAR); // Clear display

---------------------------- CLIP -------------------

ALSO FROM THIS AUTHOR

MLX90614 IR Infared Thermal Sensor using a ATMega16

6

This is a project which helps to convert the C-Code for the MLX90614 IR Infared Thermal Sensor by Melexis 'Microelectronic Integrated Systems' over to AVR PASCAL and too help explain some of the code and addresses.

[Learn More]