NEC V854 UPD703006 User Manual page 199

32/16-bit single-chip microcontroller hardware
Table of Contents

Advertisement

CHAPTER 7 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
Figure 7-28. Example of PWM Output Programming Procedure
PWM output initial setting
Setting of TOC1n register
TOCn. ENTO0n ← 1
TOCn. ALV0n ← 1
Setting of TMC01 register
TMC01. CMS00 ← 1
TMC01. CMS01 ← 1
Specifies P00 pin as timer
output pin TO00 by PMC0 register
PMC0. PMC00 ← 1
Setting of TMC00 register
Sets count value to CC00 register
CC00 ← D00
Sets count value to CC01 register
CC01 ← D10
Count starts
TMC00. CE0 ← 1
Enables interrupt
Remark n = 0 and 1
; Specifies active level (high level)
Enables timer ouput
; Specifies operation of CC00 and CC01 registers
(specifies compare operation)
; Specifies count clock of TM0
; Sets CE0 bit to 1
INTCC00 interrupt
INTCC01 interrupt
User's Manual U11969EJ3V0UM00
199

Advertisement

Table of Contents
loading

Table of Contents