01.08.2013 Views

Chapter 15 Pulse-Width Modulation Subsystem (PWMSS).

Chapter 15 Pulse-Width Modulation Subsystem (PWMSS).

Chapter 15 Pulse-Width Modulation Subsystem (PWMSS).

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Enhanced PWM (ePWM) Module www.ti.com<br />

Figure <strong>15</strong>-26 shows how a symmetric PWM waveform can be generated using the up-down-count mode<br />

of the TBCNT. In this mode 0%-100% DC modulation is achieved by using equal compare matches on the<br />

up count and down count portions of the waveform. In the example shown, CMPA is used to make the<br />

comparison. When the counter is incrementing the CMPA match will pull the PWM output high. Likewise,<br />

when the counter is decrementing the compare match will pull the PWM signal low. When CMPA = 0, the<br />

PWM signal is low for the entire period giving the 0% duty waveform. When CMPA = TBPRD, the PWM<br />

signal is high achieving 100% duty.<br />

When using this configuration in practice, if you load CMPA/CMPB on zero, then use CMPA/CMPB values<br />

greater than or equal to 1. If you load CMPA/CMPB on period, then use CMPA/CMPB values less than or<br />

equal to TBPRD-1. This means there will always be a pulse of at least one TBCLK cycle in a PWM period<br />

which, when very short, tend to be ignored by the system.<br />

Mode: Up-Down Count<br />

TBPRD = 4<br />

CAU = SET, CAD = CLEAR<br />

0% - 100% Duty<br />

TBCNT<br />

TBCTR Direction<br />

Case 1:<br />

CMPA = 4, 0% Duty<br />

Case 2:<br />

CMPA = 3, 25% Duty<br />

Case 3:<br />

CMPA = 2, 50% Duty<br />

Case 3:<br />

CMPA = 1, 75% Duty<br />

Case 4:<br />

CMPA = 0, 100% Duty<br />

Figure <strong>15</strong>-26. Up-Down-Count Mode Symmetrical Waveform<br />

0<br />

1<br />

2<br />

3<br />

4<br />

3<br />

2<br />

UP DOWN<br />

1<br />

0<br />

1<br />

2<br />

3<br />

4<br />

3<br />

2<br />

UP DOWN<br />

1<br />

0<br />

EPWMxA/EPWMxB<br />

EPWMxA/EPWMxB<br />

EPWMxA/EPWMxB<br />

EPWMxA/EPWMxB<br />

EPWMxA/EPWMxB<br />

1650 <strong>Pulse</strong>-<strong>Width</strong> <strong>Modulation</strong> <strong>Subsystem</strong> (<strong>PWMSS</strong>) SPRUH73E–October 2011–Revised May 2012<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!