Hello,
I was wondering what is the best way to measure the frquency of an interrupt?
I would like gather some statics on the running time of an ADC interrupt.
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I was wondering what is the best way to measure the frquency of an interrupt?
I would like gather some statics on the running time of an ADC interrupt.
Thanks
thanks Gilbert, so which one of these would be better?
void testInterrupt(){
PF2 ^= 0x04; //toggle PF2
Stuff();
}
or
void testInterrupt(){
PF2 ^= 0x04; //toggle PF2
Stuff();
PF2 ^= 0x04; //toggle PF2
}
I am assuming the first one finds the time between interrupts and the second is how long it takes to execute the ISR?
Hello Glibert, thanks for your reply.
Please bear with me, as I am a student, just learning here.
So, I want to measure the ADC interrupt frequency. Lets say I initialise PF2 to 0, and use the following:
void testInterrupt(){
PF2 ^= 0x04; //toggle PF2
Stuff();
PF2 ^= 0x04; //toggle PF2
}
.
lets say this is the output. on the oscilloscope.
Between A and B, this corresponds to the running time of Stuff(). Is that right?
Between B and C, is the time is take to re-enter the ISR. is that right?
Between A and C, is one period of the ISR. So 1/period will be the frequency of the interrupt. is that right?
Thanks
Daniel