This part of the code shows the trivial way of detecting a positive edge on the
comparator output. Even though it uses only four words of code and no initial setup,
this approach to the task might cause problems. If a short pulse on the output occurs
while the program is administrating the wait loop, the pulse could be missed as ACO is
directly connected to the comparator output. If the user wants to insert code within the
wait loop, the probability of detecting a short pulse will increase. Such code might be
time-out if no edge occurs within a specific period. The procedure for detection is as
follows:
If output is high, wait for
output to go low.
Wait until output goes high.
Figure 1-1. ACO Polling Flow Chart
Table 1-1. ACO Polling Performance Figures
Parameter
Value
Code Size (Words)
4
Response Time (Cycles)
3 - 5
Initialization Time (Cycles)
0
Register Usage
Low Registers: None
High Registers: None
Pointers: None
Interrupts Usage
None
Peripherals Usage
Analog Comparator
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.