TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136967 times)
  2. FAT32 Library (70081 times)
  3. Network Ethernet Library (56019 times)
  4. USB Device Library (46340 times)
  5. Network WiFi Library (41958 times)
  6. FT800 Library (41266 times)
  7. GSM click (29051 times)
  8. mikroSDK (26482 times)
  9. PID Library (26447 times)
  10. microSD click (25411 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: 2972 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

IR Reflect click

6

IR reflect click carries a GP2S700HCP reflective photointerrupter. The infrared beam from the emitter gets bounced back to the receiver when an object is placed within the detecting range of the sensor (optimal range is 3mm).

[Learn More]

LED Driver 15 click

0

LED Driver 15 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the MP3309C, a fully integrated synchronous boost white LED driver with an I2C interface from Monolithic Power Systems. The MP3309C offers high efficiency, delivers up to 40mA of LED current, and operates from a voltage of mikroBUS™ power rails, supporting up to 8 white LEDs in series. It also features a programmable switching frequency to optimize efficiency, supports analog and PWM dimming, and has multiple built-in protection functions that protect the circuit during abnormalities.

[Learn More]

TempHum 22 click

0

Temp&Hum 22 Click is a compact add-on board representing temperature and humidity sensing solution. This board features the SHT41A, a 4th generation automotive-grade relative humidity and temperature sensor from Sensirion. The SHT41A is characterized by its high accuracy (±2% RH and ±0.3°C over a wide operating temperature range) and high resolution providing 16-bit data to the host controller with a configurable I2C interface. Also, it is designed for reliable operation in harsh conditions such as condensing environments.

[Learn More]