Renesas M16C FAMILY series Hardware Manual page 314

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY series:
Table of Contents

Advertisement

M
1
6
C
2 /
8
G
o r
u
p
(
M
1
6
C
Example of INT5 Digital Debounce Function (if P17DDR = "03
Digital Debounce Filter
f
Clock
8
P1
Port In
7
Data Bus
Reload Value
f
8
Reload Value
Port In
Signal Out
Count Value
1
Reload Value
(continued)
Port In
(continued)
Signal Out
(continued)
Count Value
FF
(continued)
1. (Condition after reset). P17DDR=FF
2. Set the P17DDR register to "03
and the signal output level (e.g.,"H") are not matched.
3. The P17DDR register will stops counting when the pin input level and the signal output level are matched (e.g., both levels are "H") while
counting.
4. If the pin input level (e.g.,"L") and the signal output level (e.g.,"H") are not matched the P17DDR register will start decrement again after the
setting value is reloaded.
5. When the P17DDR register is underflow, it stops counting and the signal output will output the same as pin input level (e.g."L").
6. If the pin input level (e.g.,"H") and the signal output level (e.g., "L") are not matched again, the P17DDR register will start decrement again
after the setting value is reloaded.
7. When the P17DDR register is underflow, it stops counting and the signal output will output the same as pin input level (e.g."H").
8. If the pin input level (e.g.,"H") and the signal output level (e.g., "L") are not matched again, the P17DDR register will start decrement again
after the setting value is reloaded.
9. Set the P17DDR register to "FF
directly.
Figure 17.12 Digital Debounce Filter
R
e
. v
2
0 .
0
J
a
. n
3
, 1
2
0
0
7
R
E
J
0
9
B
0
0
4
7
0 -
2
0
0
2 /
, 8
M
1
6
C
2 /
8
) B
Signal Out
Count Value
(write)
(read)
FF
03
03
FF
2
03
03
02
01
00
6
. Pin input signal will be output directly.
16
". The P17DDR register starts decrement along the f8 as a counter source, if the pin input level (e.g.,"L")
16
". The P17DDR register starts counting after the setting value is reloaded. Pin input signal will be output
16
page 294
f o
3
8
5
")
16
To INT5
Data Bus
02
01
03
3
4
FF
FF
03
02
FF
8
7
9
17. Programmable I/O Ports
02
01
00
FF
5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tiny seriesM16c series

Table of Contents