Panasonic F77G User Manual page 286

Microcomputer mn101c series
Table of Contents

Advertisement

Chapter 7 16-bit Timer
Setup Procedure
(5)
Select the count clock source.
TM7MD1 (x'3F78')
bp1-0
bp3-2
(6)
Set "H" period of the PWM output.
TM7PR1 (x'3F75', x'3F74')=x'4000'
(7)
Start the timer operation.
TM7MD1 (x'3F78')
bp4
TM7BC counts up from x'0000'. The PWM source waveform outputs "H" until TM7BC reaches the
set value of the TM7OC1 register, then, after the match it outputs "L". After that, TM7BC continues
to count up, once overflow happens, the PWM source waveform outputs "H" again, and TM7BC
counts up from x'0000', again. TM7IO pin outputs one count clock delay of the PWM source wave-
form.
In the initial state of the PWM output, it is changed to "H" output from "L" output as the PWM
operation is selected by the TM7PWM flag of the TM7MD2 register.
Write to preset register should be done while timer is stopped or within timer interrupt pro-
cessing.
And use MOVW instruction for write to preset register.
VII - 26
16-bit Standard PWM Output
: TM7CK1-0 = 00
: TM7PS1-0 = 00
: TM7EN
= 1
Description
(5) Select fosc at clock source by the TM7CK1-0
flag of the TM7MD1 register. Also, select 1/1
frequency (no division) at count clock source
by the TM7PS1-0 flag.
(6) Set "H" period of the PWM output to the timer 7
preset register 1 (TM7PR1). To be a 1/4 duty
of the full count (65536), set as follows ;
65536 / 4 = 16384 (x'4000')
At that time, the same value is loaded to the
timer 7 compare register 1 (TM7OC1) and the
timer 7 binary counter (TM7BC) is initialized to
x'0000'.
(7) Set the TM7EN flag of the TM7MD1 register to
"1" to start timer 7.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Panaxseries mn101c77cPanaxseries mn101f77g

Table of Contents