1
\$\begingroup\$

The ADC module has 2 very similar signals. The DONE bit in the ADCON1 register and the interrupt request bit from the ADC. For some reasons samples in the documentation poll the ADIF bit and not the DONE bit.

Is there any difference in how these signals are raised? The difference in how they are cleared is clear. Please, do not comment on this.

Are there any pro/cons on what signal to poll from the software?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You don't want a comment:

For me the two bits work really similar. So I use the DONE bit when I work with polling and the interrupt request bit when I work with interrupts. For me it's the most clear way in the program flow but I didn't see other pro/cons.

\$\endgroup\$
1
  • \$\begingroup\$ No comments on clearing the two flags. \$\endgroup\$ Commented May 3, 2019 at 18:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.