sysfs-bus-iio-adc-envelope-detector 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_invert
  2. Date: October 2016
  3. KernelVersion: 4.9
  4. Contact: Peter Rosin <peda@axentia.se>
  5. Description:
  6. The DAC is used to find the peak level of an alternating
  7. voltage input signal by a binary search using the output
  8. of a comparator wired to an interrupt pin. Like so::
  9. _
  10. | \
  11. input +------>-------|+ \
  12. | \
  13. .-------. | }---.
  14. | | | / |
  15. | dac|-->--|- / |
  16. | | |_/ |
  17. | | |
  18. | | |
  19. | irq|------<-------'
  20. | |
  21. '-------'
  22. The boolean invert attribute (0/1) should be set when the
  23. input signal is centered around the maximum value of the
  24. dac instead of zero. The envelope detector will search
  25. from below in this case and will also invert the result.
  26. The edge/level of the interrupt is also switched to its
  27. opposite value.
  28. What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_compare_interval
  29. Date: October 2016
  30. KernelVersion: 4.9
  31. Contact: Peter Rosin <peda@axentia.se>
  32. Description:
  33. Number of milliseconds to wait for the comparator in each
  34. step of the binary search for the input peak level. Needs
  35. to relate to the frequency of the input signal.