29.01.2013 Views

uPD780065 Subseries PUM - Renesas Electronics

uPD780065 Subseries PUM - Renesas Electronics

uPD780065 Subseries PUM - Renesas Electronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

148<br />

CHAPTER 7 8-BIT TIMER/EVENT COUNTER<br />

7.4.4 8-bit PWM output operation<br />

The 8-bit timer/event counter operates as PWM output when bit 6 (TMC5n6) of 8-bit timer mode control register<br />

5n (TMC5n) is set to 1.<br />

The duty rate pulse determined by the value set to 8-bit compare register 5n (CR5n).<br />

Set the active level width of PWM pulse to CR5n, and the active level can be selected with bit 1 of TMC5n (TMC5n1).<br />

Count clock can be selected with bit 0 to 2 (TCL5n0 to TCL5n2) of timer clock select register 5n (TCL5n).<br />

Enable/disable for PWM output can be selected with bit 0 of TMC5n (TOE5n).<br />

Caution Rewrite of CR5n in PWM mode is allowed only once in a cycle.<br />

Remark n = 0, 1<br />

(1) PWM output basic operation<br />

[Setting]<br />

Set port latch (P72, 73) and port mode register 7 (PM72, PM73) to 0.<br />

Set active level width with 8-bit compare register (CR5n).<br />

Select count clock with timer clock select register 5n (TCL5n).<br />

Set active level with bit 1 of TMC5n (TMC5n1).<br />

Count operation starts when bit 7 of TMC5n is set to 1.<br />

Set TCE5n to 0 to stop count operation.<br />

[PWM output operation]<br />

PWM output (output from TO5n) outputs inactive level after count operation starts until overflow is<br />

generated.<br />

When overflow is generated, the active level set in of setting is output.<br />

The active level is output until CR5n matches the count value of 8-bit counter 5n (TM5n).<br />

After the CR5n matches the count value, PWM output outputs the inactive level again until overflow is<br />

generated.<br />

Operations and are repeated until the count operation stops.<br />

When the count operation is stopped with TCE5n = 0, PWM output comes to inactive level.<br />

Remark n = 0, 1<br />

Preliminary User’s Manual U13420EJ2V0UM00

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!