.. | .. |
---|
5 | 5 | Description: |
---|
6 | 6 | The DAC is used to find the peak level of an alternating |
---|
7 | 7 | voltage input signal by a binary search using the output |
---|
8 | | - of a comparator wired to an interrupt pin. Like so: |
---|
| 8 | + of a comparator wired to an interrupt pin. Like so:: |
---|
| 9 | + |
---|
9 | 10 | _ |
---|
10 | 11 | | \ |
---|
11 | 12 | input +------>-------|+ \ |
---|
.. | .. |
---|
19 | 20 | | irq|------<-------' |
---|
20 | 21 | | | |
---|
21 | 22 | '-------' |
---|
| 23 | + |
---|
22 | 24 | The boolean invert attribute (0/1) should be set when the |
---|
23 | 25 | input signal is centered around the maximum value of the |
---|
24 | 26 | dac instead of zero. The envelope detector will search |
---|
25 | 27 | from below in this case and will also invert the result. |
---|
| 28 | + |
---|
26 | 29 | The edge/level of the interrupt is also switched to its |
---|
27 | 30 | opposite value. |
---|
28 | 31 | |
---|