398
Chapter 10
16-bit Inverter Timer/Counter R
User’s Manual U16580EE3V1UD00
10.10.4 One-shot pulse mode
(1)
Outline of one-shot pulse mode
When, in the one-shot pulse mode, the duty is set to the TRnCCR0 register, the output duty delay
value is set to the TRnCCR1 to TRnCCR5 registers, and bit TRnCE of the TRnCTL0 register is set
to 1, external trigger input (
TTRGR1 pin of TMR1
) wait results, with the counter remaining stopped
at FFFFH. Upon detection of the valid edge of external trigger input (
TTRGR1 pin of TMR1
), or
when bit TRnEST of the TRnCTL0 register is set to 1, count up starts. The TORn1 to TORn5 pins
become high level upon a match between the counter and TRnCCR1 to TRnCCR5 registers.
Moreover, upon a match between the counter and TRnCCR0 register, the TORn1 to TORn5 pins
become low level, and the counter is cleared to 0000H and then stops. The TORn0 pin performs
toggle output during the count operation upon a match between the counter and the TRnCCR0
buffer register. Moreover, upon a match between the counter and TRnCCR0 register during count
operation, a compare match interrupt (INTTRnCC0) is output, and upon a match between the
counter and TRnCCR1 to TRnCCR5 buffer registers, compare match interrupts (INTTRnCC1 to
INTTRnCCR5) are output.
The TRnCCR0 and TRnCCR1 registers can be rewritten using the anytime write method,
regardless of the value of bit TRnCE.
Even a trigger is input during the counter operation, it is ignored. Be sure to input the second
trigger when the counter is stopped at 0000H.
In the one-shot pulse mode, registers TRnCCR0 to TRnCCR3 have their function fixed as
compare registers, so the capture function cannot be used.
[One-shot pulse operation flow]
<1> TRnCTL1 register bits TRnMD3 to TRnMD0 = 0011B (One-shot pulse mode)
<2> TRnCCR0 register setting (duty setting), TRnIOC0 register bit TRnOE1 = 1
(TORn1 pin output enable)
<3> TRnCTL0 register bit TRnCE = 1 (counter operation enable):TORn1 = Low-level output
<4> TRnCTL1 register bit TRnEST = 1 or TTRGR1 pin edge detection
of TMR1
(count-up start):
TORn1 = Low-level output
<5> Match between counter value and TRnCCR1 buffer register: TORn1 = High-level output
<6> Match between counter value and TRnCCR0 buffer register:TORn1 = Low-level output,
count clear
<7> Count stop: TORn1 = Low-level output
<8> TRnCE = 0 (operation reset)
<9> <1> to <2> can be in any order.
Caution:
In the one-shot pulse mode, set bit TRnEEE of the TRnCTL1 register to 0.
Содержание V850E/PH2
Страница 6: ...6 Preface User s Manual U16580EE3V1UD00...
Страница 16: ...16 User s Manual U16580EE3V1UD00...
Страница 28: ...28 User s Manual U16580EE3V1UD00...
Страница 32: ...32 User s Manual U16580EE3V1UD00...
Страница 84: ...84 Chapter 2 Pin Functions User s Manual U16580EE3V1UD00 MEMO...
Страница 144: ...144 Chapter 3 CPU Functions User s Manual U16580EE3V1UD00 MEMO...
Страница 192: ...192 Chapter 5 Memory Access Control Function PD70F3187 only User s Manual U16580EE3V1UD00 MEMO...
Страница 312: ...312 Chapter 9 16 Bit Timer Event Counter P User s Manual U16580EE3V1UD00 MEMO...
Страница 534: ...534 Chapter 11 16 bit Timer Event Counter T User s Manual U16580EE3V1UD00...
Страница 969: ...969 Chapter 20 Port Functions User s Manual U16580EE3V1UD00 MEMO...
Страница 970: ...970 Chapter 20 Port Functions User s Manual U16580EE3V1UD00...
Страница 976: ...976 Chapter 22 Internal RAM Parity Check Function User s Manual U16580EE3V1UD00 MEMO...
Страница 984: ...984 Chapter 23 On Chip Debug Function OCD User s Manual U16580EE3V1UD00 MEMO...
Страница 1006: ...1006 Chapter 24 Flash Memory User s Manual U16580EE3V1UD00 MEMO...
Страница 1036: ...1036 Chapter 27 Recommended Soldering Conditions User s Manual U16580EE3V1UD00 MEMO...
Страница 1046: ...1046 Appendix A Index User s Manual U16580EE3V1UD00 MEMO...
Страница 1052: ...1052 User s Manual U16580EE3V1UD00...
Страница 1053: ......