Documente Academic
Documente Profesional
Documente Cultură
Objectives
Explain the basic operation of a keypad. Describe the key press and detection mechanisms. Interface a keypad to the PIC18F4550 microcontroller.
Keypad Interfacing
Keypad or keyboards are the most widely used I/O devices. Most of microcontroller applications require a keypad for users to enter numbers and commands. A matrix keypad provides a simple data entry device for microcontroller systems.
Basic Operation
Organized in a matrix of rows and columns. Consists of an array of momentary pushbuttons switch or key. There are 4 column lines and 4 row lines. Each pushbutton has two terminals; one is connected to a column line and other to a row line.
26-Jun-12
Basic Operation
Initially, there are not direct connection between row and column. When a key is pressed, the adjacent row and column are connected, thus a row and column make a contact; otherwise there is no connection between rows and columns. For example if key 8 is pressed, Row 3 and Column 2 will connect to each other.
26-Jun-12
Keyboard Debounce
Noise
Stable
26-Jun-12
Keypad Programming
Steps (based on connection in Slide 3):
Make Row 1 = 0 Delay Check every column
If Column 1 = 0, return 1 If Column 2 = 0, return 2 If Column 3 = 0, return 3 If Column 4 = 0, return A
The process continue by making Row2, Row3, and Row 4 low one by one and then check the column.