Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

USB interface high speed data acquisition card design and implementation circuit

Published on Oct 28 2010 // Micrcontroller circuits

USB interface, high speed data acquisition card design and implementationcircuit1

Abstract: Thediscussion of USB-based high-speed data acquisition card implementation. The system uses TI’s TUSB3210 chip communication and control chip as the USB, USB1.1 full compliance agreement is a new data acquisition card.
    Modern industrial production and scientific research on the increasing demand for data acquisition in the transient signal measurement, image processing and some other high-speed, high precision measurement, the need for high-speed data acquisition. Now a common high-speed data acquisition card is a PCI card or the general multi-ISA card, there is the following disadvantages: Installation problems; expensive; by the slot machine number, address, interrupt resource constraints, poor scalability; in a number of strong electromagnetic interference testing site, not specifically to do their electromagnetic shielding, resulting in distortion of collected data.
Universal Serial Bus USB is a 1995 Compaq, Microsoft, IBM, DEC and other companies to address the lack of traditional bus communication to promote a new standard. The bus interface has easy installation, high bandwidth, easy to expand, etc., has become the development trend of modern data transmission. USB-based high-speed data acquisition card USB bus full use of the above advantages, an effective solution to the traditional high-speed data acquisition card of the defects.
Principle 1 USB data acquisition card
1.1 USB Overview
Universal Serial Bus USB for peripheral devices connected to the net host PC through the PCI bus and the internal system bus connection for data transfer. While USB is a communications protocol, to support the main system and its data transfer between peripherals. USB devices support hot-swappable, plug and play. USB1.1 supports two speeds, both low and high-speed 1.5Mbps 12Mbps, the speed of the USB2.0 up to 480Mbps. USB has four transmission mode, both control (Control mode), interrupt transfer mode (Interrupt mode), bulk transfer mode (Bulk mode) and isochronous transfer mode (Iochronous mode).
Taking into account the higher speed USB transfer, USB interface, if only to achieve the chip plus the normal controller (eg 8051), the processing speed will be very slow USB transfer request fail; if high-speed microprocessors (such as DSP ), although to meet the USB transfer rates, but higher costs. So I chose TI, built-in USB interface, the micro-controller chip TUSB3210, the development of a USB interface, high speed data acquisition card.
1.2 System Schematic
System diagram shown in Figure 1.

    TUSB3210 as the core of the entire system, responsible for starting the A / D conversion, the control FIFO read and write and sampling frequency setting, and communication between the host and data transmission. MAX1449 provides a 2.048V precision bandgap reference, used to set the ADC full-scale range, it can change the scale range of an external reference source. MAX1449’s maximum differential input voltage range is 2V. 2.5 PCB board production
2 USB data acquisition hardware
2.1 TUSB3210 chip
TUSB3210 is a 8052 TI introduced the embedded cores and micro-controller with USB interface chip. TUSB3210 has 256 bytes of internal RAM, 8K bytes of program RAM, 512 bytes of USB data buffers and endpoint descriptor block EDB (Endpoint Descriptor Blocks), 4 a generic GPIO ports P0, P1, P2, P3, I2C Interface circuit, the watchdog circuit.
TUSB3210 USB interface complies with the USB1.1 protocol, there are 4 input end (Input Endpoint) and four output ports (Output End-Point), support full-speed and low-speed transfer rates, and under the agreement with the USB transfer mode 4. TUSB3210 the USB interface uses a serial interface engine (SIE) encoding and decoding of serial data, and checksum, bit stuffing, the implementation of other signals required for USB. This complete USB protocol in hardware, simplifying the preparation of the firmware code.
TUSB3210 internal RAM-based solution that allows a serial EEPROM via I2C bus in read from the firmware, or download the firmware from the host. This feature is easy to equipment development and online upgrades.
2.2 A / D chip MAX1449
MAXIM MAX1449 is produced by 10-bit, 105MSPS, a single 3.3V power supply, low power, high-speed A / D chip. It uses a differential input with high-bandwidth track / hold (T / H) of the 10 stage pipeline (pipeline) structure of the ADC, as shown in Figure 2. Each half of the sampling clock signal through a pipeline section to complete the transition to a continuous data output totaling 5.5 clock cycles. Each line first by a 1.5-bit flash ADC input voltage to quantify, the DAC generates a voltage corresponding to the quantitative results for the difference with the input voltage, output voltage, 2 times magnification to the next level after the pipeline processing. Provide a pipeline for each level of resolution and error recovery, get a good linearity and low offset.

2.3 Input signal processing circuit
MAX1449 chip differential input when the input signal is the best sampling results. In this system, the HTS4503 using TI as a single-ended input to differential output conversion circuit. THS4503 fully differential op amp performance, bandwidth up to 270MHz, with very good linearity, in the 100MHz to support 11-bit under the A / D conversion requirements, suitable for A / D conversion front-end interface circuit. Figure 3 shows the specific circuit.
2.4 FIFO and clock circuitry
High-speed A / D conversion of the data can not be sent directly through the USB host system through the FIFO to buffer data. The system uses TI, SN74V293 chip. It has a capacity of 65536 × 18 or 131072 × 9, the fastest read and write cycle 6ns, to meet the 100MHz sample data storage. Users can select the input, output width, when you select the input, output width is 18, you can store 64K × 10 bits of data. If you select the input and output to 9, will enable the storage capacity expanded to 128 × 9 bits, so that users of less precision for more data.
SN74V293 independent read and write clock control circuit, allows read and write operations simultaneously. SN74V293 internal full, empty, half full output signal and programmable almost full and almost empty output signal, these signals through the flexible control of FIFO controller can read and write operations.
For high-speed data acquisition system, the clock signal is very important. DALLAS used in this system’s clock chip DS1073. DS1073 is the frequency of the oscillator without external components. By DALLAS unique 1-wire technology, the internal divider values can be set to achieve the output frequency from 27.3kHz ~ 100MHz adjustable, so easy to change the sampling clock, simplifying circuit design. MAX1449 data output falling edge, and latched write data FIFO. DS90LC028A used in the system clock signal to achieve the inversion.
Click to enlarge

As high-speed A / D acquisition, in the production of PCB boards are some caveats. Best use of multilayer circuit boards, components, try to use surface-mount devices. This reduces the distance between components, reducing parasitic inductance, parasitic capacitance, while reducing board size. All bypass capacitors should be as close to the chip’s power pins. Analog and digital public land public land should be separated, the election is done by low surface-mount resistor (1 ~ 5O), beads or a direct connection, so as not to interfere with analog to digital ground currents. Power is best to use the linear power supply, A / D and front-end processing circuitry to use the same power output, reducing the impact of power fluctuations on the acquisition.
3 USB high-speed data acquisition card software
Development of a USB device, software design is essential. USB application software is divided into three parts: USB peripheral side firmware (Firmware), the host operating system drivers on the client and host application software. Host application software and systems through customer-driven program USBI (USB Device Interface) to communicate, USB data generated by the system to send movement; firmware is in response to various requests from the system’s USB standard, complete exchange of all data and event handling .
3.1 USB interface programming
USB firmware is to achieve communication. TUSB3210 USB with SIE to manage the communication. When the USB host to communicate with the chip will generate external interrupt 0 interrupt vector register by judge. Setup_packed_Int, Input_endpoint0_Int, Output_endpoint0_Int mainly used for the three interrupt the host to establish a connection, transmission control or interruption of transmission; Input_endpoint1_Int, Output_endpoint1_Int two interrupts used mainly in the bulk transfer. In the firmware to execute the interrupt routine to achieve a different USB data transfer.
Void EX0_int (void) interrupt 0 / / External Interrupt 0
EA = DISABLE; / / disable interrupts
switch (bBECINT) (/ / determine the interrupt ID
bVECFINT = 0x00;
Ep0QutputInterruptHandler ();
bBECINT = 0x00;
Ep0InputInterruptHandler ();
bVECINT = 0x00;
Ep 1 OutputInterruptHandler ();
bVECINT = 0x00;
Ep1InputInterruptHandler ();
SetupPacketInterruptHandler ();
bVECINT = 0x00;
default: break; / / do not know the interrupt ID
EA = ENABLE; / / Open interrupt
3.2 Host software
I first developed TUSB3210 driver in the host. Developed by WinDK3.0 driver under Win2000, realized the control transfer, interrupt transfer and batch transmission standard interface functions.
In application development, the available VC + + compiled application. USB devices can operate as a file using CreateFile get USB handle, use DeviceIoControl to control transmission, using ReadFile, WriteFile bulk transfer. Instances as follows:
HANDLE m_hUsbSample; / / USB Handle
m_hUsbSample = CreateFile (\ \. \ USBSampl0, GENERIC_READ |
DeviceIoControl (m_hUsbSample, IOCTL_USBSAMPL_REBOOT, NULL, 0, NULL, 0, & length, NULL); / / control transfer
WriteFile (m_hUsbSample, pBuffer, writelength, & writelength, NULL); / / output transfer bulk
ReadFile (m_hUsbSample, pBuffer, 64, & lgngth, NULL); / / batch input transfer
CloseHandle (m_hUsbSample); / / close the USB handle
Prepared using the above function, high-speed data acquisition card USB host software.
Design and implementation of the above USB data acquisition card based on the basic functions. But there are some, such as the trigger signal, the event needed to improve the capture function; USB2.0-based systems to be developed to further improve the data transmission rate.