This example demonstrates how to use the ACC driver to perform a voltage comparison on a pair of inputs and generate an interrupt.
This example can be used on the following evaluation kits:
The DAC0 and AD5 signals are selected as the inputs to the analog comparator. The user can change the output voltage of DAC0 and also change the voltage on AD5 by adjusting VR1 on the evaluation kit.
The DAC0 output voltage can be adjusted between (1/6)*ADVREF and (5/6)*ADVREF in software, whilst the input voltage on AD5 can vary between 0 and ADVREF.
A comparison interrupt event is generated when the input voltages are no longer equal.
This software is written for GNU GCC and IAR Embedded Workbench® for Atmel®. Other compilers may or may not work.
-- ACC IRQ Example xxx -- -- xxxxxx-xx -- Compiled: xxx xx xxxx xx:xx:xx -- -- Menu Choices for this example-- -- s: Set new DAC0 output voltage.-- -- v: Get voltage on potentiometer.-- -- m: Display this menu again.--