I am using an Atmega32 and want to generate 38khz waves with a programmable duty cycle.
My idea was to generate 380khz waves and then have a counter going from 1 to 10, and dividing it accordingly to get the appropriate duty cycle.
Now I can easily generate 38khz waves using timers, but...
I am afraid of using external crystals because I don't know how to configure those fuse bits. The in-built 1Mhz oscillator cannot produce 380khz accurately.
Is there any other way of either getting 38khz waves of a 10% duty cycle or getting 380khz without using external crystals ?
Thank you.
My idea was to generate 380khz waves and then have a counter going from 1 to 10, and dividing it accordingly to get the appropriate duty cycle.
Now I can easily generate 38khz waves using timers, but...
I am afraid of using external crystals because I don't know how to configure those fuse bits. The in-built 1Mhz oscillator cannot produce 380khz accurately.
Is there any other way of either getting 38khz waves of a 10% duty cycle or getting 380khz without using external crystals ?
Thank you.