Description: This website provides schematics and instructions for constructing a keypad circuit that can be interfaced with a PC using an 8255 PC interface board. The keypad is directly connected to a client computer, which transmits information from the keypad over a TCP/IP connection to a remote server. Potential real-world applications include remote control of test equipment or the implementation of a process control system. ANSI C source code for a basic interface and Visual Basic 6.0 code for a more advanced client/server application of the keypad are provided, along with schematics and construction tips. The keypad interface circuit is built using a small prototyping board and a combination of wire wrapping and soldering. The decoder is powered by +5VDC from the 8255 via a 2-pin header connection. The rows (X1, X4) and columns (Y1, Y4) of the keypad are connected to the MM74C922 decoder through an 8-pin header. Capacitors C1 and C2 are connected to terminals KBM and OSC, controlling the key debounce period and the keyboard scan rate. According to the MM74C922 data sheet, a 1µF capacitor connected to the KBM terminal results in a debounce period of 0.01 seconds, while the typical debounce time for the keypad is below 0.01 seconds. Similarly, a 1µF capacitor connected to the OSC terminal provides a key repeat scanning frequency of approximately 60Hz. Photos of the components of the keypad interface are included; Figure 1 shows the actual keypad used for this application, connected to the interface card (Figure 2) via the 8-pin header. The interface card connects to the 8255 Terminal Expansion card through 8-pin (data connection) and 2-pin (power) headers. The code provided demonstrates a basic interface for the keypad using ANSI C, written and compiled with Borland TurboC v2.01. The program first defines variables and then enters a while loop that continuously monitors the state of Port A on the 8255 PC interface card connected to the external keypad. The keypad reads only when the MSB goes high, signaling a key press and new data availability. Upon detecting a new key press, the while loop calls a function, whatkey(), to decode the decimal word from Port A (keypad) using a case structure and displays the last key pressed on screen. Two programs are required for this tutorial: a client application to interface with the keypad circuitry and a server application to respond to client requests. The operating sequence is as follows: After setting the password, the client transmits the password sequence entered by the user (displayed on the LCD readout) when the ENT key is pressed for server verification. If correct, the server acknowledges and monitors for client commands to activate server devices (e.g., an LED output array) connected to a second 8255 PC interface installed on the server. Note that if the 8255.dll file is not properly installed in the server's C:\Windows\System directory, LED output options will be disabled. At startup, the client prompts the user to enter the server's IP address, defaulting to "localhost," indicating that both client and server are on the same machine. Once a connection is established, the access password must be set on the server side before the client can log in. The server notifies the client of the password setting and waits for a login attempt, during which the user enters the password on the client for transmission to the server.
The keypad circuit design utilizes the MM74C922 decoder, which is essential for translating the keypad inputs into a format that can be processed by the 8255 PC interface. The choice of a prototyping board allows for flexibility in layout and easy adjustments during the construction phase. The connection of the keypad rows and columns to the decoder is crucial for ensuring that each key press is accurately detected and debounced, preventing erroneous signals from being sent to the PC.
The capacitors used in the design serve dual purposes: C1 is responsible for debouncing the key presses, ensuring that each key press is registered only once, while C2 controls the scanning frequency of the keypad. The selection of a 1µF capacitor for both terminals is based on the specifications provided in the MM74C922 data sheet, ensuring optimal performance in terms of debounce time and scanning rate.
The software implementation is divided into two main components: the client-side application, which interfaces with the keypad, and the server-side application, which processes the commands received from the client. The client application continuously monitors the state of the keypad and transmits the data over the TCP/IP connection, while the server application handles the verification of the password and the activation of connected devices based on client commands.
Overall, this project illustrates the integration of hardware and software components to create a functional keypad interface that can be utilized in various applications, from simple remote control systems to more complex process control environments. The detailed schematics, code examples, and construction tips provided serve as a comprehensive guide for engineers and enthusiasts looking to implement similar systems.This web site provides schematics and instructions to construct a keypad circuit that can be interfaced to a PC using an 8255 PC interface board. The keypad is directly connected to a "client" computer that in turn transmits information from the keypad over a TCP/IP connection to a remote server.
Some potential real world applications include remo te control of test equipment or implementing a process control system. ANSI C source code for a basic interface and Visual Basic 6. 0 code for a more advanced client/server application of the keypad are provided as well as schematics and construction tips. The keypad interface circuit is built using a small prototyping board and a combination of wire wrapping and soldering.
The decoder is powered by +5VDC taken from the 8255 (Click here for a detailed description and instructions to build an 8255 PC interface card. ) via the 2-pin header connection. The rows (X1. X4) and columns (Y1. Y4) of the keypad are connected to the MM74C922 decoder through an 8-pin header as shown. The capacitors, C1 & C2, are connected to terminals KBM and OSC and control the key debounce period and the keyboard scan rate.
From the MM74C922 data sheet, A 1uF capacitor connected to the KBM terminal gives a debounce period of 0. 01 seconds and the keypad data sheet shows that the typical debounce time is below 0. 01 sec. Similarly, a 1uF capacitor connected to the OSC terminal gives a key repeat scanning frequency of approximately 60Hz.
Here we see some photos of the components of the keypad interface. Figure 1 shows the actual keypad used for this application. It is connected to the interface card, Figure 2, via the 8 pin header shown at left. The interface card is in turn connected to the 8255 Terminal Expansion card via the 8-pin (data connection) and 2-pin (power) header s at right. The code below shows a basic interface for the keypad implemented using ANSI C code. This code was written and compiled using Borland TurboC v2. 01. The basic operation of the code is straightforward. The program first defines variables used and then enters a while loop that continuously monitors the state of PortA on the 8255 PC interface card to which we have connected the external keypad.
As mentioned above, the keypad will only read when the MSB goes high, indicating that a key has been pressed and new data is available from the keypad. When the while loop detects a new key press, it calls a function whatkey() that decodes the decimal word from port A (keypad) using a case structure and displays the last key pressed on screen.
Click here to download the source code and a compiled version of this program. There are actually two programs required for this tutorial, a client application to interface with the keypad circuitry & a server application to respond to client requests. The operating sequence is: After the password is set, the client can transmit whatever password sequence the user has entered (displayed on the LCD readout) when the ENT key is pressed to the server for verification.
If the password is correct, the server will respond with an acknowledgment and then monitor for client commands to activate server devices (an LED output array in this example) connected to a second 8255 PC interface installed in the server. Note: If the 8255. dll file is not properly installed in the servers c:windowssystem directory, the LED output options will be disabled.
At startup, the client will prompt the user to enter an IP address for the server. The default is "localhost" meaning that the client and server are running on the same machine. Once a client connection is established, the access password needs to be set on the server side before the client can log in. The server will notify the client that a password has been set and then wait for login attempt. At this point the user would enter the password on the client and this would be transmitted to the server for
The Keypad must be the kind with a common terminal and a separate connection for each key. On a 12-key pad, look for 13 terminals. The matrix type with 7 terminals will NOT do. The Alarm is set by pressing...
The transceiver Yaesu FT2000, along with the FT950 and FT450 models, features two key functionalities: a CW memory keyer and a phone voice keyer. These keyers are activated via small buttons located in the lower left corner of the panel....
This document was created to address the numerous inquiries received about how to read a schematic. Learning to interpret a schematic diagram is akin to map reading; it requires understanding which wires connect to which components and identifying the start...
Learn to interface a 4x4 matrix keypad with AVR and 8051 microcontrollers, and program these microcontrollers in C and assembly language for the keypad matrix.
The 4x4 matrix keypad is a popular input device used in various electronic applications, allowing users...
The Keypad must be the kind with a common terminal and a separate connection for each key. On a 12-key pad, look for 13 terminals. The matrix type with 7 terminals will NOT do. The Alarm is set by pressing...
Introduction The design of off-line constant voltage, constant current (CVCC) power supplies using the NCP1014 for devices such as cell phones, hand tools, and similar battery chargers can present various challenges when low cost and circuit simplicity are required alongside...
Only one out of 9,999 possible codes has the power to unlock this simple, yet effective, electronic lock. A combination lock is not just a perfect system to protect your belongings, it is also a valid system to let everyone...
The following circuit illustrates a Car Door Keypad Electronic Circuit Diagram. Features include a lower pin-count and a cost-effective design utilizing the MC68HC908AZ60A microcontroller.
The Car Door Keypad Electronic Circuit is designed to enhance vehicle security by providing a user-friendly interface...
The keypad must be of the type that has a common terminal and a separate connection for each key. For a 12-key pad, there should be a total of 13 terminals. The matrix type with 7 terminals is not suitable....
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more