ECE 447 Lecture 1012 Keypads ECE 447 Matrix
- Slides: 42
ECE 447: Lecture 1012 Keypads
ECE 447: Matrix Keypad
ECE 447: Matrix Keypad Microcontroller Interface
ECE 447: Matrix Keypad - Scanning 1 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 1 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 0 1 1 1
Matrix Keypad ECE 447: Matrix- Scanning Keypad - Scanning 1 0 1 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 1 1 0 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 1 1 1 0
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning PC 0 PC 1 PC 2 PC 3 PC 4 PC 5 PC 6
ECE 447: Matrix Key Codes outputs 11110000 F 0 inputs
ECE 447: Key Scanning Function while (1) { do ( PORTC = "XXXX 0000" while ( PORTC = "X 111 XXXX"); } Wait until any key pressed c=decode_key(); . . . do something dependent on the key being pressed. . . Decode the key being pressed PORTC = "XXXX 0000" while (PORTC != "X 111 XXXX") /* do nothing */ Wait until all keys released
ECE 447: Key Scanning Function int decode_key() { PORTC = "XXXX 1110" if ( PORTC != "X 111 XXXX”) return decode_output (PORTC, 1) else { PORTC = "XXXX 1101" if ( PORTC != "X 111 XXXX") return decode_output(PORTC, 2) } else { PORTC = "XXXX 1011" if ( PORTC != "X 111 XXXX") return decode_output (PORTC, 3) } else { PORTC = "XXXX 0111" if ( PORTC != "X 111 XXXX") return decode_output (PORTC, 4) else return NONE_KEY_PRESSED; } check Row 1 check Row 2 check Row 3 check Row 4
Possible Key Decoding Procedure (3) ECE 447: Key Scanning Function Decoding a column XCCCXXXX • Three bits of interest • Three combinations valid (“ 110”, “ 101”, “ 011”) • Decoding column possible
ECE 447: Matrix Key Codes 11110000 F 0 inputs
ECE 447: Matrix Key Codes 11110000 outputs F 0
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 0 0 outputs 0 0 1 inputs 1 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 0 0 outputs 0 0 1 inputs 1 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 0 0 outputs 0 0 1 inputs 1 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 0 0 outputs 0 0 1 inputs 0 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 1 1 outputs 1 0 1 inputs 0 1
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 1 1 outputs 1 0 1 inputs 0 1
ECE 447: Keypad Matrix - Scanning 1 1 outputs 0 1 1 inputs 1 0
Keypad - Scanning ECEMatrix 447: Matrix Keypad - Scanning 1 1 outputs 0 1 1 inputs 1 0
Simplified Procedure (4) – ECE 447: Key. Decoding Scanning Function Alternative decode_key() { unsigned char keys = [NONE, TWO, …, TWELVE]; for (i=0, i<=12, i++) { PORTC = keys[i] if (PORTC == keys[i] return i; } return UNKNOWN; }
ECE 447: Matrix Key Codes ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN ELEVEN TWELVE NONE 11110000 F 0
ECE 447: Key Scanning Function – No Debounce while (1) { do ( PORTC = "XXXX 0000" while ( PORTC = "X 111 XXXX"); } Wait until any key pressed c=decode_key(); . . . do something dependent on the key being pressed. . . Decode the key being pressed PORTC = "XXXX 0000" while (PORTC != "X 111 XXXX") /* do nothing */ Wait until all keys released
Key Bouncing ECE 447: Key Bounce key bounce, t. BOUNCE typically, t. BOUNCE < 10 ms
Keypad Bouncing ECE 447: Key Bounce key bounce, t. BOUNCE typically, t. BOUNCE < 10 ms NONE
Keypad in Software ECE 447: Debouncing Key Bounce key bounce, t. BOUNCE typically, t. BOUNCE < 10 ms wait debouncing period wait until any key pressed NONE decode_key; action dependent on the key wait until all keys released NONE wait debouncing period wait until any key pressed
ECE 447: Key Scanning Function – Key Decoding Procedure (7) with Debounce while (1) { while (key_decode() == NONE) /* do nothing */ ; wait debouncing period(); c=decode_key(); . . . do something dependent on the key being pressed. . . while(key_decode()!=NONE) /* do nothing */ ; wait debouncing period(); } Wait until any key pressed Decode the key being pressed Wait until all keys released
2 out 2 ofof 7 Keypad ECE 447: 7 Keypad C
ECE 447: 2 of 7 Keypad Microcontroller Interface
ECE 447: 2 of 7 Keypad Scanning 0 C
2 out of 2 7 Keypad - Scanning ECE 447: of 7 Keypad Scanning 1 1 1 0 1 0 C
ECE 447: 2 of 7 Keypad Scanning Function decode_key() { unsigned char keys = [NONE, TWO, …, TWELVE]; for (i=0, i<=12, i++) { PORTC = keys[i] if (PORTC == keys[i] return i; } return UNKNOWN; }
ECE 447: 2 of 7 Key Codes ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN ELEVEN TWELVE NONE
ECE 447: 2 of 7 Keypad Microcontroller Interface
ECE 447: 2 of 7 Keypad Scanning Function (Simplified) decode_key() { unsigned char keys = [NONE, TWO, …, TWELVE]; code = PORTC for (i=0, i<=12, i++) { if (code == keys[i] return i; } return UNKNOWN; }
ECE 447: 2 of 7 Keypad Scanning Function while (1) { while (decode_key() == NONE) /* do nothing */ ; wait debouncing period(); c=decode_key(); . . . do something dependent on the key being pressed. . . while(decode_key()!=NONE) /* do nothing */ ; wait debouncing period(); } Wait until any key pressed Decode the key being pressed Wait until all keys released
ECE 447: 2 of 7 Keypad Hardware Key Debouncing Debounce in Hardware
ECE 447: 2 of 7 Keypad Hardware Key Debouncing Debounce in Hardware Capacitors associated with all pull-up resistors
- Canbus keypad market
- Interactive touch screen presentation software
- 1012 angel
- Pembagian bilangan oktal
- Uhmt 1012
- Ch 1012
- 1012
- 01:640:244 lecture notes - lecture 15: plat, idah, farad
- Jatiya kabi kazi nazrul islam university logo
- What is z?
- No poder de cristo mestre
- 649 un en yakın yüzlüğü
- 18-447
- 3 fázisú mérőhely kialakítása
- Who ordered the parthenon to be built
- Fces
- Ece 453
- Prime factorization of 447
- Cs 447
- Direct stiffness method truss
- Territorial matrix vs interterritorial matrix
- Filetype:pdf
- Rectangular matrix
- Orthogonal matrix determinant
- Blood type matrix
- Matrix multiplied by its transpose
- Dissimilarity matrix in data mining
- Symmetric matrix multiplication
- Example of an orthogonal matrix
- Lecture title
- Abstract example for report
- Cmu cloud computing
- Les quatre dimensions de la lecture
- Lecture about seasons
- Roi yehoshua
- If the lexical analyzer finds a token invalid then?
- Slidetodoc
- Physics 101 lecture notes pdf
- Lecture 101
- Natural language processing lecture notes
- Stern-gerlach experiment lecture notes
- Requirement analysis in software engineering notes
- Patella lecture