Activating Multiple Channels By Using The General Control Register - Fujitsu FR60 Hardware Manual

32-bit microcontroller mb91301 series
Hide thumbs Also See for FR60:
Table of Contents

Advertisement

7.7
Activating Multiple Channels by Using the General Control
Register
You can activate multiple channels at the same time by selecting the start trigger with
the GCN10.
This section shows an example of how GCN20 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:
The setting must follow the order of PCSR followed by PDUT.
3) Specify the trigger input source for the channel to be activated with GCN10.
In this case, the initial setting is kept because GCN20 is used.
(ch.0 --> EN0, ch.1 --> EN1, ch.2 --> EN2, ch.3 --> EN3)
4) Set the control status register for the channel to be activated.
- CNTE: 1 -->
- STGR: 0 -->
- MDSE: 0 -->
- RTRG: 0 -->
- CSK1, CSK0:00 --> Sets the counter clock to φ.
- PGMS: 0 -->
- Bits 8:0 -->
- EGS1, EGS0:01 --> Activates channel at a rising edge
- IREN: 1 -->
- IRQF: 0 -->
- IRS1, IRS0:01 -->
- PPE0 to PPE3: 1 --> Enables PPG output. (setting of port function register)
- OSEL: 0 -->
5) Activate a start trigger by writing data to GCN20.
To activate ch.0 and ch.1 at the same time with the above settings, set the EN0 and EN1 bits of
GCN20 to "1". A rising edge is generated and pulses are output from PPG0 and PPG1.
Enables timer operation.
Since the channel is activated by GCN20, this bit is not set.
Selects PPG operation.
Inhibits restart.
Does not mask PPG output.
Any value can be set because these bits are unused.
Enables interrupt request.
Clears interrupt source.
Issues interrupt request when counter borrow occurs.
Sets normal polarity.
CHAPTER 7 PPG TIMER
303

Advertisement

Table of Contents
loading

Table of Contents