Page 1 of 1

Comparador analogico

Posted: Tue Jul 23, 2024 10:25 am
by Carmelo
Hello,

I am trying to make a project with the pic 16F648A using the internal analog comparators that this pic model has.
The fact is that I am not able to configure it and I have also searched this forum for some type of basic example to be able to use those microcontroller options without finding anything.

Can someone tell me how to make that configuration and/or some small example of how to use it so I can understand it?
Thanks in advance.

Re: Comparador analogico

Posted: Tue Jul 23, 2024 11:19 am
by BenR
Hello,

There's an example of enabling a comparator interrupt here using the custom interrupt.
https://www.flowcode.co.uk/wiki/index.p ... -_PICmicro

It should then just be a case of writing a control value to the CMCON register using a C icon.

Let us know how you're getting on.

Re: Comparador analogico

Posted: Tue Jul 23, 2024 11:49 am
by Carmelo
Gracias,
Eso ya lo había visto pero no comprendo la mayoría de las instrucciones que se indica por eso lo de ver un ejemplo completo