TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (348 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 (136225 times)
  2. FAT32 Library (69492 times)
  3. Network Ethernet Library (55711 times)
  4. USB Device Library (45994 times)
  5. Network WiFi Library (41640 times)
  6. FT800 Library (40803 times)
  7. GSM click (28789 times)
  8. PID Library (26333 times)
  9. mikroSDK (26059 times)
  10. microSD click (25146 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: 2843 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

SwipeSwitch click

5

SwipeSwitch click is capacitive touch, gesture, and proximity sensing Click board, which is equipped with the IQS266, an integrated trackpad controller circuit which features ProxSense® and IQ Switch® technologies.

[Learn More]

NFC Tag 4 click

0

NFC Tag 4 Click is NFC tag device, offering 16 Kbit of electrically erasable programmable memory (EEPROM).

[Learn More]

Mikromedia 7 Capacitive FPI

0

This project contains example for testing modules on Mikromedia 7 Capacitive FPI.

[Learn More]