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: MIKROE
Last Updated: 2019-04-04
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 3246 times
Not followed.
License: MIT license
Temp-Log 6 click is a temperature sensing Click board, which features the MAX6642, a specifically designed IC, capable of measuring its own die temperature, as well as a temperature at a remote PN junction.
Do you want to subscribe in order to receive notifications regarding "Temp-Log 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Log 6 click" changes.
Do you want to report abuse regarding "Temp-Log 6 click".
Library Description
The library initializes and defines the I2C bus driver and drivers that offer a choice for writing data in register and read data form register. With functions from the library it is possible to read local/remote temperature data and Manifactures ID. The library provides full control of all the registers that the modules contain.
Key functions:
void templog6_writeByte(uint8_t reg, uint8_t _data)
- Write functions.uint8_t templog6_readByte(uint8_t reg)
- Read function.uint8_t templog6_getAlertState()
- ALERT Interrupt state.Examples description
The application is composed of the three sections :
void applicationTask()
{
uint8_t Remote_Temp;
uint8_t Local_Temp;
char demoText[ 50 ];
Local_Temp = templog6_readByte(_TEMPLOG6_REG_LOCAL_TEMPERATURE);
IntToStr(Local_Temp, demoText);
mikrobus_logWrite("--- Local Temperature: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
Remote_Temp = templog6_readByte(_TEMPLOG6_REG_REMOTE_TEMPERATURE);
IntToStr(Remote_Temp, demoText);
mikrobus_logWrite("--- Remote Temperature: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
mikrobus_logWrite("-----------------------------", _LOG_LINE);
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
I2C
UART
Conversions
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or 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.