ponnus
Full Member level 2
- Joined
- Mar 17, 2011
- Messages
- 142
- Helped
- 8
- Reputation
- 16
- Reaction score
- 8
- Trophy points
- 1,298
- Location
- Cochin, INDIA
- Activity points
- 2,226
PIC wake up on ADC trigger (NOT Duplicate post)
Hai Experts,
I am using PIC24F16KA101 for reading ADC. Adc signals will be coming randomly, so I am putting the Mcu in sleep mode.
I like to wake up the mcu, when the signal crosses a threshold value.
When I googled this, I found many topics related to this (even in this forum), but I like to get clarified in this problem.
I found some solutions to this problem, but I want a solution with minimum power consumption.
1. Sampling ADC at maximum frequency (as the signal is random,high frequency pulse). To use the Adc clock based on system clock
(I'm using 32MHz FRCPLL) when the Mcu is awake and to change to ADRC internal clock before it goes to sleep, so that adc will be sampling in sleep mode.
In this way,I hope, I can wake the module (by setting ADC interrupt priority greater than CPU priority),when the threshold is higher.
But for this I've to continuously sample using adc.
2. Provide the same Adc input to the comparator module and put the Mcu in sleep mode while not processing and turn off adc. Module can wake up
when the input is higher than comparator threshold and starts the adc. I think, in this case, comparator will be working in sleep mode.
But I'm afraid that I may miss some important signal information (as it will take time to turn ON adc after the comparator interrupt).
3. Another is to sample adc at specified intervals using a timer, but as the signal is random, it may miss the signal.
Which will be better or is there any other solution for this? Please help me....
Also, I would like to know the frequency of internal ADRC oscillator.
Thank you
Hai Experts,
I am using PIC24F16KA101 for reading ADC. Adc signals will be coming randomly, so I am putting the Mcu in sleep mode.
I like to wake up the mcu, when the signal crosses a threshold value.
When I googled this, I found many topics related to this (even in this forum), but I like to get clarified in this problem.
I found some solutions to this problem, but I want a solution with minimum power consumption.
1. Sampling ADC at maximum frequency (as the signal is random,high frequency pulse). To use the Adc clock based on system clock
(I'm using 32MHz FRCPLL) when the Mcu is awake and to change to ADRC internal clock before it goes to sleep, so that adc will be sampling in sleep mode.
In this way,I hope, I can wake the module (by setting ADC interrupt priority greater than CPU priority),when the threshold is higher.
But for this I've to continuously sample using adc.
2. Provide the same Adc input to the comparator module and put the Mcu in sleep mode while not processing and turn off adc. Module can wake up
when the input is higher than comparator threshold and starts the adc. I think, in this case, comparator will be working in sleep mode.
But I'm afraid that I may miss some important signal information (as it will take time to turn ON adc after the comparator interrupt).
3. Another is to sample adc at specified intervals using a timer, but as the signal is random, it may miss the signal.
Which will be better or is there any other solution for this? Please help me....
Also, I would like to know the frequency of internal ADRC oscillator.
Thank you
Last edited: