Chapter 9
16-bit Timer
IX - 50 16-bit Standard IGBT Output (with Variable Duty)
9.9.2 Setup Example
Standard IGBT Output Setup Example
Here is an example that, using Timer 7 with HCLK (f
HCLK
= 10 MHz) as the clock source, the IGBT output
waveform with the 1/4 duty cycle and 152.59 Hz is output from TM7IOA output pin using IRQ0 input signal as a
trigger.
The setup procedure and its description are shown below.
Figure:9.9.4 Output Waveform of TM7IO output pin
Step Setting Register Description
1 Disable the timer counter TM7MD.TM7EN = 0 Disable the timer count operation.
2 Select the IGBT output pin TMIOEN1.TM7OEN = 1 Select the IGBT output pin.
[Chapter 7 I/O Port]
3 P0DIR.P0DIR4 = 1
4
Set the timer mode register TM7MD3.T7IGBTEN = 1
TM7MD2.TM7PWM = 1
TM7MD1.TM7CL = 0
Enable the IGBT output.
5 TM7MD2.TM7BCR = 0 Select the TM7BC clear source.
6 TM7MD3.T7IGBT1-0 = 01 Select the IGBT trigger source.
7 TM7MD3.T7IGBTTR = 1 Select the IGBT trigger level.
8 TM7MD4.T7NODED = 1 Select “No” as the dead time.
9
TM7MD1.TM7CK1-0 = 00
TM7MD1.TM7PS1-0 = 00
Select HCLK as the count clock source.
10
Set the "High" period of IGBT TM7PR1 = 0x3FFF Set the "High" period of IGBT output.
Setup value: 65536 / 4 - 1 = 16383 (0x3FFF)
11
Set the external interrupt IRQISEL0.IRQ0SEL = 0
IRQIEN.IRQI0EN = 1
Enable the external interrupt pin.
12 Enable the timer counter TM7MD1.TM7EN = 1 Enable the timer count operation.
TM7IO output
IGBT trigger
152.59 Hz