Renesas MN4 Manuel d'utilisateur Page 9

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 57
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 8
V850E2/MN4 Timer Array Unit Control
R01AN0922EJ0100 Rev.1.00 Page 9 of 54
Jan 13, 2012
4.3 Details of TAUJ Setup
In this sample program, the TAUJ0 is set to independent channel operation and signal width measurement function.
Channel 0 is set to capture & one count mode. The TAUJ0TTIN0 pin is used to measure the input signal width (HIGH).
The counter is enabled by setting the channel trigger bit TAUJ0TS.TAUJ0TS0 to 1. Then, bit TAUJ0TE.TAUJ0TE0 is
set to 1 and counting is enabled. When a valid start edge of TAUJ0TTIN0 is detected, the TAUJ0CNT0 counter starts
counting up from 00000000H. When a valid stop edge of TAUJ0TTIN0 is detected, the value of TAUJ0CNT0 is
captured and transferred to TAUJ0CDR0 and then interrupt INTTAUJ0I0 is generated. The counter retains its value and
await the next valid start edge of TAUJ0TTIN0.
If the counter reaches FFFFFFFFH before a valid stop edge of TAUJ0TTIN0 is detected, it overflows. The counter is
reset to 00000000H and then continues to operate. The values transferred to TAUJ0CDR0 and
TAUJ0CSR0.TAUJ0OVF respectively depend on the values of bits TAUJ0CMOR0.TAUJ0COS[1:0]. See
“V850E2/MN4 Hardware User Manual: Renesas MCU V850E2/Mx4 microcontrollers (R01UH0011EJ)” for details.
TAUJ0TTIN0 input signal width = count clock cycle × [(TAUJ0CSR0.TAUJ0OVF ×(FFFFFFFFH + 1)) +
TAUJ0CDR0 capture value + 1]
TAUJnTTINm
CK3-0
TAU UnTS.TAUUnTSm
INTTAUJ nIm
Capture & one
count mode
Count
clock
Start &
capture
trigger
INT
TAU UnCNT m
TAU UnCDR m
TAUUnTRO.
TAAUnTROm
TAU Un T RO .
TAAUnTROm
Cl o ck s el e ct orTrigger selector
Edge
selec tor
Sim ultaneou s
rewrite trigger
from upper
channel
Tr igge r fr om up per chann el
Start trigger from master
INT num ber fro m ma ster
INT numberfrom
upper channel
Trigger from lower channel
Figure 4.5 Block Diagram for Input Signal Width Measurement Function
TAUJnTS.TAUJnTSm
TA U JnTE .TA UJnTE m
TAU J nTT INm
TAUJnCNTm
TA U JnCDR m
FFFF FFFFH
0000 0000H
0000 0000H
INTTAUJnIm
TAUJnCSRm.TAUJnOVF
a
bc
a
bc
Figure 4.6 General Timing Diagram for Input Signal Width Measurement Function
For specific mode setup, see “V850E2/MN4 Hardware User Manual: Renesas MCU V850E2/Mx4 microcontrollers
(R01UH0011EJ).”
Vue de la page 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 56 57

Commentaires sur ces manuels

Pas de commentaire