EasyManua.ls Logo

Panasonic MN101L Series

Panasonic MN101L Series
563 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9
16-bit Timer
16-bit High-Precision IGBT Output (with Variable Period/Duty) IX - 57
9.10.2 Setup Example
High-Precision IGBT Output Setup Example
Here is an example that, using Timer 7 with HCLK (f
HCLK
= 10 MHz) as clock source, the IGBT output wave-
form with the 1/4 duty cycle and 400 Hz is output from TM7IOA output pin using the external interrupt 0 input
signal as a trigger.
The setup procedure and its description are shown below.
Figure:9.10.7 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
TMIOEN1.TM8OEN = 1
Select the IGBT output pin.
[Chapter 7 I/O Port]
3 P0DIR.P0DIR4 = 1
P5DIR.P5DIR7 = 1
4 Set the timer mode register TM7MD3.T7IGBTEN = 1
TM7MD2.TM7PWM = 1
TM7MD1.TM7CL = 0
Enable the IGBT output.
5 TM8MD3.TM8SEL = 1 Select the IGBT output.
6 TM7MD2.TM7BCR = 0
TM7MD2.T7PWMSL = 1
Select the TM7BC clear source and the duty determination
source of IGBT output.
7 TM7MD4.T7NODED = 1 Select “No” as the dead time.
8 TM7MD3.T7IGBT1-0 = 01 Select the IGBT trigger source.
9 Set the external interrupt IRQ0ICR.REDG0 = 1 Set the external interrupt valid edge.
10 Set the timer mode register TM7MD3.T7IGBTTR = 0
TM7MD2.T7ICEDG0 = 1
Select the IGBT trigger level and IGBT trigger edge.
11 Set the external interrupt IRQISEL0.IRQ0SEL = 0
IRQIEN.IRQI0EN = 1
Enable the external interrupt pin.
12 Set the interrupt level IRQ0ICR.IRQ0LV1-0 Refer to [3.1.3 Maskable Interrupt Control Register Setup].
13 Enable the interrupt IRQ0ICR.IRQ0IE = 1
14 Set the timer mode register TM7MD1.TM7CK1-0 = 00
TM7MD1.TM7PS1-0 = 00
Select HCLK as the count clock source.
15 Set the IGBT output cycle TM7PR1 = 0x61A7 Set the IGBT output cycle.
Setup value: 25000 - 1 = 24999 (0x61A7)
16 Set the "High" period of IGBT TM7PR2 = 0x1869 Set the "High" period of IGBT output.
Setup value: 25000 / 4 - 1 = 6249 (0x1869)
17 Enable the timer counter TM7MD1.TM7EN = 1 Enable the timer count operation.
TM7IO output
IGBT trigger
400 Hz

Table of Contents

Related product manuals