Board-dat/IKE/IKE1011-dat/2026-01-18-17-08-05.png
... ...
Binary files /dev/null and b/Board-dat/IKE/IKE1011-dat/2026-01-18-17-08-05.png differ
Board-dat/IKE/IKE1011-dat/IKE1011-dat.md
... ...
@@ -5,10 +5,23 @@
5 5
6 6
[product url - Membrane Button Keypad [Types]](https://www.electrodragon.com/product/4x4-matrix-16-key-membrane-switch-keypad-keyboard-new-for-arduinoavrpicarm/)
7 7
8
+
9
+The 4x4 Keypad is a general purpose 16 button (4x4) matrix keypad. It comes ready to work, simply peel-off the adhesive backing, stick it to your surface
10
+
11
+
12
+
13
+
8 14
### Board Map, Dimension, Pins, chip info, Use Guide, Setup Jumper, etc.
9 15
16
+![](2026-01-18-17-08-05.png)
17
+
18
+
10 19
## Applications, category, tags, etc.
11 20
21
+- [[keypad-dat]]
22
+
23
+
24
+
12 25
## Demo Code and Video
13 26
14 27
## ref
Board-dat/IKE/IKE1020-dat/IKE1020-dat.md
... ...
@@ -0,0 +1,28 @@
1
+
2
+# IKE1020-dat
3
+
4
+## Info
5
+
6
+[product url - 4X4 Mechanical Keypad Board](https://www.electrodragon.com/product/4x4-jtag-interface-keypad-module/)
7
+
8
+### Board Map, Dimension, Pins, chip info, Use Guide, Setup Jumper, etc.
9
+
10
+- [[keypad-dat]]
11
+
12
+
13
+
14
+## Applications, category, tags, etc.
15
+
16
+
17
+## Demo Code and Video
18
+
19
+
20
+
21
+
22
+## ref
23
+
24
+- [[IKE1020]]
25
+
26
+- [legacy wiki page](https://w.electrodragon.com/w/Category:Keypad)
27
+
28
+
Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-07-03.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-07-03.png differ
Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-08-56.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-08-56.png differ
Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-10-12.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-10-12.png differ
Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-11-25.png
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/keypad-dat/2026-01-18-17-11-25.png differ
Tech-dat/interactive-dat/keypad-dat/Key_header.zip
... ...
Binary files /dev/null and b/Tech-dat/interactive-dat/keypad-dat/Key_header.zip differ
Tech-dat/interactive-dat/keypad-dat/keypad-dat.md
... ...
@@ -1,10 +1,67 @@
1 1
2 2
# keypad-dat
3 3
4
+
5
+
6
+## board
7
+
8
+- [[IKE1020-dat]]
9
+
10
+- [[membrane-keyboard-dat]] - [[IKE1011-dat]]
11
+
12
+
13
+## SCH
14
+
15
+single key pad SCH1
16
+
17
+![](2026-01-18-17-07-03.png)
18
+
19
+matrix keypad SCH2
20
+
21
+![](2026-01-18-17-08-56.png)
22
+
23
+This is a simple application of port manipulation using Arduino to paly with the 4*4 button pad. Before read the code, you'd better see the connection diagram first.
24
+
25
+We use four digital ports as HIGH voltage scanning the row of button pad and four analog ports to read the column of button pad connected with four pull-down resistors.
26
+
27
+If button is pressed,the voltage will be HIGH when it is scanned by HIGH voltage concurrently. Otherwise, the voltage is pulled down and will be LOW. Using eight ports totally, we can read 16 buttons.
28
+
29
+SCH3
30
+
31
+![](2026-01-18-17-11-25.png)
32
+
33
+
34
+## wiring
35
+
36
+![](2026-01-18-17-10-12.png)
37
+
38
+
39
+- VCC Row 1, 2, 3, 4
40
+- NC Column 1, 2, 3, 4
41
+
42
+Output high TTL signal when either row or column buttons are pressed.
43
+
44
+
4 45
## design
5 46
6 47
- [[CH552-dat]]
7 48
8 49
50
+## demo code
51
+
52
+- [[keypad-demo-code-1.c]]
53
+
54
+- [[keypad-demo-code-2.ino]]
55
+
56
+- [[Key_header.zip]]
57
+
58
+
59
+
9 60
## ref
10 61
62
+legacy wiki page
63
+
64
+https://w.electrodragon.com/w/Category:Keypad
65
+
66
+
67
+https://w.electrodragon.com/w/Category:Input
... ...
\ No newline at end of file
Tech-dat/interactive-dat/keypad-dat/keypad-demo-code-1.c
... ...
@@ -0,0 +1,145 @@
1
+
2
+#include<reg51.h>
3
+#define uchar unsigned char
4
+#define uint unsigned int
5
+//sbit key1=P3^4;
6
+//sbit key2=P3^5;
7
+//sbit key3=P3^6;
8
+//sbit key4=P3^7;
9
+uchar code table[]={
10
+0x3f,0x06,0x5b,0x4f,
11
+0x66,0x6d,0x7d,0x07,
12
+0x7f,0x6f,0x77,0x7c,
13
+0x39,0x5e,0x79,0x71,
14
+};
15
+uchar num,temp;
16
+void delay (uint z)
17
+{
18
+ uint x,y;
19
+ for(x=z;x>0;x--)
20
+ for(y=110;y>0;y--);
21
+}
22
+void main ()
23
+{
24
+ num=1;
25
+ while(1)
26
+ {
27
+ P3=0xfe;// low TTL on first row
28
+ temp=P3;//扫面P3口的数据,送给temp
29
+ temp=temp&0xf0;//扫描是否有按键按下,如果有则temp的高四位肯定有一位是0.
30
+ while(temp!=0xf0)
31
+ {
32
+ delay(5);//消抖
33
+ temp=P3;//再次读P3口的数据
34
+ temp=temp&0xf0;
35
+ while(temp!=0xf0)
36
+ {
37
+ temp=P3;
38
+ switch(temp)
39
+ {
40
+ case 0xee: num=1;break;
41
+ case 0xde: num=2;break;
42
+ case 0xbe: num=3;break;
43
+ case 0x7e: num=4;break;
44
+ default: break;
45
+ }
46
+ while(temp!=0xf0)
47
+ {
48
+ temp=P3;
49
+ temp=temp&0xf0;
50
+ }
51
+ }
52
+ }
53
+ P1=table[num-1];
54
+
55
+
56
+ P3=0xfd;//将第二行电平拉低
57
+ temp=P3;//扫面P3口的数据,送给temp
58
+ temp=temp&0xf0;//扫描是否有按键按下,如果有则temp的高四位肯定有一位是0.
59
+ while(temp!=0xf0)
60
+ {
61
+ delay(5);//消抖
62
+ temp=P3;//再次读P3口的数据
63
+ temp=temp&0xf0;
64
+ while(temp!=0xf0)
65
+ {
66
+ temp=P3;
67
+ switch(temp)
68
+ {
69
+ case 0xed: num=5;break;
70
+ case 0xdd: num=6;break;
71
+ case 0xbd: num=7;break;
72
+ case 0x7d: num=8;break;
73
+ default: break;
74
+ }
75
+ while(temp!=0xf0)
76
+ {
77
+ temp=P3;
78
+ temp=temp&0xf0;
79
+ }
80
+ }
81
+ }
82
+ P1=table[num-1];
83
+
84
+
85
+
86
+ P3=0xfb;//将第三行电平拉低
87
+ temp=P3;//扫面P3口的数据,送给temp
88
+ temp=temp&0xf0;//扫描是否有按键按下,如果有则temp的高四位肯定有一位是0.
89
+ while(temp!=0xf0)
90
+ {
91
+ delay(5);//消抖
92
+ temp=P3;//再次读P3口的数据
93
+ temp=temp&0xf0;
94
+ while(temp!=0xf0)
95
+ {
96
+ temp=P3;
97
+ switch(temp)
98
+ {
99
+ case 0xeb: num=9;break;
100
+ case 0xdb: num=10;break;
101
+ case 0xbb: num=11;break;
102
+ case 0x7b: num=12;break;
103
+ default: break;
104
+ }
105
+ while(temp!=0xf0)
106
+ {
107
+ temp=P3;
108
+ temp=temp&0xf0;
109
+ }
110
+ }
111
+ }
112
+ P1=table[num-1];
113
+
114
+
115
+ P3=0xf7;//将第四行电平拉低
116
+ temp=P3;//扫面P3口的数据,送给temp
117
+ temp=temp&0xf0;//扫描是否有按键按下,如果有则temp的高四位肯定有一位是0.
118
+ while(temp!=0xf0)
119
+ {
120
+ delay(5);//消抖
121
+ temp=P3;//再次读P3口的数据
122
+ temp=temp&0xf0;
123
+ while(temp!=0xf0)
124
+ {
125
+ temp=P3;
126
+ switch(temp)
127
+ {
128
+ case 0xe7: num=13;break;
129
+ case 0xd7: num=14;break;
130
+ case 0xb7: num=15;break;
131
+ case 0x77: num=16;break;
132
+ default: break;
133
+ }
134
+ while(temp!=0xf0)
135
+ {
136
+ temp=P3;
137
+ temp=temp&0xf0;
138
+ }
139
+ }
140
+ }
141
+ P1=table[num-1];
142
+
143
+ }
144
+}
145
+
Tech-dat/interactive-dat/keypad-dat/keypad-demo-code-2.ino
... ...
@@ -0,0 +1,40 @@
1
+
2
+<syntaxhighlight lang="Arduino">
3
+/* @file CustomKeypad.pde
4
+|| @version 1.0
5
+|| @author Alexander Brevig
6
+|| @contact [email protected]
7
+||
8
+|| @description
9
+|| | Demonstrates changing the keypad size and key values.
10
+|| #
11
+*/
12
+#include <Keypad.h>
13
+
14
+const byte ROWS = 4; //four rows
15
+const byte COLS = 4; //four columns
16
+//define the cymbols on the buttons of the keypads
17
+char hexaKeys[ROWS][COLS] = {
18
+ {'0','1','2','3'},
19
+ {'4','5','6','7'},
20
+ {'8','9','A','B'},
21
+ {'C','D','E','F'}
22
+};
23
+byte rowPins[ROWS] = {7, 6, 5, 4}; //connect to the row pinouts of the keypad
24
+byte colPins[COLS] = {11, 10, 9, 8}; //connect to the column pinouts of the keypad
25
+
26
+//initialize an instance of class NewKeypad
27
+Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
28
+
29
+void setup(){
30
+ Serial.begin(9600);
31
+}
32
+
33
+void loop(){
34
+ char customKey = customKeypad.getKey();
35
+
36
+ if (customKey){
37
+ Serial.println(customKey);
38
+ }
39
+}
40
+