1 Detecting a Positive Edge By Polling ACO
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.
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 |