The keyboard is one of the most important input devices in the digital video surveillance recording system and an important part of the human-machine interface. The commonly used industrial control computer keyboard is not much different from the PC keyboard except that it is equipped with an electronic lock switch to prevent illegal keyboard input. This keyboard not only has many keys and is inflexible to operate, but it can usually only be used as an input device, and the host cannot communicate with the peripherals through the keyboard. Based on the analysis of the communication method of the PC keyboard, this paper designs a digital video surveillance system keyboard and alarm control card with the 89C51 single-chip microcomputer as the core. The card has two functions: keyboard communication and input and output alarm. It adopts the structure of a standard PCI card, but does not occupy the host hardware resources. Among them, the alarm part has 4 inputs and 4 outputs, which can be connected to standard alarm sensors; the keyboard part has 16 keys, and the communication method is fully compatible with the PC.
The keyboard receives host commands and parameters
The host first sets the clock line to a low level, then sets the data line to a low level, and after a delay of about 200μs, sets the clock line to a high level. When the keyboard detects this state, it starts to receive host commands, and the format of the received data is the same as that sent. The keyboard receives 1 start bit, 8 data bits, 1 check bit, and 1 stop bit in sequence. It is particularly noteworthy that when receiving keyboard commands or parameters, although the data is sent from the host to the keyboard, the clock pulse is generated by the keyboard. The host outputs a bit of data on the data line for each falling edge of a pulse received on the clock line. If the reception is correct, after both the clock line and the data line become high levels, the keyboard will send a response signal (0FAH) to the host, otherwise it will send a 0FEH signal to the host to request retransmission. After the host receives the 0FEH signal, it resends the data that it has just output. If this process continues for three times and the keyboard still cannot receive correctly, the host will give up transmitting this data and switch to executing the following program or display an error message. The host commands and parameters also use odd parity.
System hardware circuit design
This system uses 89C51 single-chip microcomputer connected to PC keyboard interface. Figure 2 shows the principle of the system hardware circuit. P3.0 and P3.1 are connected to the clock line CLK and data line DATA of the host keyboard interface respectively, P2 port is connected to the 4×4 keyboard matrix, and P0 port is connected to the input and output alarm device after being driven. To ensure the reliable operation of the keyboard, the system is equipped with a watchdog circuit MAX813L. In addition, the system is also equipped with a buzzer, and there is a sound prompt every time a key is pressed.
Figure 2 System hardware circuit principle
Previous article:Design of intelligent video monitoring circuit for access control system
Next article:Interface circuit design of face recognition attendance machine
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TI's Ultrasonic Sensing Technology for Flow Measurement
- [Visible] Intangible necessities
- Purgatory Legend-RAM War.pdf
- AD19, making 3D animation, "The 3D Movie Panel is disabled in 2D" How to solve it?
- Guitar Shaped Audio PCB Amplifier
- 26 "Wanli" Raspberry Pi car - program startup
- Among the working modes of switching power supplies, which switching mode is both economical and affordable?
- Simple example of DSP interrupt configuration
- 【McQueen Trial】McQueen's car goes through the maze
- Collection: Impedance matching and the basic principles of the Smith chart