
Rev.2.10 Apr 14, 2006 page 121 of 378
REJ09B0124-0210
M16C/6N Group (M16C/6NK, M16C/6NM) 13. Timers
Figure 13.8 Registers TA0MR to TA4MR in Event Counter Mode (when not using two-phase pulse
signal processing)
Symbol Address After Reset
TA0MR to TA4MR 0396h to 039Ah 00h
b7 b6 b5 b4 b3 b2 b1 b0
Operating mode select bits
0 1 : Event counter mode
(1)
b1 b0
TMOD0
MR0
Pulse output function
select bit
0 : Pulse is not output
(TAiOUT pin functions as I/O port)
1 : Pulse is output
(TAiOUT pin functions as pulse output pin)
Count polarity select bit
(2)
MR2
MR1
MR3
Set to 0 in event counter mode
TCK0
Count operation type
select bit
010
0 : Counts falling edge of external signal
1 : Counts rising edge of external signal
Up/down switching
source select bit
0 : UDF register
1 : Input signal to TAiOUT pin
(3)
0 : Reload type
1 : Free-run type
Bit Symbol Bit Name Function RW
TCK1
Can be 0 or 1 when not using two-phase pulse signal processing.
TMOD1
Timer Ai Mode Register (i = 0 to 4)
(When not using two-phase pulse signal processing)
RW
RW
RW
RW
RW
RW
RW
RW
NOTES:
1.During event counter mode, the count source can be selected using registers ONSF and TRGSR.
2.Effective when bits TAiTGH and TAiTGL in the ONSF or TRGSR register are 00b (TAiIN pin input).
3. Count down when input on TAiOUT pin is low or count up when input on that pin is high. The port direction
bit for TAiOUT pin is set to 0 (input mode).
Kommentare zu diesen Handbüchern