Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
HARDWARE/SOFTWARE IMPLEMENTATION OF A PWM WITH ENHANCED FEATURES USING A STANDARD MICROPROCESSOR
Document Type and Number:
WIPO Patent Application WO/2004/054104
Kind Code:
A1
Abstract:
A method and apparatus is provided to generate a pulse-width modulated (PWM) waveform with enhanced features in accordance with a pre-determined protocol using a standard microprocessor. The method and apparatus is able to handle both variable on/off-timing control and multiple-event interrupts. The PWM functions of the present invention are implemented by software in the microprocessor that handles not only on/off events controlled by external pins, but is programmable on/off timing as well.

Inventors:
LI QIONG M (US)
Application Number:
PCT/IB2003/005396
Publication Date:
June 24, 2004
Filing Date:
November 25, 2003
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
KONINKL PHILIPS ELECTRONICS NV (NL)
LI QIONG M (US)
International Classes:
H03K7/08; H04L25/49; (IPC1-7): H03K7/08
Foreign References:
US20020180545A12002-12-05
US5298871A1994-03-29
US20020136290A12002-09-26
US6421382B12002-07-16
Other References:
PATENT ABSTRACTS OF JAPAN vol. 2000, no. 03 30 March 2000 (2000-03-30)
Attorney, Agent or Firm:
KONINKLIJKE PHILIPS ELECTRONICS N.V. c/o Aaron, Waxler (P.O. Box 3001 Briarcliff Manor, NY, US)
Download PDF:
Claims:
CLAIMS:
1. A PWM waveformgenerator apparatus in which a series of predetermined pulse widths are modulated in accordance with a predetermined protocol, comprising: means for generating a plurality of on/off timingbased interrupts; means for generating a force on/off actionbased interrupt having a programmable control; means for generating a force on/off actionbased interrupt having an external control; and, means for interpreting said generated plurality of timingbased interrupts and said at least one actionbased interrupt such that the series of pulse widths of the PWM waveform generator are modulated in accordance with said protocol.
2. The PWM waveformgenerator apparatus of claim 1, wherein: the means for generating a plurality of on/off timingbased interrupts is a programmable onoffcontrol part; the means for generating a force on/off actionbased interrupt having a programmable control is the programmable onoff control part; the means for generating a force on/off actionbased interrupt having an external control is selection from the group consisting of an external force on action and an external forceoff action; and, the interpreting means is a multipleeventinterrupts part comprising a software interrupt routine for handling each timingbased and actionbased interrupt.
3. The PWM waveform generator apparatus of claim 2, wherein said programmable onoffcontrol part comprises: an ontime control comprising a first timer and a first comparator; and an offtime control comprising a second timer and second comparator, wherein the ontime control is enabled for a first period and the offtime control is disabled when the PWM is high and the offtime control is enabled for a second period and the on time control is disabled when the PWM is low, such that the first and second control are alternately enabled and disabled.
4. The PWM waveform generator apparatus of claim 3, wherein: for on/off timing said protocol comprises at least one of : a programmable onpulse width Min on parameter control, a programmable onperiod Maxon parameter control, a programmable offpulse width Min off parameter control, a programmable offperiod Maxoff parameter control, at least one event control selected from a programmable event control for triggering a forceoff event and an external event control for triggering a forceoff event, at least one event control selected from a programmable event control for triggering a forceon event and an external event control for triggering a forceon event, wherein at least one of a forceon event and a forceoff event can be triggered in an on period and in an offperiod.
5. The PWM waveformgenerator apparatus of claim 4, wherein: the first timer and second timer respectively comprises a first and third register; the first and second comparator respectively comprises a second and fourth register; wherein, when the ontime control is enabled, a. the second register has been preloaded by the ontime control with a compare value equal to a predetermined minimum onwidth (minimum ontime Min on) of the PWM, the first register has been preloaded with a predetermined maximum on width (maximum ontime Maxon) of the PWM such that there is no delay time for loading said first and second register, b. a first interrupt is triggered by the first comparator when the second register equals the compare value and a second interrupt is triggered by the first timer when the first register equals a predetermined first period, at least one actionbased interrupt can be triggered at least once during one period of the PWM according to the predetermined protocol, thereby turning off the PWM by the ontime control when at least one of the second interrupt and the at least one actionbased interrupt is triggered and the first interrupt is triggered, and when the offtime control is enabled c. the fourth register has been preloaded with a compare value equal to a pre determined minimum offwidth (minimum offtime Min off) of the PWM, the third register has been preloaded with a predetermined maximum offwidth (maximum offtime Maxoff) of the PWM such that there is no delay time for loading said third and fourth register, d. a third interrupt is triggered by the second comparator when the fourth register equals the compare value and a fourth interrupt is triggered by the second timer when the third register equals the predetermined second period, at least one actionbased interrupt can be triggered at least once during one period of the PWM according to the pre determined protocol, thereby turning on the PWM by the offtime control when at least one of the fourth interrupt and theat least one actionbased interrupt is triggered and the third interrupt is triggered.
6. A microprocessor for performing the programmable onoff control and the software interrupt routines as claimed in claim 2.
7. A method of programmable control of a PWM generator in which a signal is modulated as a series of on/off pulses each having a width and a period in accordance with a predetermined protocol, comprising the steps of : providing a predetermined protocol for a series of pulse widths and periods; generating a plurality of on/off timingbased interrupts in accordance with the provided protocol; generating at least one force on/off actionbased interrupt in accordance with the provided protocol; interpreting said generated plurality of timingbased interrupts and said at least one actionbased interrupt in accordance with said protocol.
8. The method of claim 7, wherein: the step of generating a plurality of on/off interrupts further comprises the steps of : a. providing a programmableonoffcontrol part, and b. controlling the generation of said plurality of on/off timingbased interrupts by the provided programinable onoff control part; the step of generating at least one force on/off actionbased interrupt further comprises at least one of the steps of : c. generating the at least one force on/off actionbased interrupt by the provided programmable onoff control part; d. performing the substeps of : 1. providing an external control for the generation of the at least one force on/off actionbased interrupt; and 2. generating the at least one force on/off actionbased interrupt by the provided external control.
9. The method of claim 8, wherein the interpreting step further comprises the steps of : e. providing a multiple eventinterrupts part; and f. controlling the interpretation of at least one actionbased interrupt by the provided multiple eventinterrupts part.
Description:
HARDWARE/SOFTWARE IMPLEMENTATION OF A PWM WITH ENHANCED FEATURES USING A STANDARD MICROPROCESSOR

The present invention relates to pulse-width-modulation (PWM) waveform generators. More particularly, the present invention relates to an intelligent, programmable PWM generator with enhanced features implemented using standard modules in a microprocessor. The PWM of the present invention is able to handle both variable on/off- timing control and multiple-event interrupts.

A PWM control signal is widely used in power converters with a PWM control to turn on and off power switches. Examples of PWM generators include: a hardware- implemented, duty-cycle-modulated PWM, as illustrated in FIG. 1 ; a current control circuit with critical-boundary modulation, as illustrated in FIG. 2; and, a software-controlled PWM generator with programmable on and off periods, as illustrated in FIG. 5.

A simple PWM generator circuit with a variable pulse-width and fixed-period control is illustrated in FIG. 1. The control-signal waveforms are illustrated in FIG 2. The inputs to the circuit consist of one saw-toothed signal, Vsaw, and a reference voltage, Verr, which is a fixed voltage for an open-loop circuit and an error voltage from the output of a compensation network for a closed-loop circuit. The PWM signal becomes low when the saw-toothed voltage reaches Verr as illustrated in FIG. 2. The pulse-width of the PWM is controlled by Verr.

A PWM generator of critical boundary control with peak-current-detect off and zero-current-detect on is illustrated in FIG. 3. The control waveforms are illustrated in FIG.

4. The PWM becomes low when a peak current is detected and the PWM becomes high again when a zero current is detected (ZCD). The PWM can have a variable pulse-width and period.

In addition to PWM generators with hardware implementation in conventional analog circuits, a commonly used PWM generator available in many microprocessors is illustrated in FIG. 5. The microprocessor calculates the switching period and on-time of the PWM signal and pre-loads the counter registers before the next period. The output of a PWM generator is illustrated in FIG. 6. However, in the implementation illustrated, the software cannot handle the external on or off signal as a regular control signal (e. g. in each period continuously).

Many applications require combined features from known PWM generators. For example, in existing peak current mode controlled circuits, the PWM can be forced off by a peak current detection, forced-on by a zero current detection while at the same time a maximum on time, minimum off time, and maximum off time must be satisfied.

Another example of an application requiring combined features of known PWM generators is a digital-controlled circuit that requires two-mode operations depending on load conditions--e. g. current mode control under a heavy load and voltage mode control under a light load. In a current mode control, the on and off is controlled by external forced on and forced off, in voltage mode control, the on and off is calculated by a software in a microprocessor with a programmable on and off timing.

Another example is a power factor-correction circuit with programmable on-time and zero detection off-time control.

FIG. 7 illustrates a block diagram of a standard timer. Two parameters are preloaded in the timer: period and compare value. The timer automatically reloads timing parameters when the previous counted period is reached or a reload command is sent from the software. The timer starts counting when the counter is preloaded and the enable signal is high. An interrupt signal can be generated when the compared value is reached or the period value is reached. FIG. 8 illustrates the output waveform of the standard timer illustrated in FIG. 7.

None of the prior art PWM devices provides this combination of features in a digitally-controlled circuit using a microprocessor.

Thus, a PWM generator is needed with enhanced features that are implemented in a microprocessor with a software and having standard hardware peripherals. The PWM functions of the present invention are implemented by a software in a microprocessor that handles not only on or off events controlled by external pins, as in FIGs. 1 and 3, but is also programmable on and off timing as illustrated in FIG. 5.

A block diagram of a generic PWM generator according to a preferred embodiment of the present invention has on/off time control and multiple-event on/off actions as illustrated in FIG. 9. In this preferred embodiment, the PWM function with enhanced features uses standard modules in a microprocessor and is implemented by a hardware/software interaction in a microprocessor. No extra hardware is needed in the implementation. The number of force-on and force-off events depends on application requirements and the number of pins can be more than the two pins that are illustrated in FIG. 9.

FIG. 1 illustrates a simple variable pulse-width and fixed-period control circuit.

FIG. 2 illustrates control waveforms with a circuit illustrated in FIG. 1.

FIG. 3 illustrates a control circuit with peak current off and zero current on.

FIG. 4 illustrates control-signal waveforms with the circuit illustrated in FIG 3.

FIG. 5 illustrates a block diagram of a commonly-used PWM generator in MCU.

FIG. 6 illustrates the PWM output waveform of the generator illustrated in FIG. 5.

FIG. 7 illustrates a block diagram of a standard timer.

FIG. 8 illustrates the output of a standard timer.

FIG. 9 illustrates a block diagram of a generic PWM generator with on and off time controls and multiple-event interrupts.

FIG. 10 illustrates a block diagram of a PWM generator using standard units having enhanced features, according to an embodiment of the present invention.

FIG. 11 illustrates a flow chart of multiple-event interrupts for a PWM generator.

An implementation block diagram of a PWM according to a preferred embodiment of the present invention is illustrated in FIG. 10. As illustrated, the PWM generator of the present invention has two parts: a programmable on-and-off-control part 102 and a multiple-event-interrupts part 103. The programmable on-off-control part 102 is implemented by a first and second standard timer in a microprocessor. The multiple-event- interrupts part 103 is implemented by multiple interrupt routines in the software. The programmable PWM generator is controlled by hardware/software interactions.

In a preferred embodiment of the present invention, the two standard timers that are used in the programmable on-off-control part 102 are used for an on-time control 100 and an off-time control 101. These two controls function alternatively. The on-time control 100 is enabled when the PWM is high and the off-time control 101 is enabled when the PWM is low. The on-time control 100 sets the PWM to low when the min-on time is exceeded and either a force-off or a maxon event is triggered. The off-time control sets the PWM to high when the min-off time is exceeded and either a force on or a maxoff event is triggered. The timing parameters are pre-loaded in the inactive control when the other control is active, so there is no delay involved in this loading process.

FIG. 9 is a block diagram of a generic PWM according to the present invention.

Illustrated are four registers and two events that can be externally or programmatically controlled (Force on and Force off). A pre-determined protocol for a PWM is the on-off pulse and period width (s) and the order of producing these on/off pulses, e. g. , a specification for a series of pulses having a given width and period. For example, the period 90 is determined by the value of the Maxon register and the Maxoff register or (Maxon register + Maxoff register). The on-width 92 is determined by the value of the Maxon register. The off width 93 is determined by the value of the Maxoff register. In a given protocol, Force on and Forceoff events can override the register values to a certain extent within a minimum on and maximum on, and minimum off and maximum off period, as illustrated in FIG. 11.

FIG. 11 illustrates a flow chart 120 of a preferred embodiment of the multiple- event-interrupts part 103 that implements a pre-determined protocol for a series of on/off pulses that is produced by a PWM generatorError ! Reference source not found.. The interrupts associated with this pre-determined protocol are implemented by interrupt- handling software routines resident in a microprocessor. In the preferred embodiment of the programmable on/off control 118, illustrated in FIG. 11, four timer registers are provided 118 two for the timer 1 and the timer 2. Six events can be triggered 119: four by the programmable on/off control software and two externally. Keeping in mind that the timers are active alternately--meaning that the performance of a. and b. below alternates-- in a preferred embodiment, the flow of processing by the multiple-event interrupts processor 103 is as follows:

a. If either a force-off action occurs (int5 is triggered) or timerl has been on longer than Tmaxon (int2 is triggered) then intl is tested at step 111 until it is triggered by the compare value reaching Tminon. Then, at step 112 the PWM is set to low or off. Following step 112, at step 113 timer2 is turned on, timer 1 is turned off, int6=forceon is enabled, and int5=force_off is disabled. b. If either a force on action occurs (int6 is triggered) or timer2 has been off longer than Tmax off (int4 is triggered), then int3 is tested at step 115 until it is triggered by the compare value reaching Tminoff. Then, at step 116 the PWM is set to high or turned on. Following step 116, at step 117 timerl is turned on, timer 2 is turned off, int5=forceoffis enabled, and int6=forceon is disabled.

When some of the events are not required by an application, those events can be disabled easily in the software.

The PWM implementation of a preferred embodiment of the present invention employs standard peripherals of a microprocessor without requiring any special units or extra hardware thus providing maximum flexibility as a PWM generator.

The PWM of a preferred embodiment has the following features: Programmable min-on control 'Programmable max-on control 'Programmable min-off control Programmable max-off control Multiple force-off events control, programmable or external Multiple force-on events control, programmable or external On/off timing can involve all or some of the parameters or events above.

All events can be triggered in every PWM period continuously No delay time for pre-loading timer registers While the invention has been explained with reference to specific embodiments of the invention, the explanation is presented by way of illustration only and not in any limiting sense. The invention scope is not restricted to the software and hardware structure described above but includes various modifications and variations that would be apparent to one skilled in the art. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications are intended to be included within the scope of the following claims.