TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136721 times)
  2. FAT32 Library (69928 times)
  3. Network Ethernet Library (55939 times)
  4. USB Device Library (46264 times)
  5. Network WiFi Library (41884 times)
  6. FT800 Library (41168 times)
  7. GSM click (28979 times)
  8. PID Library (26412 times)
  9. mikroSDK (26357 times)
  10. microSD click (25355 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
mikroSDK Library

Temp-Log 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-02-12

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 2936 times

Not followed.

License: MIT license  

Temp-Log 4 Click is a temperature measuring Click board featuring the SE97B IC, an accurate temperature sensor IC with integrated EEPROM. Besides the thermal sensor, this IC is equipped with additional 256 bytes of EEPROM, integrated on the same die.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Temp-Log 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Log 4 click" changes.

Do you want to report abuse regarding "Temp-Log 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Temp-Log 4 Click

Temp-Log 4 Click

Native view of the Temp-Log 4 Click board.

View full image
Temp-Log 4 click

Temp-Log 4 click

Front and back view of the Temp-Log 4 Click board.

View full image

Library Description

The library performs a control of the Temp-Log 4 Click board. There are a functions that offer a choice to measure the ambient temperature and set a temperature limit values to generate alarm. The library also can save a desired configurations or temperature values to the EEPROM, which has size of 256 bytes. For more details check documentation.

Key functions:

  • T_TEMPLOG4_RETVAL templog4_writeReg( uint8_t regAddr, uint16_t dataIn ) - Function writes a 16bit data to the desired register.
  • void templog4_repeatedRead( uint16_t *dataOut ) - Function reads a 16bit data from the register on which the internal address pointer was last set.
  • T_TEMPLOG4_RETVAL templog4_getTemp( uint8_t tempSel, T_TEMPLOG4_DEG *tempOut ) - Function gets a temperature value from the desired temperature register calculated to the Celsius degrees.
  • T_TEMPLOG4_RETVAL templog4_setTemp( uint8_t tempSel, T_TEMPLOG4_DEG tempIn ) - Function sets a desired temperature register on the desired value calculated to the Celsius degrees.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes I2C interface and performs a device configuration for properly working. Also sets the temperature limit to the desired values.
  • Application Task - (code snippet) - First ensures that the minimum conversion time is met, and then reads the ambient temperature calculated to the Celsius degrees. Also checks the limit status and shows a message when some limit condition is met. Note : The temperature range that can be measured or written is from -40 to +125 Celsius degrees. The resolution of ambient temperature measurement is 11bit, or 0.125 Celsius degrees. The limit temperature resolution is always a 10bit, or 0.25 Celsius degrees. If user wants to enable the EEPROM Write Protection, the A0 pin on the device must be set to the high voltage level. This high voltage level for EEPROM Write Protection must be in range from 7V to 10V, in other cases can be up to VDD.
void applicationTask()
{
    templog4_waitConvDone();

    retStatus = templog4_getTemp( _TEMPLOG4_TEMP_AMBIENT_REG, &temperature );

    FloatToStr( temperature, text );
    floatCut();
    mikrobus_logWrite( "**  Ambient temperature is : ", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_TEXT );
    logUnit();
    mikrobus_logWrite( "  **", _LOG_LINE );

    checkLimitStatus();

    Delay_ms( 300 );
}

Additional Functions :

  • floatCut - Makes that float values be rounded on two decimal places.
  • logUnit - Writes a Celsius degrees symbol on uart terminal.
  • checkLimitStatus - Checks the limit status for each temperature reading cycle and writes a message on uart terminal when some limit condition is met.

Other mikroE Libraries used in the example:

  • Conversions
  • I2C
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 clickor RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Heart Rate 11 click

0

Heart Rate 11 Click is a compact add-on board suitable for heart rate monitoring applications. This board features the OB1203, a multi-channel light sensor (LS/CS), a proximity sensor (PS), and a photoplethysmography sensor (PPG) from Renesas. It can be configured as an ambient light sensor to measure ambient light similar to the human eye experience or as an RGB color sensor. The OB1203 establishes communication to and from the module entirely through a standard I2C compatible interface and has a fully integrated biosensor for reflective photoplethysmography.

[Learn More]

Fan 3 click

0

Fan 3 click is the perfect choice for fan speed control and it can operate in seven discrete speed steps.

[Learn More]

AWS IoT click

0

AWS IoT Click is a compact add-on board that allows users to easily connected to AWS IoT services and securely interact with cloud applications and other devices. This board features the ESP32-C3-MINI-1-N4-A, a small 2.4GHz WiFi (802.11 b/g/n) and Bluetooth® 5 module from Espressif Systems that use ESP32C3 series of SoC RISCV single-core microprocessor (ESP32-C3FN4) with 4MB flash in a single chip package. The module uses UART communication alongside several other features like standalone possibility via USB interface, firmware boot, JTAG for debugging, and others.

[Learn More]