High frequency interrupt (16F15323)
Posted: Sat Jan 26, 2019 7:06 pm
Hey everyone
Looking at a new project, thinking about using a IOC pin to measure frequencies around 100Khz. Not really done thes high frequencies before, so the first things that come to mind are?
What clock frequency will I need? is it possible to do it with a 32Mhz interlal oscillator?
The program itself wont actually be performing many other tasks other than checking a couple other inputs and setting some PWM outputs.
Was thinking about using the IOC and a timer, but is tehre an easier way ? Thinking along the lines of something like Using Timer1 and measuring the transition on T0CK1 or something? How would I do this and is using hte IOC not easier? which one will be more accurate? (measuring square wave duty cycle on the input).
Another thing I may want to look at is how do I prioritise the various interuppts?
And finally, is it possible to use the IOC port twice? meaning can I set the IOC to look at 2 pins and run one macro, then set two other pins to run a different macro?
Thanks
Looking at a new project, thinking about using a IOC pin to measure frequencies around 100Khz. Not really done thes high frequencies before, so the first things that come to mind are?
What clock frequency will I need? is it possible to do it with a 32Mhz interlal oscillator?
The program itself wont actually be performing many other tasks other than checking a couple other inputs and setting some PWM outputs.
Was thinking about using the IOC and a timer, but is tehre an easier way ? Thinking along the lines of something like Using Timer1 and measuring the transition on T0CK1 or something? How would I do this and is using hte IOC not easier? which one will be more accurate? (measuring square wave duty cycle on the input).
Another thing I may want to look at is how do I prioritise the various interuppts?
And finally, is it possible to use the IOC port twice? meaning can I set the IOC to look at 2 pins and run one macro, then set two other pins to run a different macro?
Thanks