English
Language : 

UPD780078 Datasheet, PDF (202/592 Pages) NEC – 8-Bit Single-Chip Microcontrollers
CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 50, 51
(1) PWM output basic operation
Setting
<1> Set each register.
• Set port output latches (P72, P73)Note and port mode registers (PM72, PM73)Note to 0.
• TCL5n: Count clock selection
• CR5n: Compare value
• TMC5n: Count operation stop, PWM mode selection, timer output F/F not changed
TMC5n1
Active Level Selection
0
Active high
1
Active low
Timer output enabled
(TMC5n = 01000001B or 01000011B)
<2> When TCE5n = 1 is set, the count operation is started.
To stop the count operation, set TCE5n to 0.
Note 8-bit timer/event counter 50: P72, PM72
8-bit timer/event counter 51: P73, PM73
PWM output operation
<1> PWM output (output from TO5n) outputs an inactive level until an overflow occurs.
<2> When an overflow occurs, the active level is output. The active level is output until CR5n matches the count
value of 8-bit timer counter 5n (TM5n).
<3> When CR5n matches the count value, the inactive level is output. The inactive level is output until an
overflow occurs again.
<4> Operations <2> and <3> are repeated until the count operation stops.
<5> When the count operation is stopped by setting TCE5n = 0, PWM output becomes the inactive level.
For details of timing, see Figures 9-13 and 9-14.
The cycle, active-level width, and duty are as follows.
• Cycle = 28t
• Active-level width = Nt
• Duty = N/28
(N = 00H to FFH)
Remark n = 0, 1
202
User’s Manual U14260EJ3V1UD