User manual

V850E2/MN4 Timer Array Unit Control
R01AN0922EJ0100 Rev.1.00 Page 2 of 54
Jan 13, 2012
1. Overview
This application note illustrates the usage examples of the 16-bit TAUA (timer array unit A) and 32-bit TAUJ (timer
array unit J).
In the TAUA, channel 0 is set as a master channel, channel 1 is set as a slave channel, and the PWM signal is output
from the TAUA1TTOUT1 pin in synchronous channel operation. In the TAUJ, the TAUJ0 is set to independent channel
operation, the PWM signal output from the TAUA is input to the TAUJ0TTIN0 pin, and the signal width is measured.
See section 4 for the details of the individual operations.
T AUAn TTO UT m
INTTAUAnIm
T AUAn TTO UT m
INTTAUAnIm
TA U A nT S . T A UA n TS m
CK3 to CK0
CK3 to Ck0
TAUAnTTINm
TAU AnTS.TA UAnTSm
TAUAn TTI Nm
Master
Salve
TA UA nTRO
TA UA nTROm
TA UA nTRO
TA UA nTROm
TAUAnTRO
TAUAnTROm
Count
clo ck
S im ul t an e o us r e wr i t e
trigger from upper
channel
St ar t tr i g g er fr o m ma st er
Count
clock
Slave:
On e co unt mode
Master:
Interval timer mode
Trigger from upper channel
Trigger f rom lower cha nnel
St ar t tr i g g er fr o m m a st er
I NT f rom master
INT from upper channel
INT
INT
TAUAnTO.
TAUA nTOm
TAUAnCNTm
TAUAnC DR m
TAUAnC DR m
TAUJnTTINm
CK3 to CK0
TAU UnT S . TA UU nTSm
INTTAUJnIm
TAUUnTTOUTm
Ca ptu re & one
count mode
Count
clock
Start &
capt ure
tr igger
INT
TA U U n CN T m
TA U U n CD R m
TAUUnTRO.
TAAU nTR Om
TAUUnTRO .
TAAUnTROm
C loc k se le ct o rTrigger sele c to r
Edge
se lect or
Edg e
selector
Clock selector
Star t &
capture
tr igge r
Start &
ca pt ur e
tr ig ger
Edg e
selector
Trigger from upperchannel
Trigger from lower channel
INT fr o m ma st er
INT from upper channel
Simultaneous
rewrite trigger
from upper
ch an ne l
Trigger from upper channel
Start trigger from master
INT number f rom ma ster
INT numberfrom
upper channel
Trigger from lower channel
Clock selectorTrigger select orTrigger sel ector
TAUAnCNTm
Figure 1.1 TAU Block Diagram
1.1 Initialization
The general registers and functional pins are initialized.
<Port setup>
Port n function control expansion registers (PFCEn)
Port n function control registers (PFCn)
Port n mode control registers (PMCn)
Port n mode registers (PMn)
1.2 TAUA Setup
The TAUA is set to synchronous channel operation and PWM signal output function. Channel 0 in the TAUA1 is set as
a master channel and set to interval timer mode. Channel 1 in the TAUA1 is set as a slave channel and set to one count
mode. See section 4.2 for details.
1.3 TAUJ Setup
The TAUJ is set to independent channel operation and signal width measurement function. Channel 0 in the TAUJ0 is
set to capture & one count mode. See section 4.3 for details.
TAUA1
TAUJ0