This application note contains a C++ sample code to implement the basic commands of I2C flow and differential pressure sensors.
This application note provides C++ sample code to implement basic commands for Sensirion's SF04 I2C flow and differential pressure sensors. The code is designed for easy understanding and is not optimized for speed or size. It uses bit-banging for I2C compatibility and targets a NEC V850/SG3 microcontroller. The code includes functions to read sensor registers, measure flow, and retrieve serial numbers and scale factors.
| Sensor Chip | 4th generation CMOSens® mass flow sensor chip |
|---|---|
| Interface | I2C with bit-banging implementation |
| Target Microcontroller | NEC V850/SG3 (uPD70F3740) |
| Compiler | IAR compiler for V850 (3.50A) |
It is a 4th generation CMOSens® mass flow sensor chip.
It is implemented as "bit-banging" on normal I/O's for compatibility.
The code is designed for the NEC V850/SG3 (uPD70F3740) microcontroller.