Computing humidity conversion table for HS1101LS sensor

Instructions to calibrate the Capacitive Sense module (CS0) of C8051F996 microcontroller for measuring relative humidity with HS1101LS sensor.

  1. Sensor calibration: Load the code calibr.asm into the microcontroller and check the CS0D register value with the debugger. Enter the relative humidity (measured by your reference meter) and enter the corresponding CS0D value into the top two input fields.
  2. Optional CS0 module calibration: solder a 150 pF calibration capacitor with 1% tolerance instead of the humidity sensor. Check the CS0D register value and enter its value into the corresponding input field.
  3. Click the Compute button.
  4. Replace CS_MIN and CS_RANGE values at the top of the code humi3.asm with the computed ones. Also replace the table_HUMI table at the very bottom of this code.
  5. Compile the updated code humi3.asm and load it into the microcontroller
Sensor calibration
Humidity CDC reading
H = % CS0D = (hex)
 
CS0 module calibration
Cap. value CDC reading
C = pF CS0D = (hex)