Take your altitude measurements to new heights with our small digital altimeter, uniquely optimized for applications in chlorine and saline environments.
A
A
Hardware Overview
How does it work?
Pressure 22 Click is based on the MS5839-02BA, an ultra-compact chlorine-resistant digital pressure and temperature sensor from TE Connectivity. It has a primary pressure operating range of 300 up to 1200mbar. The gel-filled design offers this sensor advanced water resistance, thus allowing it to measure extended pressure range from 10 up to 2000mbar, hence the 02BA in the marking. The overpressure comes at 10 bar. The sensor delivers a decent pressure sensing accuracy of ±0.5mbar. In addition to pressure, this sensor can measure the temperature in a range of -20 up to 85°C
with a temperature sensing accuracy of ±2°C. It integrates the 24-bit sigma-delta analog-to-digital converter for both the pressure and the temperature sensors. The MS5839-02BA sensor consists of a piezo-resistive sensor and a sensor interface integrated circuit. It converts the sensor's uncompensated analog output value voltage to a 24-bit digital value. The sensor is factory calibrated at two temperature and pressure points, where, as a result, six coefficients necessary to compensate for process variations and temperature variations are calculated and stored in the 112-bit PROM
of the sensor. Pressure 22 Click uses a standard 2-Wire I2C interface to communicate with the host MCU, supporting clock speeds up to 400KHz. The reset is only available over the I2C interface, as well as the read from the PROM. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Features overview
Development board
PIC18F57Q43 Curiosity Nano evaluation kit is a cutting-edge hardware platform designed to evaluate microcontrollers within the PIC18-Q43 family. Central to its design is the inclusion of the powerful PIC18F57Q43 microcontroller (MCU), offering advanced functionalities and robust performance. Key features of this evaluation kit include a yellow user LED and a responsive
mechanical user switch, providing seamless interaction and testing. The provision for a 32.768kHz crystal footprint ensures precision timing capabilities. With an onboard debugger boasting a green power and status LED, programming and debugging become intuitive and efficient. Further enhancing its utility is the Virtual serial port (CDC) and a debug GPIO channel (DGI
GPIO), offering extensive connectivity options. Powered via USB, this kit boasts an adjustable target voltage feature facilitated by the MIC5353 LDO regulator, ensuring stable operation with an output voltage ranging from 1.8V to 5.1V, with a maximum output current of 500mA, subject to ambient temperature and voltage constraints.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
48
RAM (Bytes)
8196
You complete me!
Accessories
Curiosity Nano Base for Click boards is a versatile hardware extension platform created to streamline the integration between Curiosity Nano kits and extension boards, tailored explicitly for the mikroBUS™-standardized Click boards and Xplained Pro extension boards. This innovative base board (shield) offers seamless connectivity and expansion possibilities, simplifying experimentation and development. Key features include USB power compatibility from the Curiosity Nano kit, alongside an alternative external power input option for enhanced flexibility. The onboard Li-Ion/LiPo charger and management circuit ensure smooth operation for battery-powered applications, simplifying usage and management. Moreover, the base incorporates a fixed 3.3V PSU dedicated to target and mikroBUS™ power rails, alongside a fixed 5.0V boost converter catering to 5V power rails of mikroBUS™ sockets, providing stable power delivery for various connected devices.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Software Support
Library Description
This library contains API for Pressure 22 Click driver.
Key functions:
pressure22_get_measurement_data- Pressure 22 get the measurement data function.pressure22_get_calibration_data- Pressure 22 gets the calibration data function.pressure22_get_adc_data- Pressure 22 gets the ADC data function.
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 Pressure 22 Click example
*
* # Description
* This library contains API for Pressure 22 Click driver.
* The demo application reads and calculate pressure and temperature data.
*
* The demo application is composed of two sections :
*
* ## Application Init
* The initialization of I2C module and log UART.
* After driver initialization, the app sets the default configuration.
*
* ## Application Task
* This example demonstrates the use of the Pressure 22 Click board™.
* The demo application reads and displays the Pressure [mBar]
* and Temperature [degree Celsius] data.
* Results are being sent to the UART Terminal, where you can track their changes.
*
* @author Nenad Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "pressure22.h"
static pressure22_t pressure22;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
pressure22_cfg_t pressure22_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.
pressure22_cfg_setup( &pressure22_cfg );
PRESSURE22_MAP_MIKROBUS( pressure22_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == pressure22_init( &pressure22, &pressure22_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( PRESSURE22_ERROR == pressure22_default_cfg ( &pressure22 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
log_printf( &logger, " ____________________ \r\n" );
Delay_ms ( 100 );
}
void application_task ( void )
{
static float temperature, pressure;
if ( PRESSURE22_OK == pressure22_get_measurement_data( &pressure22, &temperature, &pressure ) )
{
log_printf( &logger, " Temperature : %.2f degC \r\n", temperature );
log_printf( &logger, " Pressure : %.2f mBar \r\n", pressure );
log_printf( &logger, " _______________________ \r\n" );
Delay_ms ( 1000 );
}
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
Additional Support
Resources
Category:Pressure

































