MB95630H Series
MN702-00009-1v0-E
FUJITSU SEMICONDUCTOR LIMITED
319
CHAPTER 18 8/16-BIT PPG
18.6 Operations and Setting Procedure Example
■
Setting Procedure Example
Below is an example of procedure for setting the 8/16-bit PPG ch. n.
●
Initial setup
1. Set the port output. (DDR)
2. Set the interrupt level. (ILR*)
3. Select the operating clock, enable the output and interrupt. (PCn1)
4. Select the operating clock, enable the output and interrupt, select the operation mode.
(PCn0)
5. Set the cycle. (PPS)
6. Set the duty. (PDS)
7. Set the 8/16-bit PPG output reverse register. (REVC)
8. Start the 8/16-bit PPG. (PPGS)
*: For details of the interrupt level setting register (ILR), refer to "CHAPTER 5 INTERRUPTS" in this
hardware manual and "
■
INTERRUPT SOURCE TABLE" in the device data sheet.
●
Interrupt processing
1. Process any interrupt.
2. Clear the interrupt request flag. (PCn1:PUF1, PCn0:PUF0)
3. Start the 8/16-bit PPG. (PPGS)