Fujitsu FR81S User Manual

Page of 2342
CHAPTER 17: PPG 
 
5. Operation 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER
 : PPG 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
53 
Setting and operation procedure:   
(1)  Writing of PTPC (Timing Point Capture value) 
(2)  Writing of PCSR (cycle value) 
(3)  Writing of PDUT (duty value) and transferring cycle value to the buffer (cycle value) 
(4)  Enabling Timing Point Capture mode 
(5)  Enabling of PPG operation 
(6)  Activation trigger generation 
(7)  Loading of the cycle value to the down count value (PTMR) and the duty value to the buffer (duty 
value) 
(8)  Counter decrement 
(9)  The down counter matches the duty value 
(10)  Output level inversion at the PPG pin 
(11)  Passage of Timing Point Capture setting period from activation trigger 
(12)  Interrupt and A/D activation trigger generation 
(13)  Counter decrement 
(14)  Counter borrow occurrence 
(15)  Clearing of PPG pin output level (restoration to normal state) 
(16)  Reloading of the cycle value to the down count value (PTMR) and the duty value to the buffer (duty 
value) 
(17)  Repetition of steps (8) to (16) 
 
Calculation formulas: 
  Cycle = {Cycle value (PCSR) + 1} × Count clock 
  Duty = {Duty value (PDUT) + 1} × Count clock 
  Time to pulse output = [Cycle value (PCSR) - Duty value (PDUT)] × Count clock 
  Timing Point Capture interrupt and A/D activation trigger generation : Passage of {PTPC register setting 
value + 1} period from the activation trigger 
 
*: The calculating formula when Center Aligned Wave Form is selected is as follows. 
Calculation formulas: 
  Cycle = {(Cycle value (PCSR) + 1) × 2} × Count clock 
  Duty = {(Duty value (PDUT) + 1) × 2} × Count clock 
  Time to pulse output = [Cycle value (PCSR) - Duty value (PDUT)] × Count clock 
  Timing Point Capture interrupt and A/D activation trigger generation : Passage of {(PTPC register setting 
value + 1) × 2} period from the activation trigger 
 
Note: 
  The Timing Point Capture value setting (PTPC) has to set smaller than the cycle value (PCSR). When the 
value that is larger than cycle value (PCSR) is set, the A/D activation trigger or the Timing Point Capture 
match interrupt is not generated. 
  The value becomes effective at the next cycle after rewriting when the Timing Point Capture value 
(PTPC) is rewritten during the PPG operation. 
  When "0" is written in the Timing Point Capture mode enable (TPC) during the PPG operation, neither 
the interrupt by the Timing Point Capture value match nor the A/D activation trigger is generated. Be 
sure to set the setting according to the procedure when Timing Point Capture mode enable (TPC) is set 
again. 
 
 
MB91520 Series
MN705-00010-1v0-E
594