
222
CHAPTER 8 PPG TIMER
8.7
Activating Multiple Channels by Using the General Control
Register (GCN)
You can activate multiple channels at the same time by selecting the start trigger with
the GCN.
This section shows an example of how GCN2 is set to activate channels via software.
■
Activating multiple channels with the GCN
[Setting procedure]
1) Set the cycle in the PCSR.
2) Set the duty ratio in the PDUT.
Note that the setting must follow the order of PCSR followed by PDUT.
3) Specify the trigger input source for the channel to be activated.
In this case, the initial setting is kept because GCN2 is used.
(ch0 --> EN0, ch1 --> EN1, ch2 --> EN2, ch3 --> EN3)
4) Set the control status register for the channel to be activated.
- CNTE: 1 --> Enables timer operation.
- STGR: 0 --> Since the channel is activated by GCN2, this bit is not set.
- MDSE: 0 --> Selects PWM operation.
- RTRG: 0 --> Inhibits restart.
- CSK1, 0:00 --> Sets the counter clock to
Φ
.
- PGMS: 0 --> Does not mask PWM output. (Bits 8:0 --> Any value can be set because these
bits are unused.)
- EGS1, 0:01 --> Activates channel at a rising edge
- IREN: 1 --> Enables interrupt request.
- IRQF: 0 --> Clears interrupt source.
- IRS1, 0:01 --> Issues interrupt request when counter borrow occurs.
- POEN: 1 --> Enables PWM output.
- OSEL: 0 --> Sets normal polarity.
5) Activate a start trigger by writing data to GCN2.
To activate ch0 and ch1 at the same time with the above settings, set the EN0 and EN1 bits of
GCN2 to 1. A rising edge is generated and pulses are output from PWM0 and PWM1.
Summary of Contents for MB91150 Series
Page 1: ......
Page 2: ......
Page 3: ...FUJITSU LIMITED FR30 32 BIT MICROCONTROLLER MB91150 Series HARDWARE MANUAL ...
Page 4: ......
Page 10: ...vi ...
Page 112: ...96 CHAPTER 3 MEMORY SPACE CPU AND CONTROL UNIT ...
Page 178: ...162 CHAPTER 5 I O PORTS ...
Page 214: ...198 CHAPTER 7 16 BIT RELOAD TIMER ...
Page 240: ...224 CHAPTER 8 PPG TIMER ...
Page 310: ...294 CHAPTER 13 8 10 BIT A D CONVERTER ...
Page 318: ...302 CHAPTER 14 8 BIT D A CONVERTER ...
Page 362: ...346 CHAPTER 15 UART ...
Page 420: ...404 CHAPTER 19 PERIPHERAL STOP CONTROL ...
Page 428: ...412 CHAPTER 20 CALENDAR MACROS ...
Page 503: ...487 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 510: ...494 INDEX ...
Page 512: ......