| With the development of computer technology, the application of computer technology is more and more extensive, data acquisition equipments adapt to the development of technical requirements, and gradually to the intelligent, small-scale development, simultaneously, transfer data in convenient way is one of the key research in the field of data acquisition equipments. The USB technology, with its characteristics such as high speed, reliability and conveniently, has enjoyed a rapid development ever since its birth. With the birth of USB host/slave interface chip, the application of USB technology is more and more extensive.A portable colorimeter instrument is designed, it bases on double-mode USB technology. The system combines the USB host/slave technology and photoelectric colorimeter and it implements real-time transmission of data. And it also could finish the test by the control of the computer.System's hardware was constituted by MCU, Light Source Circuit, Pre-amplifier circuit, time systems, keyboard and display circuit, power supply circuit, USB interface circuit and so on.The system uses C8051020F device as its MCU. The C8051F020 family utilizes Silicon Labs' proprietary CIP-51 microcontroller core. The CIP-51 employs a pipelined architecture that greatly increases its instruction through over the standard 8051 architecture. In a standard 8051, all instructions except for MUL and DIV take 12 or 24 system clock cycles to execute with a maximum system clock of 12-to-24 MHz. By contrast, the CIP-51 core executes 70% of its instructions in one or two system clock cycles, with only four instructions taking more than four system clock cycles.The system uses light-emitting diodes as light source and uses the TPS76030 as power supply, which provides a stable voltage. The system control the light-emitting diodes by the MCU.Pre-amplifier circuit uses the way of variable Gain, its magnification is adjustable. It is composed of an analog multiplexer CD4051 and operational amplifiers ICL7650, which uses advanced CMOS process for high-accuracy, low drift and high input impedance integrated self-zero, it also uses the principle of dynamic zero clear imbalance inherent in CMOS devices and drift, it is an ideal amplifier in terms of data acquisition system. The light irradiates the photodiode and it generates photocurrent, ignored the input offset current, all of the light current flow through resistance, resulting in the output voltage, the output access to the microprocessor's A/D pin.The C8051F020 has an on-chip 12-bit SAR ADC (ADC0) with a 9-channel input multiplexer and programmable gain amplifier. With a maximum throughput of 100 kbps, the ADC offers true 12-bit accuracy. The internal voltage reference circuit consists of a 1.2 V, 15 ppm/°C (typical) bandgap voltage reference generator and a gain-of-two output buffer amplifier. So using the internal voltage requires that the input current must be lower than 2.4V.Display system chosen LCD module YM12864R,which is produced by Shenzhen Yaoyu Technology Co. Ltd. YM12864R's characters are dot-matrix graphic LCD module, which can display characters and graphics. It contains 8129 Chinese characters (16 * 16 lattice), 128 characters , 64 * 256 dot-matrix display RAM and LED backlight configuration.A 4*4 matrix keyboard is used. The system Achieves human-computer interaction function by setting the function keys and number keys.In order to confirm and record the time, the system uses a real-time clock chip SD2300A, the chip has same features, it has a built-in crystal oscillator and I2C bus interface, the error was under 2.5 minutes in one year.System power used in two ways, when the equipment works in the host mode, we could use an external 9V power, when it works in slave mode, we could use USB interface power. The system use TPS73HD301 as the voltage converter chip, which could transform power from 5V to 3.3 V.To achieve real-time data transmission functions, we designed a USB interface and used CH375 as the USB interface chip. CH375 is a common USB bus interface chip, which support USB-HOST/USB-DEVICE/SLAVE. Software system includes some parts, we have designed software about data acquisition, and also designed the firmware when system worked in the mode of host/slave. The appropriate software which run in the computer is designed in the system . When the system works in the host mode, it could read and write U disk, you can use U disk as an intermediary to transmit data. When the system works in the slave mode, it can connect to computer through the USB interface, the computer can control the equipment by the appropriate software. When the equipment worked in host mode, it could read or write U disk. You can use U disk as an intermediary to transmit data. When the equipment worked in slave mode, you can Connect the equipment to PC through the USB interface. In this condition, you can control the equipment,which can upload and download data.In the system, USB interface technology is introduced into the photoelectric colorimeter. This design implements a breakthrough,so that the application of photoelectric colorimeter is more flexible. The equipment can work at the laboratory where has computer, it also can work under the conditions of the site survey without computer. And the data transmission is easy and fast. |