Other Parts Discussed in Thread: TCA8418,
The minimum is 1 microsecond. Seems the PWM would work for audio tone around 4 KHz (250us) - Patrick
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Patrick,
One microsecond is the cycle time, and the high and low periods are specified as multiples of this cycle time. Do you know what PWM resolution you would need? That is, what is the minimum duty cycle and number of different duty cycle configurations required for the audio signal?
Also, is the PWM signal being used basically to represent the audio tone (single frequency) directly or would you need to update the duty cycle configuration at some sample rate (e.g., 44 kHz) to be able to recreate a more complex waveform (e.g., like a class D amplifier)?
Max
Hi Max, I want to use the PWM to drive piezo sounder at frequency(s) between 2K and 4K assume 50/50 duty cycle. Simple tones like key press and error. On this particular design, I was using MAX7349AEG+, now NRND. I can replace key function with TCA8418 but lose the sounder function. LM8333 is only 64 keypad part I have found with any PWM option. - Patrick
Hi Patrick,
Thanks for the clarification. It sounds like you don't intend to use this output as a typical PWM output but instead would configure the high and low times to some fixed period in order to get a toggling rate that is audible. If that's correct, then this usage is possible although there will be some variation in audio frequency generated due to variation in the device's internal clocking. For example, if you configured the high and low times to each be 125 cycles then with a 1 us cycle time in the device you would have a period of 250 us and resulting frequency of 4 kHz. If the cycle time in this case were 0.7 us then the period would reduce to 175 us and the frequency would increase to 5.7 kHz.
Max