In the fingerprint automatic identification system, embedded systems have been more and more widely used due to their advantages such as low power consumption, small device size and high security. Universal Serial Bus (USB) is a microcomputer bus interface specification jointly formulated by Inter, Microsoft, IBM and NEC. It has a high transmission rate, supports plug-and-play, occupies less system resources and has strong expansion capabilities. In the application of embedded systems, communication with PCs is almost inevitable. Due to the requirements of communication speed and the rapid development of computer hardware, the traditional RS232 interface has become increasingly unable to meet the needs of users, so the implementation of USB interface in embedded systems is imperative.
System control module design
The core processor of the system control module is P89C52. Due to its limited interface, it is very difficult to complete system control and USB interface control at the same time. Considering the system cost, development time cycle and inheritance, it is not convenient to replace other processors, so it is necessary to consider completing multiple tasks based on this processor. According to the characteristics of the fingerprint automatic recognition system, the system needs to use the USB interface to complete the transmission of fingerprint templates and login information only after completing fingerprint entry or login. Therefore, for the processor, USB control and system control can be carried out in a time-division multiplexing manner. Therefore, a level conversion chip and an 8-bus transceiver are used to control the selection and flow of data to ensure that the system can work normally.
System USB interface design
The USB interface hardware is mainly centered on the interface chip PDIUSBD12, and the connection between it and the USB physical interface and the microcontroller is designed. The interface module selects the power supply mode through jumpers, and can support both USB bus power supply mode and peripheral power supply mode. It is a full-speed USB device interface. Reliability, testability and electromagnetic compatibility are fully considered during the design process. The interface circuit is shown in Figure 3.
The interface circuit power supply is selected by the dial switch K1. When K1 is connected to MVCC, the system is in self-powered mode; when K1 is connected to UVSB, it is in bus power mode. When the system is in self-powered mode, the system detects whether VUSB exists through the EOT_N pin, and connects a 1M discharge resistor to weaken the charge to ensure that EOT_N becomes low when VUSB is removed, and at this time, the self-powered power supply and the USB bus can only share the ground, and the device cannot output current to VBNS through the USB port.
In terms of control communication between the MCU and PDIUSBD12, the MCU indicates whether the content transmitted on the parallel data bus P0 is a command or data by controlling the state of the A0 pin of PDIUSBD12. At this time, the ALE pin on PDIUSBD12 used for data address bus multiplexing is always grounded. The interrupt pin INT_N is the key to the system. Almost all USB activities are received by PDIUSBD12 at the device interface end, and then the interrupt notification to the MCU is completed. The SUSPEND on PDIUSBD12 is a bidirectional pin, which ensures that the USB device can be awakened by both the device master (MCU) and the host PC. When PDIUSBD12 is working, if it fails to detect SOP for three consecutive times, the suspend pin will be set high.
The GL_N pin on the PDIUSBD12 chip indicates the system working status through an external light-emitting diode. During the USB enumeration process, the LED indicator flashes intermittently according to the communication status; when the PDIUSBD12 is successfully enumerated and configured, the LED indicator will remain on; subsequent successful transmission (with response) between PDIUSBD12 will turn off the LED; the LED will be turned off when in the suspended state.
The on-chip clock generation circuit uses a 6MHz crystal oscillator, matched with a 22pF and a 68pF passive capacitor. The use of a 6MHz crystal oscillator is also to reduce the risk of EMI (electromagnetic interference effect) during product manufacturing, because the higher the frequency of the external line, the stronger the EMI effect will be. The use of a lower frequency in the off-chip circuit and multiplying the frequency inside the chip will not affect the processing speed of the chip, but also improve the safety of external wiring. The purpose of using two capacitors of different capacitance values is to enable the crystal to start oscillating quickly. After measurement, the start-up time of the crystal oscillator is about 2ms.
PDIUSBD12 can use two operating voltages: 5V and 3.3V. Since the IO voltage of the main control microcontroller is 5V, the PDIUSBD12 also uses a 5V operating voltage. At this time, while connecting 5V to the VCC pin of PDIUSBD12, the VOUT pin on PDIUSBD12 should be left empty and connected to a decoupling capacitor. In addition, in order to reduce the EMI of the system, add magnetic beads to the VBUS and ground wires on the input side of the USB connector, such as the BLM21P in Figure 3, and use capacitive coupling between the USB shield and the ground.
Due to the complexity of the USB communication protocol, a considerable part of the work is completed by hardware circuits, so the accuracy of hardware circuit design is very strict. The wiring should be reasonable to minimize the influence of distributed capacitance and electromagnetic interference. The quality of the hardware circuit will directly affect whether the data can be transmitted normally.
Previous article:Design of Switching AC Voltage Stabilized Power Supply Circuit
Next article:Several constant current source circuit module designs
- Popular Resources
- Popular amplifiers
- Semantic Segmentation for Autonomous Driving: Model Evaluation, Dataset Generation, Viewpoint Comparison, and Real-time Performance
- Machine Learning and Embedded Computing in Advanced Driver Assistance Systems (ADAS)
- Embedded.Systems.2nd.Edition
- Embedded security in cars: securing current and future automotive IT applications
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- EEWORLD University Hall----TI motor driver chip latest technical advantages and applications
- Open Source Hardware Badge Development Board
- 2021 National Electronic Design Competition Materials List
- [RVB2601 Creative Application Development] + Network Player
- The 51 smallest system board with serial port function can directly burn STC chip, simple and easy to use, Micro interface, only needs an M...
- 【ufun learning】Learning chapter 6: "Basic routine 5 - touch button control-PWM"
- Disassembly of Bicycle Solar Tail Light
- Answer questions to win gifts | e-Network, help you create an infinite future
- 【Development and application based on NUCLEO-F746ZG motor】16. Function calculation of safety tasks - temperature calculation
- [Sipeed LicheeRV 86 Panel Review] 1- Unboxing Review