Translate

Wednesday, October 8, 2014

Airflow sensor test

I used a little board with a MSP430-2013 and a LCD display  to develop the basic code to test and read the airflow sensor.

The circuit


Here a picture of the prototype


The software

The airflow sensor reading is based on counter and a timer.
The MSP430 pin connected to the airflow sensor is set in interrupt mode (rising) and after a check on the pin state to be sure is not a spike, a counter is incremented.
Every time a related timer expire, the value of the counter is copied into another variable (to be displayed) and the counter is reset.
I use another timer to display the read value on the display, after a integer-to-ascii conversion.
The code described is not reading the DS1820, only the airflow sensor.


No comments:

Post a Comment