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]
Rating:
Author: dany
Last Updated: 2022-09-23
Package Version: 5.0.0.0
Category: Measurement
Downloaded: 9351 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.
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".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1519486344_tempsensors_mikropascal_pic.mpkg [1.60MB] | mikroPascal PRO for PIC |
|
1519486695_tempsensors_other_pic.zip [2.17MB] | Other PIC Compilers |
|
1519486655_tempsensors_mikropascal_pic24.mpkg [1.49MB] | mikroPascal PRO for dsPIC30/33 & PIC24 |
|
1519486730_tempsensors_other_pic24.zip [2.12MB] | Other PIC24 Compilers |
|
1519486757_tempsensors_mikrobasic_pic.mpkg [1.60MB] | mikroBasic PRO for PIC |
|
1519486793_tempsensors_mikrobasic_pic24.mpkg [1.49MB] | mikroBasic PRO for dsPIC30/33 & PIC24 |
|
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.