187
CHAPTER 7 8-BIT TIMERS A0, B0
User’s Manual U15798EJ2V0UD
7.5 8-Bit Timer A0, B0 Cautions
(1) Error on starting timer
An error of up to 1 clock is included in the time between the timer being started and a match signal being generated.
This is because 8-bit timer counter n0 (TMn0) is started asynchronously to the count pulse.
Figure 7-24. Start Timing of 8-Bit Timer Counter
Remark
n = A, B
(2) Setting of 8-bit compare register n0
8-bit compare register n0 (CRn0) can be set to 00H.
Therefore, one pulse can be counted.
Figure 7-25. Timing of 1-Pulse Count Operation (8-Bit Resolution)
Count pulse
CRn0
00H
TMn0
count value
00H
00H
00H
00H
INTTMn0
Remark
n = A, B
(3) Count value if timer is started when TMIB0 pin is high
When an external clock input from the TMIB0 pin is selected as the count clock, the count value starts from 01H
if the timer is enabled (TCEB0 = 0
→
1) while the TMIB0 pin is high. This is because the signal input from the
TMIB0 pin is internally ANDed with the TCEB0 signal, and therefore the rising edge is input to the timer
immediately after TCEB0 has been set and the counter is incremented. Either use the timer recognizing that
the count is the count value + 1, or start the timer while the TMIB0 pin is low.
Count pulse
TMn0
count value
00H
01H
02H
03H
04H
Timer start
TCEB0 flag
TMIB0
H
Rising edge
detector
Counter
Increment
Содержание mPD780344 Series
Страница 2: ...2 User s Manual U15798EJ2V0UD MEMO...