Page 1 of 1

Timer interrupt 1MHz

Posted: Wed Dec 23, 2020 1:10 pm
by rradojko
I use licensed Flowcode6.
Is it possible to make a 1MHz interrupt at the B5 (it can also be some other way out) output with the Arduino Nano?
If so, how to do it?
Does anyone have an example of Flowcode timer code TMR0 or TMR1?

Thank you very much.

Re: Timer interrupt 1MHz

Posted: Wed Dec 23, 2020 6:46 pm
by Bachman
1 MHz interrupt is extremly frequent to handle it correctly and use the MCU to other tasks. You should use a PWM output or a dedicated oscillator circuit.

Re: Timer interrupt 1MHz

Posted: Fri Dec 25, 2020 9:02 pm
by rradojko
Bachman wrote:
Wed Dec 23, 2020 6:46 pm
1 MHz interrupt is extremly frequent to handle it correctly and use the MCU to other tasks. You should use a PWM output or a dedicated oscillator circuit.
Thanks for the reply.
Yes, 1MHz will probably be a really high frequency.
How to write a PWM program to be on P5 5KHz pin????

Can anyone show any example of a PWM program running at 5KHz-?

Thanks.