Square-Wave Output Operation - NEC 78K0/KD1 Series User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

6.4.5 Square-wave output operation

A square wave with any selected frequency can be output at intervals of the count value preset to 16-bit timer
capture/compare register 000 (CR000).
The TO00 pin output status is reversed at intervals of the count value preset to CR000 by setting bit 0 (TOE00) and
bit 1 (TOC001) of 16-bit timer output control register 00 (TOC00) to 1. This enables a square wave with any selected
frequency to be output.
Figure 6-26. Control Register Settings in Square-Wave Output Mode
TMC00
0
0
CRC00
0
0
OSPT00
OSPE00
TOC00
0
0
Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with square-wave output. For
details, see Figures 6-3 and 6-4.
Count clock
TM00 count value
0000H 0001H 0002H
CR000
INTTM000
TO00 pin output
152
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
(a) 16-bit timer mode control register 00 (TMC00)
TMC003
TMC002
TMC001
0
0
1
1
0
(b) Capture/compare control register 00 (CRC00)
CRC002
CRC001
0
0
0
0/1
0/1
(c) 16-bit timer output control register 00 (TOC00)
TOC004
LVS00
LVR00
TOC001
0
0
0/1
0/1
1
Figure 6-27. Square-Wave Output Operation Timing
N − 1
N
Preliminary User's Manual U16315EJ1V0UD
OVF00
0
Clears and starts on match between TM00 and CR000.
CRC000
0
CR000 used as compare register
TOE00
1
Enables TO00 output.
Inverts output on match between TM00 and CR000.
Specifies initial value of TO00 output F/F.
Does not invert output on match between TM00 and CR010.
Disables one-shot pulse output.
N
0000H 0001H 0002H
N − 1
N
0000H

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents