Panasonic F77G User Manual page 243

Microcomputer mn101c series
Table of Contents

Advertisement

Setup Procedure
(5) Set the period of PWM "H" output.
TM0OC (x'3F52')
(6) Start the timer operation.
TM0MD (x'3F54')
bp3
:TM0EN
TM0BC counts up from x'00'. PWM source waveform outputs "H" till TM0BC reaches the setting
value of the TM0OC register, and outputs "L" after that. Then, TM0BC continues counting up, and
PWM source waveform outputs "H" again, once overflow happens, and TM0BC restarts counting up
from x'00'. TM0IO pin outputs the PWM source waveform with 1 count clock delay.
The initial setting of PWM output is changed from "L" output to "H" output at the selection of
PWM operation by the TMnPWM flag of the TMnMD register.
(5) Set the "H" period of PWM output to the timer
0 compare register (TM0OC).
= x'40'
The setting value is set to 256 / 4 = 64 (x'40'),
because it should be the 1/4 duty of the full
count (256).
At that time, the timer 0 binary counter
(TM0BC) is initialized to x'00'.
(6) Set the TM0EN flag of the TM0MD register to
"1" to operate timer 0.
= 1
Chapter 6 8-bit Timers
Description
8-bit PWM Output
VI - 29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Panaxseries mn101c77cPanaxseries mn101f77g

Table of Contents