Panasonic MN103S User Manual page 298

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Chapter 9
16-bit Timer
(8) Select the timer B pin polarity
TM8MDB(0x0000A205)
bp5: TMBEG=0
(9) Select the timer B output waveform
TM8MDB(0x0000A205)
bp1-0: TMB1-0=00
(10) Initialize the timer 8
TM8MD(0x0000A200)
bp6: TMLDE=1
(11) Set the output pin (pin function)
P3MD(0x0000A033)
bp7: P37M=1
(12) Set the output pin (I/O function)
P3DIR(0x0000A023)
bp7: P37D=1
(13) Start the timer operation
TM8MD(0x0000A200)
bp7: TMCNE=1
TM8BC counter counts up. When the TM8BC counter and the TM8CB register match, the output pin (TM8BIO)
is set to "H" at the rising edge of the next count clock. When the TM8BC counter and the TM8CA register match,
the output pin (TM8BIO) is set to "L" at the rising edge of the next count clock. The value of the TM8BC counter
is initialized to 0x0000 and counting up restarts.
IX - 62
PWM Output
Setup Procedure
(8) Set the TMBEG flag of the TM8MDB register to "0" to set
the initial condition of pin output to "L". Set it to "1"
when the initial condition of the pin output is set to "H".
(9) Set the timer B output waveform selection when the
TMBC and TMCB match and reset when the TMBC
and TMCA match by the TMB01-0 flag of the TM8MDB
register.
(10) Set the TMLDE flag of the TM8MD register to "1" to
initialize the timer 8. The value of the compare register
A buffer is loaded into the TM8CA register, and the
value of the compare register B buffer is loaded into the
TM8CB register. Reset the TMLDE flag to "0" after
setting.
(11) Set the P37M flag of the port 3 output mode register
(P3MD) to "1" to set the port to pin function.
(12) Set the P37D flag of the port 3 I/O control register
(P3DIR) to "1" to set the I/O control to the output pin.
(13) Set the TMCNE flag of the TM8MD register to "1" to
operate the timer 8.
Description

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents