TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139563 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42559 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 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
Library

TempSensors Ds1820 LM35

Rating:

16

Author: dany

Last Updated: 2022-09-23

Package Version: 5.0.0.0

Category: Measurement

Downloaded: 9396 times

Followed by: 2 users

License: MIT license  

The basic functions for the DS18(S/B)20 (onewire digital temperature sensor), including string output, ready to display.
A routine to convert a more than 9 bits temperature read from a DS18B20 to a string (to e.g. display on an LCD) is also present.
Including Parasite Power and Configuration routines.
The LM35 basic functions, code efficient.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "TempSensors Ds1820 LM35" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "TempSensors Ds1820 LM35" changes.

Do you want to report abuse regarding "TempSensors Ds1820 LM35".

  • Information
  • Comments (4)

Library Blog

DS1820 library, suitable for the DS18(S/B)20 and equivalents.

LM35 library, without float calculations, so code size effective.See the package content for the documentation.


  The zipfiles have the same content as the packages, except that the mikroBasic version is also present in them.

===============================================================================
2012-11-12: The microBasic package(s) ha(s)(ve) been added.

Only the .mcl files are available as "library" files: they are copied from the mikroPascal version (the mP and mB .mcl files are compatible - luckely - ).

If you want to see some sources: look into the mP versions.

The example files are still in mP, not in mB. (I do not have an mB licence, so I can not compile them).

Some of the helpfiles are also still referring to mP, but all library "interfaces" are available in the mB language.

--------------------------------------------------------------------------------------------------------------------------------------------
2013-01-26:  Replaced "Delay_ms" and "Delay_us" by routines available in the Delays lib.
"Delay_ms" and "Delay_us" are inline routines and cannot be used in libraries if they are to be used without source (e.g. non Pascal compilers).

---------------------------------------------------------------------------------------------------------------------------------------

Version 2.0 (2013-10-23): Added the routine "DS1820_TempConversionReady". The purpose of this routine is to replace the fixed waiting time needed after "DS1820_StartTempConversion" by a "ready" measurement. The latter method will result in shorter waiting times than the fixed one of 750 ms.

----------------------------------------------------------------------------------------------------------------------------------------

Version 3.0 (2013-10-28): Added the "Parasite Power" capability.

-------------------------------------------------------------------------------------------------------------------------------------- 2013-10-29: Corrected an error in the waiting time during conversion of the "DS1820_StartTempConversion_.._PP" routines. The delay used was 10 times too short. Sorry for the inconvenience caused by that.

---------------------------------------------------------------------------------------------------------------------------------------

Version 4.0 (2013-11-06):

- Added the "DS18B20_TempToString_HR" procedure. Resolution is 9-12 bits.
- Changed the "DS1820_StartTempConversion_.._PP to make variable waiting time possible
- Added ClrWdt while waiting during temp conversion
- Added the DS1820_Family function.
- Added the procedures "DS1820_SetConfiguration", "DS18B20_SetConfiguration",
   "DS1820_SetConfigurationROM" and "DS18B20_SetConfigurationROM",
   "DS1820_GetConfiguration", "DS18B20_GetConfiguration",
   "DS1820_GetConfigurationROM" and "DS18B20_GetConfigurationROM"

--------------------------------------------------------------------------------------------------------------------------------------

2013-11-12: Added a small correction to the "read bit" parts in some of the routines. Nothing essential.

-------------------------------------------------------------------------------------------------------------------------------------- 2013-11-18: Added the PIC24 versions.

--------------------------------------------------------------------------------------------------------------------------------------

2013-12-18. Changed the signature of the routine "DS1820_Family_ROM".

-------------------------------------------------------------------------------------------------------------------------------------------

2013-12-27: Added the routines "DS1820_ReadTemperature_Fast" and "DS1820_ReadTemperatureROM_Fast". They only read the first 2 bytes from the DS1820 scrathpad, so they need less time.

---------------------------------------------------------------------------------------------------------------------------------------- 2014-03-13: The mikroBasic files and zip files have been updated. All mB sources are present now (not tested if compilable though).

-------------------------------------------------------------------------------------------------------------------------------------- 2014-05-16:

- Simplified the "DS18B20_TempToString_HR" procedure: smaller code, better time performance  and one parameter ("Resolution") removed. The latter proved to be not necessary.
- Removed the writing to EEPROM and Reading from EEPROM in the "xxx_SetConfiguration" and    "xxx_GetConfiguration" routines.

--------------------------------------------------------------------------------------------------------------------------------------

2014-05-30: The LM35 library has been added to the package.


2015-01-26: Replaced the mB files: all mB files are compilable now (which e.g. means that all "with" statements are dealt with). I could however not link and test the libraries (no mB licence).


2015-06-27: Changed the PIC24 libraries: the "simple" routine for 5V has been deleted.


2015-07-18: - Changed "DS18B20_SetConfiguration..." to the spec of the "configuration" byte. No functional change.
            - Added the routine "DS18B20_ResetUnusedBits" for the DS18B20 when used at a lower resolution than 12 bits, see the spec sheet.

------------------------------------------------------------------------------------------------------------------------------------------------
2018-02-24: made the CRC checking routines smaller and more understandable.

ALSO FROM THIS AUTHOR

LCD

11

* 2 (alternative) libs to drive LCD's (4 bits connections): - One lib specific for 2x16, - one more generic (upto 4 rows, 16-20 chars per row). * A library to drive LCD via I2c (PCF2116 based, 1 to 4 rows, 12 or 24 chars per row * A library to drive standard LCD's via I2c * A library to drive standard LCD's via SPI.

[Learn More]

RTC

16

For P16 and P18:RTC libraries for the PCF8583P and the DS1307, both for hardware I2c and software I2c. No alarm functions provided. Daylight Saving Time version available. For P24: RTCC routines (internal RTCC), including the alarm functions.

[Learn More]

RC5_RC6_decoders

11

RC6 and RC6 (Philips IR remote control system) decoders, decodes the Rc5/6 toggle, Rc5/6 System and Rc5/6 command. For the moment only RC6 "mode 0" (most used) can be decoded. Made for 36 Khz IR receivers with inverse output (= output active low), like the TSOP1736. -- for P16F627A, 628A, 648A --

[Learn More]