Step into the next generation of temperature logging with our innovative solution powered by advanced EEPROM memory.
A
A
Hardware Overview
How does it work?
Temp-Log 7 Click is based on the TMP1826, a digital output temperature sensor from Texas Instruments designed for thermal management and protection applications. The TMP1826 features an integrated 2-kbit user EEPROM that allows the host to store application data in increments of 64 bits. With a user-programmable 256-bit page size write protection to avoid accidental overwrite, the EEPROM can be used as non-volatile, read-only memory. The TMP1826 also features an integrated CRC that may be used for ensuring data integrity during communication. It consists of an internal thermal BJT (NIST traceable factory-programmed non-erasable), a high-resolution analog-to-digital converter (ADC), and a data processing circuit in one package. The voltage is digitized and converted to a 16-bit temperature result in degrees Celsius, giving a digital output with outstanding accuracy of up to ±0.1°C (typical)/±0.3°C (maximum) and temperature resolution of 7.8125m°C, typical over a temperature range of –20°C to +85°C. This Click board™ communicates with MCU using the 1-Wire interface that, by definition, requires only one data line (and ground) for communication with MCU. The 1-Wire
communication line is routed to the SMD jumper labeled GP SEL, which allows routing of the 1-Wire communication either to the GP0 pin or the GP1 pin of the mikroBUS™ socket. These pins are labeled, respectively, the same as the SMD jumper positions, making the selection of the desired pin simple and straightforward. The TMP1826 can operate as a 1-Wire half-duplex bus in supply or bus-powered mode. Selection is made by positioning the SMD jumper marked VDD SEL to the appropriate position labeled VCC or GND. With the jumper set on the VCC position, the TMP1826 is powered by the same supply as this Click board™ or bus powered with the jumper set on the GND position where the device is supplied parasitically from the 1-Wire bus. Also, the TMP1826 can be configured to operate in various one-shot temperature-conversion modes, such as basic one-shot, auto, and stacked conversion modes. Each conversion mode has a single temperature sample, but the host can enable 8 sample averages in the device for improved accuracy. Depending on the user application case, the TMP1826 also provides user and application configurable address modes. These modes exist
alongside the standard device address and are useful for applications requiring faster access and device position identification. One of the ways of setting the address is through the R9 resistor, which, depending on the value of the resistor, provides the possibility of using one of 16 addresses. The TMP1826 also includes advanced features like a programmable alarm function and three digital I/O pins on an unpopulated header, configurable for general purposes or to identify the device's position on a shared bus. An alarm (interrupt) signal, routed to the ALR pin of the mikroBUS™ socket, is alarming when a specific temperature event occurs that depends on the value of the temperature reading relative to programmable limits. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
Fusion for TIVA v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different 32-bit ARM® Cortex®-M based MCUs from Texas Instruments, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over a WiFi network. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for TIVA v8 provides a fluid and immersive working experience, allowing access
anywhere and under any circumstances at any time. Each part of the Fusion for TIVA v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.
Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for TIVA v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU
Type
8th Generation
Architecture
ARM Cortex-M4
MCU Memory (KB)
1024
Silicon Vendor
Texas Instruments
Pin count
128
RAM (Bytes)
262144
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic
Step by step
Project assembly
Track your results in real time
Application Output
This Click board can be interfaced and monitored in two ways:
Application Output
- Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
UART Terminal
- Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Software Support
Library Description
This library contains API for Temp-Log 7 Click driver.
Key functions:
templog7_read_temperature
- This function starts the one shot measurement and reads the temperature value in Celsius.templog7_write_eeprom
- This function writes a desired number of data bytes to the EEPROM memory.templog7_read_eeprom
- This function reads a desired number of data bytes from the EEPROM memory.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief Temp-Log 7 Click Example.
*
* # Description
* This example demonstrates the use of Temp-Log 7 click board by reading
* the temperature in Celsius, then writing the specified data to the memory
* and reading it back.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and performs the click default configuration which
* clears the EEPROM memory, sets the temperature resolution to 16-bit, enables
* alert interrupt and sets the temperature alerts to 5 degrees Celsius for low
* and 40 degrees for high level. Other three IO pins are configured as INPUT.
*
* ## Application Task
* Reads the temperature in degrees Celsius and the gpio state. After that writes
* a desired number of bytes to the memory and then verifies if it is written
* correctly by reading from the same memory location and displaying the memory
* content. All data is displayed on the USB UART where you can track changes.
*
* @author Stefan Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "templog7.h"
#define DEMO_TEXT_MESSAGE "MikroE - Temp-Log 7 click"
#define STARTING_ADDRESS 0x00
static templog7_t templog7;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
templog7_cfg_t templog7_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
templog7_cfg_setup( &templog7_cfg );
TEMPLOG7_MAP_MIKROBUS( templog7_cfg, MIKROBUS_1 );
if ( ONE_WIRE_ERROR == templog7_init( &templog7, &templog7_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( TEMPLOG7_ERROR == templog7_default_cfg ( &templog7 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
void application_task ( void )
{
uint8_t eeprom_data[ 64 ] = { 0 };
uint8_t gpio_state = 0;
float temperature = 0;
if ( TEMPLOG7_OK == templog7_read_temperature ( &templog7, &temperature ) )
{
log_printf( &logger, "\r\n Temperature: %.2f C\r\n", temperature );
}
if ( TEMPLOG7_OK == templog7_read_gpio ( &templog7, &gpio_state ) )
{
log_printf( &logger, " GPIO state: 0x%.2X\r\n", ( uint16_t ) gpio_state );
}
if ( TEMPLOG7_OK == templog7_write_eeprom ( &templog7, STARTING_ADDRESS, DEMO_TEXT_MESSAGE,
sizeof ( DEMO_TEXT_MESSAGE ) ) )
{
log_printf ( &logger, " EEPROM write: %s\r\n", ( uint8_t * ) DEMO_TEXT_MESSAGE );
}
if ( TEMPLOG7_OK == templog7_read_eeprom ( &templog7, STARTING_ADDRESS, eeprom_data,
sizeof ( DEMO_TEXT_MESSAGE ) ) )
{
log_printf ( &logger, " EEPROM read: %s\r\n", eeprom_data );
}
if ( !templog7_get_alert_pin ( &templog7 ) )
{
log_info( &logger, " ALERT detected " );
}
Delay_ms ( 1000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END