Fujitsu FR81S User Manual

Page of 2342
CHAPTER 17: PPG 
 
5. Operation 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER
 : PPG 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
51 
Setting and operation procedure: 
(1)  Writing of PSDR (Delay value) 
(2)  Writing of PCSR (cycle value) 
(3)  Writing of PDUT (duty value) and transferring cycle value to the buffer (cycle value) 
(4)  Enabling Start Delay mode 
(5)  Enabling of PPG operation 
(6)  Activation trigger generation 
(7)  Loading of the Delay values 
(8)  Counter decrement (Delay value set by (1)) 
(9)  Loading of the cycle value to the down count value (PTMR) and the duty value to the buffer (duty 
value) 
(10)  Counter decrement 
(11)  The down counter matches the duty value 
(12)  Output level inversion at the PPG pin 
(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 (10) to (16) 
 
Calculation formulas: 
  Start Delay value = {Start Delay value (PSDR) + 1} × Count clock 
  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 
 
*: The calculating formula when Center Aligned Wave Form is selected is as follows. 
Calculation formulas: 
  Start Delay value = {(Start Delay value (PSDR) + 1) × 2} × Count clock 
  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 
 
Notes: 
  When the Start Delay value (PSDR) is rewritten during the PPG operation in the Start Delay mode, the 
Start Delay value becomes effective after prohibiting operating once and generating the activation trigger. 
(The Start Delay value becomes effective with the activation trigger.) 
  The Start Delay setting period (PSDR) is waited again when the restart request is generated during the 
Start Delay operation (waiting time period). Moreover, the PPG waveform output is stopped and the Start 
Delay setting period is waited again when the restart is requested while outputting PPG waveform by the 
Start Delay mode enable (STRD)="1". 
  Be sure to prohibit operating once when "0" is written in the Start Delay mode enable (STRD) during the 
Start Delay period. Moreover, if the activation trigger is not generated, the Start Delay mode disable 
(STRD=0) does not become effective. 
 
 
MB91520 Series
MN705-00010-1v0-E
592