nrf52840

Module acomp

Source
Expand description

Analog Comparator Peripheral Driver, for nrf52

Partially based on sam4l implementation of an analog comparator.

The comparator (COMP) compares an input voltage (VIN+) against a second input voltage (VIN-). VIN+ can be derived from an analog input pin (AIN0-AIN7). VIN- can be derived from multiple sources depending on the operation mode of the comparator.

Main features of the comparator are:

  • Input range from 0 V to VDD
  • Single-ended mode
    • Fully flexible hysteresis using a 64-level reference ladder
  • Differential mode
    • Configurable 50 mV hysteresis
  • Reference inputs (VREF):
    • VDD
    • External reference from AIN0 to AIN7 (between 0 V and VDD)
    • Internal references 1.2 V, 1.8 V and 2.4 V
  • Three speed/power consumption modes: low-power, normal and high-speed
  • Single-pin capacitive sensor support
  • Event generation on output changes

Structs§

Statics§

  • Uses only comparator, with VIN+=AIN5 and VIN-=AIN0