Interrupt with ADC vect ISR or build in comperator; confusion

Wondering if u can use the ADC_vect ISR to wake up from an sleep_mode.

would this be done by setting the adc_vect along parameter 2 of the attachintterupt(a,b,c) ?

Also not sure what the ADC_vect does,

sometimes its logical to think it can be used to trigger when the next ADC convention happens and to get ready for that.

other times i think it could maybe be used to say when a pin_change intterupt or a RISING is happening over one of the analog pins. So lets say out of the 0 to 1023 scale it would trigger an ADC_vect ISR beacuse the analog pin hit the value 0005 out of the 1023, so that would in fact be a sense telling me an anlog value of 5*(5/1023).

otherwise to wake up from a similar situation one would require to make use of the internal comperator to sense a non 0 value, then sample the ADC. and additional hardware components such as resistors and opamps.

What would be the best way to wake up for an analog signal read event?

this is what i am trying to sense, diagram in the attachment:

sometimes the LED will be turned on possibly, not included in the schematics, but there is a transistor switch following the LED diode who is in control of when the led is bright.

the resistors turn the source voltage of 24V into plusminus 5V for the input of the arduino.

the goal is to sense if the external transistor is in fact glitching/fluctuating so any adc value to be able to read is nessesery not just 0 or 5V.

Led-sense.jpg

Just use a timer interrupt to periodically wake up and read the ADC.

Regards,
Ray L.

this is called polling and goes against the principle of interrupts

iBeyondPower:
this is called polling and goes against the principle of interrupts

But it is not illegal and it might be the simplest solution.

...R

I dont think polling would be the right solution for this problem

it has to wake up when it senses an event/trigger.

if i were to wake it up every 100ms it could miss the crucial event

also this event is probably not ever going to occur, but if it might i would want to register it

no one answers the main problem i have written in the post tho

which is how would i implement such a function, with the ADC vect or with the build in comperator?

ADC vect to directly notice a voltage level on an anloge pin, (if ADC vect is possible of such things)

or use the build in or external comperator to provide my own trigger signal into INT0 or digital 2

iBeyondPower:
no one answers the main problem i have written in the post tho

I suspect you have strayed outside the Arduino main-stream.

Have you studied the Atmel datasheet for the MCU you are using.

...R