With the continuous development of digital signal processing technology theory, the development of digital signal processors is also changing with each passing day. Not only is the speed of executing instructions getting faster and faster, but its power consumption is also getting lower and lower. Many instruments or detection equipment have applied DSP to systems with huge data volumes and real-time data transmission. Nuclear signal data acquisition systems are no exception. Using DSP, the collected signals can be processed effectively in real time, and the processed data can be sent to the host computer for further processing. Usually, the communication between the lower computer and the host computer of the data acquisition system adopts the serial port method, which is not only simple in protocol, but also convenient in connection. However, the data transmission rate of this method is not high, and the USB bus interface has the advantages of convenience, plug-and-play support, and high-speed data communication, and is widely used in many fields. The transmission rate of the USB bus interface can reach 12Mbps under the USB1.1 protocol and 480Mbps under the USB2.0 protocol, which can fully meet the current data acquisition control system's increasingly high requirements for real-time data transmission rate.
Therefore, in this system design, the communication mode adopts USB (Universal Serial Bus) bus interface mode. The USB control chip adopts Cypress's EZ-USB SX2 series CY7C68001 control chip, and the DSP uses TI's fixed-point DSP chip TMS320VC5502.
1. Introduction to CY7C68001USB control chip
CY7C68001 is a high-speed USB chip developed by Cypress Corporation of the United States, supporting USB2.0 protocol. It integrates USB transceiver (physical layer), USB serial interface engine SIE (link layer, implementing the underlying communication protocol), 4KB FIFO, voltage regulator, and phase-locked loop; it can work in two transmission modes: full speed (12Mb/s) and high speed (480Mb/s), supports 8-bit and 16-bit data bus modes, and has synchronous and asynchronous FIFO interfaces. CY7C68001 is used to connect with controllers such as DSP, ASIC, FPGA, etc. to realize USB functions, and does not contain a microcontroller. At the same time, CY7C68001 provides 4 transmission modes (control transmission, interrupt transmission, bulk transmission, and synchronous transmission), which can meet the user's requirements for various transmission modes. Since the control chip does not contain a microcontroller, the USB application layer protocol should be implemented by DSP programming, and the loading of USB firmware must be completed by DSP controlling CY7C68001.
2. Communication interface system hardware design
The entire acquisition system includes sensor signal conditioning circuit, A/D conversion circuit, FIFO data buffer unit, DSP controller, FLASH program storage unit, CPLD logic control unit, and USB communication unit connected to the host computer. The hardware interface block diagram of the USB unit communicating with the PC is shown in the figure below.
Figure 1 Hardware interface diagram of data acquisition system communicating with PC
As can be seen from Figure 1, the communication part is mainly composed of CY7C68001 USB controller, CPLD logic unit, E2PROM, and TMS320VC5502. Since the number of devices required for the entire system is large, the resulting logic control is relatively complex, and the DSP's I/O interface is limited, so a CPLD logic control unit is added to the system to generate the logic state required in the circuit. At the same time, the register function is also implemented in the CPLD. This part of the register is used to represent various status information during USB communication, which is convenient for DSP to query.
The CY7C68001 USB controller and TMS320VC5502 use EMIF connection mode, and the memory in the USB controller is configured to CE1 space. At the same time, the asynchronous read and write mode is used to complete the data and command exchange between TMS320VC5502 and CY7C68001. The role of E2PROM in the system is to complete the bootstrap of the description table of the USB controller. There are two bootstrap modes for the CY7C68001 controller: EEPROM and microcontroller. This system uses the EEPROM mode.
3. Communication interface system software design
3.1 Host software design
The main function of the host software is to complete the reception, display, and analysis of data uploaded by the lower computer. Since the amount of signal acquisition data is large, batch transmission is adopted in USB transmission.
The design of host software includes three aspects:
(1) USB driver design
The function of USB driver is mainly to realize USB discovery, configuration, shutdown and data transmission interface control. The design of USB device driver is based on WDM (Windows driver model). WDM adopts a layered driver model, which is divided into a higher-level USB device driver and a lower-level USB function layer. The USB function layer consists of two parts: a higher-level universal serial bus module (US-BD) and a lower-level host controller driver module (HCD). In the above USB layered module, the USB function layer is provided by the operating system and is responsible for managing the communication between the USB device driver and the USB controller, loading and unloading the USB driver, and establishing communication with the USB device universal endpoint to perform device configuration, data and USB protocol framework and packaging format bidirectional conversion tasks.
(2) Install USB information file (.inf)
This step is used to bind the driver to the Verdor ID (VID) and Product ID (PID) of a specific device. When a USB device is plugged into a computer, the computer automatically sends a query request after detecting the device is plugged in; the USB device responds to the request and sends the device's VID/PID. The computer loads the corresponding device driver based on these two IDs to complete the enumeration.
(3) User application
The user application is the core of the data acquisition system. Its main functions are: turning on or off USB devices, detecting USB devices, setting USB data transmission pipelines, setting A/D states and data acquisition ports, collecting data from the USB interface in real time, and displaying and analyzing data. The entire application is written in Microsoft Visual C++, and A/D sampling and data display are achieved through interface control.
Here are some application-related functions:
BOOLEAN OpenDriver ( ) ;
BOOLEAN CloseDriver ( ) ;
PVO ID Sx2GetDeviceDesc ( );
PVO ID Sx2GetStringDesc (int stringIndex);
PVO ID Sx2GetConfigDesc ( );
BOOLEAN Sx2GetPipe Info (PVO ID p Interface);
BOOLEAN Sx2SendVendorReq (PVO ID myRequest, char * buffer, int bufferSize, int *
recnBytes);
BOOLEAN Sx2GetPipe Info (PVO ID p Interface);
3.2 DSP Software Programming
The data transmission between the USB host and the device is carried out through the endpoints in the device. These endpoints are identified by the endpoint number and the input and output direction, and a fixed FIFO storage area is allocated for data transmission. During initialization, this system configures the four endpoints of CY7C68001 as a batch transmission type. Among them, FIFO2 and FIFO4 are output endpoints for receiving data from the host computer; FIFO6 and FIFO8 are input endpoints for storing data to be sent. Each FIFO is set to asynchronous working mode. After initialization, the DSP turns on the USB external interrupt, writes the descriptor table to CY7C68001, and waits for its enumeration interrupt. After the enumeration is successful, the DSP performs other configurations on CY7C68001 and clears the FIFO, and then waits for the host to send a user request and performs corresponding processing. The software program flow chart is shown in Figure 2.
Figure 2 DSP software programming flow chart
DSP software programming mainly includes DSP initialization, USB descriptor table writing, other command register configuration and corresponding processing of user requests. DSP initialization mainly initializes the clock rate, configures the EMIF port, configures the McBSP port, etc. The USB descriptor table is mainly used to complete the initial configuration inside the USB chip, and the command register configuration is to complete the opening of the USB interrupt, the endpoint data transmission capacity and direction configuration, etc. The user request is the user application, which completes the corresponding data transmission according to the request sent by the user.
4. Conclusion
This system uses the USB interface to complete the data transmission between the nuclear signal acquisition system and the host computer. The user program of the host computer displays the transmitted data and the waveform. The verification shows that this method is simple to connect and reliable in transmission. Compared with the ordinary serial port, its speed has also been improved.
The innovation of this paper is to use the traditional DSP signal acquisition system for nuclear signal acquisition, and improve the serial port mode of communication with the host computer to USB mode. The use of this plug-and-play interface not only facilitates the connection with the host computer but also improves the transmission rate.
Previous article:Design of Universal Controller for LCD Based on DSP
Next article:Implementation of IRIG-B Encoder Based on FPGA
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- 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
- Design of brushless DC motor driver based on hardware FOC TMC4671
- [ART-Pi Review] VI: Review of ATT-Pi's onboard Flash file system and FTP functions in RTT Studio environment
- Use transistor + MOS tube to control battery output
- Contemporary IoT smart antenna design trends | Review TE's exciting live broadcast, write a comment and win a gift!
- VLSI Digital Signal Processing Systems: Design and Implementation
- A foreign guy pranked: using ESP32 microcontroller disguised as GPU to infect his friend's computer with "ransomware"
- 13 Rules You Must Read for RF Circuit Power Supply Design
- Agilent6684A power supply maintenance method - Antai Instrument Maintenance
- General frequency converter technology of DSP
- Comparison table of domestic 32-bit MCU and ST, GD compatible models