This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

NPCX ADC Comparator

Overview

This sample show how to use the NPCX ADC Comparator driver. The sample supports the NPCX9M6F_EVB.

This application is a voltage comparator with hysteresis, upper limit is set at 1 V while lower limit is 250 mV. Initially configured to detect upper limit.

Building and Running

Build the application for the NPCX9M6F_EVB board, and provide voltage to ADC channel 8, when voltages cross upper/lower limits, detection messages will be printed.

west build -b npcx9m6f_evb samples/sensor/adc_cmp
west flash