UPD78F0138 NEC, UPD78F0138 Datasheet - Page 166

no-image

UPD78F0138

Manufacturer Part Number
UPD78F0138
Description
(UPD78xxxx) 8-Bit Single-Chip Microcontrollers
Manufacturer
NEC
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
UPD78F0138M1GK-9ET
Manufacturer:
NEC
Quantity:
115
Part Number:
UPD78F0138M5GB
Manufacturer:
NEC
Quantity:
20 000
6.4.3 Pulse width measurement operations
counter 0n (TM0n).
restarting the timer in synchronization with the edge of the signal input to the TI00n pin.
the necessary pulse width. Clear the overflow flag after checking it.
prescaler mode register 0n (PRM0n) and the valid level of the TI00n or TI01n pin is detected twice, thus eliminating
noise with a short pulse width.
166
It is possible to measure the pulse width of the signals input to the TI00n pin and TI01n pin using 16-bit timer
There are two measurement methods: measuring with TM0n used in free-running mode, and measuring by
When an interrupt occurs, read the valid value of the capture register, check the overflow flag, and then calculate
The capture operation is not performed until the signal pulse width is sampled in the count clock cycle selected by
The basic operation setting procedure is as follows.
<1> Set the CRC0n register (see Figures 6-22, 6-25, 6-27, and 6-29 for the set value).
<2> Set the count clock by using the PRM0n register.
<3> Set the TMC0n register to start the operation (see Figures 6-22, 6-25, 6-27, and 6-29 for the set value).
Caution To use two capture registers, set the TI00n and TI01n pins.
Remarks 1. For the setting of the TI00n (or TI01n) pin, see 6.3 (5) Port mode register 0 (PM0).
Setting
Rising edge detection
2. For how to enable the INTTM00n (or INTTM01n) interrupt, see CHAPTER 17
3. n = 0:
FUNCTIONS.
n = 0, 1:
Count clock
INTTM01n
Figure 6-21. CR01n Capture Operation with Rising Edge Specified
CR01n
TM0n
TI00n
µ
µ
PD780131, 780132
PD780133, 780134, 78F0134, 780136, 780138, 78F0138
CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
N
3
User’s Manual U16228EJ2V0UD
N
2
N
1
N
N
N + 1
INTERRUPT

Related parts for UPD78F0138