ezocarrierrtd 2.1.0.0
Main Page

EZO Carrier RTD click

‍EZO Carrier Click - RTD is a compact add-on board engineered to provide temperature readings across a broad range of temperatures. This board features the EZO-RTDā„¢, an embedded temperature circuit board from Atlas Scientific.

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Oct 2023.
  • Type : UART type

Software Support

We provide a library for the EZO Carrier RTD Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

‍This library contains API for EZO Carrier RTD Click driver.

Standard key functions :

Example key functions :

Example Description

‍This example demonstrates the use of EZO Carrier RTD click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

‍Initializes the driver, performs the click default factory reset, and single point calibration at 100 degC.

void application_init ( void )
{
log_cfg_t log_cfg;
ezocarrierrtd_cfg_t ezocarrierrtd_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
ezocarrierrtd_cfg_setup( &ezocarrierrtd_cfg );
EZOCARRIERRTD_MAP_MIKROBUS( ezocarrierrtd_cfg, MIKROBUS_1 );
if ( UART_ERROR == ezocarrierrtd_init( &ezocarrierrtd, &ezocarrierrtd_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_printf( &logger, "Device status \r\n" );
error_flag = ezocarrierrtd_rsp_check( &ezocarrierrtd, EZOCARRIERRTD_RSP_OK );
ezocarrierrtd_error_check( error_flag );
log_printf( &logger, "Factory reset \r\n" );
error_flag = ezocarrierrtd_rsp_check( &ezocarrierrtd, EZOCARRIERRTD_RSP_READY );
ezocarrierrtd_error_check( error_flag );
log_printf( &logger, "Device info \r\n" );
error_flag = ezocarrierrtd_rsp_check( &ezocarrierrtd, EZOCARRIERRTD_RSP_OK );
ezocarrierrtd_error_check( error_flag );
uint8_t n_cnt = 0;
uint8_t last_reading[ APP_BUFFER_SIZE ] = { 0 };
ezocarrierrtd_clear_app_buf( );
ezocarrierrtd_process ( &ezocarrierrtd );
strcpy( last_reading, app_buf );
log_printf( &logger, "Place the probe into the boiling water,\r\n" );
log_printf( &logger, "for single-point calibration \r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "Waiting for stable readings \r\n" );
while ( n_cnt <= 5 )
{
if ( EZOCARRIERRTD_OK == ezocarrierrtd_process ( &ezocarrierrtd ) )
{
if ( 0 == strstr( app_buf, last_reading ) )
{
n_cnt++;
}
else
{
strcpy( last_reading, app_buf );
n_cnt = 0;
}
}
log_printf( &logger, "- " );
Delay_ms ( 1000 );
ezocarrierrtd_clear_app_buf( );
}
#define CALIBRATION_VALUE "100"
log_printf( &logger, "\r\n Calibration \r\n" );
error_flag = ezocarrierrtd_rsp_check( &ezocarrierrtd, EZOCARRIERRTD_RSP_OK );
ezocarrierrtd_error_check( error_flag );
#define DISABLE_CONT_READ "0"
log_printf( &logger, "Disable continuous reading mode \r\n" );
error_flag = ezocarrierrtd_rsp_check( &ezocarrierrtd, EZOCARRIERRTD_RSP_OK );
ezocarrierrtd_error_check( error_flag );
log_info( &logger, " Application Task " );
}
@ EZOCARRIERRTD_OK
Definition ezocarrierrtd.h:209
#define EZOCARRIERRTD_CMD_STATUS
Definition ezocarrierrtd.h:91
#define EZOCARRIERRTD_CMD_SINGLE_READ
Definition ezocarrierrtd.h:88
#define EZOCARRIERRTD_CMD_CAL
Definition ezocarrierrtd.h:76
#define EZOCARRIERRTD_CMD_FACTORY
Definition ezocarrierrtd.h:79
#define EZOCARRIERRTD_RSP_OK
EZO Carrier RTD response codes.
Definition ezocarrierrtd.h:99
#define EZOCARRIERRTD_RSP_READY
Definition ezocarrierrtd.h:104
#define EZOCARRIERRTD_CMD_DEV_INFO
Definition ezocarrierrtd.h:81
#define EZOCARRIERRTD_CMD_CONT_READ
Definition ezocarrierrtd.h:75
#define EZOCARRIERRTD_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition ezocarrierrtd.h:139
void application_init(void)
Definition main.c:89
#define CALIBRATION_VALUE
#define APP_BUFFER_SIZE
Definition main.c:33
#define DISABLE_CONT_READ

Application Task

‍Reads and processes all incoming temperature data from the probe, and displays them on the USB UART in degC.

void application_task ( void )
{
log_printf( &logger, "Reading... \r\n" );
error_flag = ezocarrierrtd_rsp_check( &ezocarrierrtd, EZOCARRIERRTD_RSP_OK );
ezocarrierrtd_error_check( error_flag );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
void application_task(void)
Definition main.c:179

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.EZOCarrierRTD

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. UART terminal is available in all MikroElektronika compilers.