Method and apparatus for generating a distortionless pulse width modulated waveform
AssigneeAnalog Devices, Inc.
InventorsTushar Ringe, Sourav Roy
Life of this patent
Estimating the term…
Abstract
A technique to provide a distortionless and predictable real-time PWM waveform based on a sequence of combinations of programmed period and width values received from a processor. In one example embodiment, this is accomplished by using two sets of registers to store the period and width values and a tertiary period register to further store the period value with their associated timing controls to provide the predictable real-time PWM waveform.
Claims31
An apparatus comprising a PWM waveform generator to generate a predictable pulse width modulated (PWM) signal, on a real-time basis, based on a sequence of combinations of programmed period and width values and their associated primary period and primary width updates received from a processor.
An apparatus for generating a PWM waveform based on a sequence of combinations of programmed period and width values received from a processor, comprising:
- a primary period storage element to store a current programmed period value upon receiving a primary period storage element write signal from the processor;
- a primary width storage element to store a current programmed width value upon receiving a primary width storage element write signal from the processor;
- a down-counter to generate an EXPIRE signal upon reaching a zero value;
- a state machine to receive the EXPIRE signal from the down-counter and to generate a state signal
- a timing controller to receive the primary width storage element write signal from the processor and to output a secondary storage element write control signal upon receiving the primary width storage element write signal, wherein the timing controller to generate a tertiary period register write signal based on the EXPIRE and the state signals, and wherein the timing controller to further generate a width update counter signal and a period update counter signal based on the EXPIRE and the state signals;
- a secondary width storage element to receive the current width value from the primary width storage element upon receiving the secondary storage element write control signal;
- a subtractor to receive the current period and width values from the primary period storage element and the primary width storage element, respectively, and to output a secondary period value;
- a secondary period storage element to receive the secondary period value from the subtractor upon receiving the secondary storage element write control signal;
- a tertiary period register to receive the secondary period value from the secondary period storage element upon receiving the tertiary period register write signal from the timing controller, wherein the down-counter to receive the current width value upon receiving the width update counter signal and to receive the secondary period value from the tertiary period register upon receiving the period update counter signal and to output an EXPIRE signal;
- and
- a final output waveform generator to output a current PWM waveform based on the EXPIRE signal and the state signal.
A DSP system-on-chip (SoC) for generating a real-time distortionless PWM signal comprising:
- a DSP core to receive current programmed period and width values and their associated period and width update signals from an user program;
- a data bus coupled to the core;
- primary period and primary width registers coupled to the data bus to store the current programmed period and width values in the primary period and primary width registers upon receiving the period and width write signals, respectively, from the DSP core via the data bus;
- secondary period and secondary width registers coupled to the primary period and primary width registers, respectively, to receive the current programmed period and width values from the primary period and primary width registers upon receiving a secondary storage element write control signal;
- a tertiary period register coupled to the secondary period register to store the period value at a beginning boundary of a cycle of the PWM signal;
- a down-counter coupled to the secondary width register and the tertiary period register to receive the current programmed width value at the beginning boundary of the PWM signal, wherein the down-counter to generate an EXPIRE signal upon reaching a zero value, wherein the period value is then loaded into the down-counter from the tertiary period storage element, wherein the down-counter counts down every clock cycle until it reaches zero, and wherein the down-counter generates an EXPIRE signal upon reaching the zero;
- and
- a final output waveform generator coupled to the down-counter to receive the EXPIRE signal and to generate the PWM signal.
An audio processor comprising a system-on-chip (SoC) to generate a predictable pulse width modulated (PWM) signal, on a real-time basis, based on a sequence of combinations of programmed period and width values and their associated period and width updates received from the audio processor, wherein each of the received period and width updates can be across or within a PWM signal boundary of a current PWM signal being generated.
A microcontroller for generating a distortionless PWM signal on a real-time basis comprising:
- a means to store a programmed period value upon receiving a primary period storage element write signal from the microcontroller core;
- a means to store the programmed width value upon receiving a primary width storage element write signal from the microcontroller core;
- a means to count down the period and width values and generate an expired period signal and an expired width signal;
- a means to receive the primary width storage element write signal from the microcontroller core and to output a secondary storage element write control signal upon storing the width value, wherein the means to receive the primary width storage element write signal to generate a tertiary period register write signal based on the expired period signal, and wherein the means to receive the primary width storage element write signal to further generate a width update counter signal based on the expired period signal and a period update counter signal based on the expired width signal;
- a means to receive the width value upon receiving the secondary storage element write control signal;
- a means to receive the period and width values and subtract the width value from the period value and to output a secondary period value;
- a means to receive the secondary period value upon receiving the secondary storage element write control signal;
- a means to receive the secondary period value upon receiving the tertiary period register write signal;
- a means to receive the width value upon receiving the width update counter signal and to further receive the secondary period value upon receiving the period update counter signal and to output an expired width signal based on received width value and an expired period signal based on the secondary period value;
- and
- a means to output the PWM signal based on the expired period and width signals.
A method for generating predictable pulse width modulated (PWM) signal on a real-time basis based on a sequence of combinations of programmed period and width values received from a processor.
Dependencies are inferred from the claim text.