UPD78F0138 NEC, UPD78F0138 Datasheet - Page 177
![no-image](/images/manufacturer_photos/0/4/470/nec_sml.jpg)
UPD78F0138
Manufacturer Part Number
UPD78F0138
Description
(UPD78xxxx) 8-Bit Single-Chip Microcontrollers
Manufacturer
NEC
Datasheet
1.UPD78F0138.pdf
(558 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
UPD78F0138M1GK-9ET
Manufacturer:
NEC
Quantity:
115
Part Number:
UPD78F0138M5GB
Manufacturer:
NEC
Quantity:
20 000
- Current page: 177 of 558
- Download datasheet (5Mb)
6.4.5 Square-wave output operation
bit timer capture/compare register 00n (CR00n).
bit 0 (TOE0n) and bit 1 (TOC0n1) of 16-bit timer output control register 0n (TOC0n) to 1. This enables a square wave
with any selected frequency to be output.
The basic operation setting procedure is as follows.
<1> Set the count clock by using the PRM0n register.
<2> Set the CRC0n register (see Figure 6-34 for the set value).
<3> Set the TOC0n register (see Figure 6-34 for the set value).
<4> Set any value to the CR00n register (0000H cannot be set).
<5> Set the TMC0n register to start the operation (see Figure 6-34 for the set value).
Caution CR00n cannot be rewritten during TM0n operation.
Remarks 1. For the setting of the TO0n pin, see 6.3 (5) Port mode register 0 (PM0).
A square wave with any selected frequency can be output at intervals determined by the count value preset to 16-
The TO0n pin output status is reversed at intervals determined by the count value preset to CR00n + 1 by setting
TMC0n
CRC0n
Setting
7
0
7
0
2. For how to enable the INTTM00n interrupt, see CHAPTER 17 INTERRUPT FUNCTIONS.
6
0
6
0
Figure 6-34. Control Register Settings in Square-Wave Output Mode (1/2)
5
0
5
0
CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
4
0
4
0
(a) 16-bit timer mode control register 0n (TMC0n)
(b) Capture/compare control register 0n (CRC0n)
TMC0n3
1
3
0
TMC0n2
CRC0n2
0/1
1
User’s Manual U16228EJ2V0UD
TMC0n1
CRC0n1
0/1
0
CRC0n0
OVF0n
0
0
Clears and starts on match between TM0n and CR00n.
CR00n used as compare register
177
Related parts for UPD78F0138
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![UPD78F1154GK-GAK-AX](/photos/19/3/190351/ge80lqfp05-40_tmb.jpg)
Part Number:
Description:
16BIT MCU, 128K FLASH, 8K RAM, SMD
Manufacturer:
NEC
Datasheet:
![UPD78F0413GA-GAM-AX](/photos/19/0/190032/ge48lqfp05-40_tmb.jpg)
Part Number:
Description:
8BIT UC, 32K FLASH, 1KB RAM, LCD
Manufacturer:
NEC
Datasheet:
![UPD78F0886GA(A)-GAM-AX](/photos/19/0/190032/ge48lqfp05-40_tmb.jpg)
Part Number:
Description:
8BIT MCU, 60K FLASH, 3KB RAM, CAN
Manufacturer:
NEC
Datasheet:
![UPD78F0890GK(A)-GAJ-AX](/photos/19/1/190186/ge64lqfp05-40_tmb.jpg)
Part Number:
Description:
8BIT MCU, 128K FLASH, 7K RAM, LQFP
Manufacturer:
NEC
Datasheet:
![UPD78F9502MA-CAC-A](/photos/19/7/190713/ge10ssop05-40_tmb.jpg)
Part Number:
Description:
8BIT MCU, 4K FLASH, 128B RAM, SMD
Manufacturer:
NEC
Datasheet:
![UPD70325L-8](/images/manufacturer_photos/0/4/470/nec_tmb.jpg)
Part Number:
Description:
16/8 bit single-chip microcomputer
Manufacturer:
NEC
Datasheet:
![UPC1316C](/images/manufacturer_photos/0/4/470/nec_tmb.jpg)
Part Number:
Description:
Dual audio power amp circuit
Manufacturer:
NEC
Datasheet:
![UPC393C](/images/manufacturer_photos/0/4/470/nec_tmb.jpg)
Part Number:
Description:
Dual comparator
Manufacturer:
NEC
Datasheet:
![UPA572T](/images/manufacturer_photos/0/4/470/nec_tmb.jpg)
Part Number:
Description:
MOS type composite field effect transistor
Manufacturer:
NEC
Datasheet: