0001 What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_invert
0002 Date: October 2016
0003 KernelVersion: 4.9
0004 Contact: Peter Rosin <peda@axentia.se>
0005 Description:
0006 The DAC is used to find the peak level of an alternating
0007 voltage input signal by a binary search using the output
0008 of a comparator wired to an interrupt pin. Like so::
0009
0010 _
0011 | \
0012 input +------>-------|+ \
0013 | \
0014 .-------. | }---.
0015 | | | / |
0016 | dac|-->--|- / |
0017 | | |_/ |
0018 | | |
0019 | | |
0020 | irq|------<-------'
0021 | |
0022 '-------'
0023
0024 The boolean invert attribute (0/1) should be set when the
0025 input signal is centered around the maximum value of the
0026 dac instead of zero. The envelope detector will search
0027 from below in this case and will also invert the result.
0028
0029 The edge/level of the interrupt is also switched to its
0030 opposite value.
0031
0032 What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_compare_interval
0033 Date: October 2016
0034 KernelVersion: 4.9
0035 Contact: Peter Rosin <peda@axentia.se>
0036 Description:
0037 Number of milliseconds to wait for the comparator in each
0038 step of the binary search for the input peak level. Needs
0039 to relate to the frequency of the input signal.