Hello Forum users,
I have used an UNO Rev. 3 (Atmega 328) to create 2...12 us pulses at a repetition rate (freq.) of 10Hz ... 2kHz. These pulses are made with TIMER 2 (8 bits / pin 3.) with no division, so it runs on 31250Hz. With a variable OCR2A (read in via a potmeter) I have sufficient control over de pulse width (resolution ~62ns/bit). So now I have the pulses I want, however at a repetition rate of 31250Hz instead of 10Hz ... 2kHz.
The latter is solved with a extra digital output; that acts as an ENABLE. It skips (eliminates) the excess of pulses by using an and hardware AND function. This works fine with an ISR on TIMER2 overflow.
In a next configuration I have introduced OCR2B to create a second pulse on pin 11. And now I have serious timing problems. The delay between the ENABLE (pin 7) and the PWM outputs (pin 3. and pin 11.) is to large to eliminate the pulses sufficiently. I see now much shorter pulses.
Anyone suggustions how to solve this problem? All solutions are welcome ...