Handling interrupts – ADC – electroSome https://electrosome.com/topic/adc-handling-interrupts/feed/ Sat, 18 Mar 2023 04:58:10 +0000 https://bbpress.org/?v=2.6.9 en-US https://electrosome.com/topic/adc-handling-interrupts/#post-12006 <![CDATA[Handling interrupts – ADC]]> https://electrosome.com/topic/adc-handling-interrupts/#post-12006 Thu, 14 Jan 2016 10:53:44 +0000 George Mathew Dear Sir,

My requirement is that, adc program should run all the time giving result without the intervention of the main program and if adc value goes below a particular limit, some action should be performed in background.

At the same time uart sending, receiving and other tasks should run as main program ie. at the front. Even if, mcu waits for a character/string input, if adc goes below a particular value, some tasks must be done.

How can we handle interrupts in this situation??

 

]]>
https://electrosome.com/topic/adc-handling-interrupts/#post-12009 <![CDATA[Reply To: Handling interrupts – ADC]]> https://electrosome.com/topic/adc-handling-interrupts/#post-12009 Wed, 20 Jan 2016 12:22:17 +0000 Ligo George Dear George,

You can’t do it using ADC interrupts. ADC interrupt will always generate when the A/D conversion is completed. But you can do it using Comparator Module of PIC Microcontroller.

]]>
https://electrosome.com/topic/adc-handling-interrupts/#post-12010 <![CDATA[Reply To: Handling interrupts – ADC]]> https://electrosome.com/topic/adc-handling-interrupts/#post-12010 Thu, 21 Jan 2016 17:04:08 +0000 George Mathew Thank you sir….

I dont know how to use comparator module…

but I have managed all the activities using Timer interrupts.

]]>