I'm working on a product where I have to toggle a pin whenever a ADC value is below a set value. This toggling must have a response time of less than 100ms, so right now I'm having a timer interrupt firing every 10ms in which I measure the ADC input and assert/deasserts the pin. My main loop MAY take more than 100ms, so I can't do the measurements there.
The ADC is by far the most time consuming thing going on in this interrupt, so I was hoping to solve this differently. I use the ADC for other inputs as well, but they are not that time critical. Any tips for making the ISR less time consuming?