upd78f0103hmca1-5a4-a Renesas Electronics Corporation., upd78f0103hmca1-5a4-a Datasheet - Page 151

no-image

upd78f0103hmca1-5a4-a

Manufacturer Part Number
upd78f0103hmca1-5a4-a
Description
8-bit Single-chip Microcontrollers
Manufacturer
Renesas Electronics Corporation.
Datasheet
7.4.4 Operation as PWM output
(TMC50) is set to 1.
(TMC501).
(1) PWM output basic operation
8-bit timer/event counter 50 operates as a PWM output when bit 6 (TMC506) of 8-bit timer mode control register 50
The duty pulse is determined by the value set to 8-bit timer compare register 50 (CR50).
Set the active level width of the PWM pulse to CR50; the active level can be selected with bit 1 of TMC50
The count clock can be selected with bits 0 to 2 (TCL500 to TCL502) of timer clock selection register 50 (TCL50).
PWM output can be enabled/disabled with bit 0 of TMC50 (TOE50).
Caution In PWM mode, make the CR50 rewrite period 3 count clocks of the count clock (clock selected by
<1> Set each register.
<2> The count operation starts when TCE50 = 1.
<1> PWM output (output from TO50) outputs an inactive level until an overflow occurs.
<2> When an overflow occurs, the active level is output.
<3> After the CR50 matches the count value, 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 with TCE50 = 0, PWM output becomes inactive.
Setting
PWM output operation
• Set the port output latch (P17) and port mode register 1 (PM17) to 0.
• TCL50: Select the count clock.
• CR50:
• TMC50: Stop the count operation, select PWM mode.
Set TCE50 to 0 to stop the count operation.
The active level is output until CR50 matches the count value of 8-bit timer counter 50 (TM50).
For details of timing, see Figures 7-10 and 7-11.
The cycle, active-level width, and duty are as follows.
• Cycle = 2
• Active-level width = Nt
• Duty = N/2
TCL50) or more.
(N = 00H to FFH)
Compare value
The timer output F/F is not changed, timer output is enabled.
8
t
8
(TMC50 = 01000001B or 01000011B)
TMC501
0
1
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 50
Active-high
Active-low
User’s Manual U16846EJ3V0UD
Active Level Selection
151

Related parts for upd78f0103hmca1-5a4-a