Hello,
I have a Teensy 3.2 board and I would like to know if there is a possibility to produce a pwm signal with a period not being a multiple of microseconds. For example I would need a signal with a frequency of 289.3519Hz. This would be produced with a period of 3456 microseconds. But if I change the period with only one microsecond the resulted frequency is 289.2682Hz. The difference between these frequencies is too large (0.0837Hz). In arduino uno I was able to obtain a much smaller difference between these frequencies (about 0.0003Hz), simply incrementing an output compare register of a timer. But I can’t use arduino as it is too slow. So is there a different way to access the hardware timers to get fractional periods of microseconds?
Sorin
I have a Teensy 3.2 board and I would like to know if there is a possibility to produce a pwm signal with a period not being a multiple of microseconds. For example I would need a signal with a frequency of 289.3519Hz. This would be produced with a period of 3456 microseconds. But if I change the period with only one microsecond the resulted frequency is 289.2682Hz. The difference between these frequencies is too large (0.0837Hz). In arduino uno I was able to obtain a much smaller difference between these frequencies (about 0.0003Hz), simply incrementing an output compare register of a timer. But I can’t use arduino as it is too slow. So is there a different way to access the hardware timers to get fractional periods of microseconds?
Sorin