• Based on C8051F320 USB connection data acquisition storage circuit

    Abstract: The introduction uses C8051F320 SOC and the AM45DB321 constitution data acquisition memory system’s design proposal.
    Key word:  Data acquisition; USB connection; Storage circuit; SOC

        Sometimes in some special industry situation, needs and saves sensor’s signal unceasing real-time gathering, and playbacks again to certain time the data to PC machine in carries on the analysis and processing. Used the high performance perhaps in the working conditions bad situation the monolithic integrated circuit and the technical grade large capacity FLASH memory’s plan is the most suitable choice. CYGNAL Corporation’s C8051F320 SOC is one kind has 8051 essence high performance monolithic integrated circuits, the running rate for ordinary 8051 12 times. This chip internal 528 byte stochastic RAM and 2048 byte XRAM were the data buffering and the program run have provided the sufficient space. What receives welcome was its serial extended function has provided enormous convenient for the current each kind of serial chip and the external instrumentation connection expansion. The high speed SPI hardware interface and the serial FLASH RAM seamless connection simplified the circuit wafer wiring greatly, but the internal bringing USB interface function causes the data the memory and playbacking becomes very simple and quickly. Under the USB connection agreement’s support, caused this gathering storage circuit’s data playbacking process simply to the extreme.

        What this article gives is uses in the large-scale light bending down the systems operation condition monitor data acquisition storage circuit, because uses the surface to paste the piece craft manufacture, the entire circuit wafer’s width is only 18 millimeters, likely uses the U plate to be equally convenient.

    Gathering electric circuit hardware part

    Electric circuit’s hardware architecture

        This system has used CYGNAL Corporation’s C8051F320 chip and ATMEL Corporation’s AT45DB321C memory chip takes the control and the memory main chip. Figure 1 is signal gathering system’s gathering and the memory system diagram.

    Figure 1 based on USB data acquisition and memory system diagram

        From Figure 1 obviously, in the gathering process, sensor’s input simulated signal enlarges after the variable gain amplifier songzhi C8051F320, transforms after ADC into the digital signal. Outside the monolithic integrated circuit piece had 8 45DB321C chips to compose 32MB Data the flash memory, gathered the data transmitted unceasingly through the SPI connection to the 45DB321C chip in saves.

        Compares with other model chip, C8051F320 has the USB connection, the internal USB functional control module conforms to the USB2.0 standard, may moves under full speed or the low speed, and has 1KB the USB buffer, the integrated transceiver, does not need the non-essential resistance. May namely insert with PC machine namely uses. When needs the data, may gather the storage circuit from the scene recaption, playbacks through the USB connection to PC machine, carries on the profile demonstration and data analysis processing in the LabVEIW platform.

    8051F320 and 45DB321C hardware interface

        In the system C8051F320 and 45DB321CI use SPI Shan Zhuduo from machine way correspondence. Pin NSS takes from machine the choice line, the choice memory chip, the low level is effective; SCK takes the serial peripheral device connection transmission and the receive data synchronized clock signal; The RDY/BUZ achievement judges the equipment not busy or prepares to receive the new instruction operation the holding wire; SO, SI take the data link.

        This system design consideration uses 8 piece of 45DB321C chips, the maximum capacity reaches 32MB, through selects patches or strips of land as worth saving for seed CS1~CS8 to distinguish Lian Daoge 45DB321C the CS end. Clock SCK to 45DB321 which selects is been only effective. This system uses many piece of Flash chips the design besides to provide the sufficient storage space, but also has solved a key question, is profits from the hard disk domain RAID technology the mentality, through realizes a basic parallel acceleration to a 4 piece of group of Flash sequence operation, has solved the Flash writing speed excessively slow problem, enhanced the memory property greatly.

        Concrete electric circuit as shown in Figure 2, 8 piece of memory’s SPI uses the cascade only to draw one piece, respective CS selects patches or strips of land as worth saving for seed the signal to give by the 74HC138 decoding.

    Figure 2 monolithic integrated circuit and FLASH memory’s interface circuit
              
    Gathers electric circuit’s procedure software

        Gathers electric circuit’s procedure is refers to the solidification in the C8051F320 procedure, uses the c language compilation, by the master routine module, the ADC data acquisition, the Flash data storage and USB corresponds four parts to be composed.

    Master routine and ADC data acquisition

        The master routine mainly completes the system initialization status indicator work management and the parameter establishment starts a/D transformation and so on.

        The ADC data acquisition procedure will come from sensor’s simulated signal to transform the digital signal. In this system, the ADC transformation is overflows automatically through Timer2 triggering, but gathers the speed may beforehand through the superior machine establishment.

    Flash data storage procedure

        The C8051F320 chip and the Flash memory’s correspondence selects the SPI connection method, data transfer rate is 12MHz (position/second). In this design, the C8051F320 work in the SPI main engine pattern, the SPI main line’s data transmission will initiate by C8051F320. First is related SFR to SPI the SPI0CFG register and the SPI0CN register carries on the disposition, causes its work in 3 principal-mode -like 12MHz. When correspondence first uses the GPIO pin to choose corresponding Flash from the component, afterward through reads SPIDAT to carry on the read-write operation. When uses the Flash chip carries on the read-write operation, must first determine the Flash memory’s condition. Can through read in the D7H order, whether read condition register judgment equipment Ready or is at the Busy condition. After definite condition, may act according to the data book the forms of field orders to carry on the related read-write as well as the cleaning operation.

    USB signal procedure

        The firmware programming is in the USB equipment performance history prime task. Firmware’s primary mission is the initialization monolithic integrated circuit and the peripheral device, transmits USB to request, responds main engine’s standard equipment request. Completes each kind of data exchange request according to equipment’s function classification. The initialization programming mainly completes the USB controller’s initialization, the vertex initialization, the overlapping switch and the I/O mouth initialization, the system clock establishment, the controller enables. After the initialization, the USB equipment may momentarily insert in the main engine, the main engine will follow the USB agreement to carry on the recognition and the initialization to the equipment. After the main engine distinguishes the equipment, carries on the disposition to the equipment, transfers the corresponding driver, is joined to the superior machine software to carry on the related communication operations.

        Silicon lab Corporation has provided the USBXpress development suite. Through uses the USBXpress storehouse, simplified the USB firmware program and the PC end driver development greatly. USBXpress realizes monolithic integrated circuit end application program interface (API) through a series of functions. These functions have sealed the USB agreement detail, causes the procedure development personnel not to need to understand that USB excessively many details then use USB to carry on the data communication (to see Figure 3).

    Figure 3 monolithic integrated circuit and PC machine USB correspondence

        In this system mainly used the initialization, to read, to write, interrupts these four functions:
    Initialization USB_Init (0,0xEA61, NULL, NULL, Serial, 250,0×80,0×100) function; The block writes function Block_Write(); The block reads function Block_Read(); The USB interrupt enables the function.

        The USB all disposal procedure is completes through the USB interrupt service. After entering the USB interrupt, the procedure transfers the Get_Interrupt_Source() function to obtain the USB interrupt to enter the reason. Then the basis different entrance situation, carries on corresponding processing. After for instance receives the data, reads the corresponding buffer content to the memory in; When receives the initialization order, repositions in monolithic integrated circuit’s each state variable. USB correspondence flow graphical representation in Figure 4.

    Figure 4 USB correspondence flow chart

    PC machine end software routine

        Computer end software routine including two parts: USB driver and user application procedure.

    USB driver

        The USB driver is a software module, has sealed the application procedure deposit hardware equipment’s function function. Some equipment have the same attribute, converges group of standard categories them, may define the equipment class standard to take this kind of equipment’s main engine to actuate the frame. The equipment class driver use similar function, correspondence between the processing different equipment’s, enables the equipment class driver the development to be possible like the separation instrumentation manufacturer.

        The USB driver model divides into five (to see Figure generally 5).

    Figure 5 USB driver model

        If the subscriber’s premises from the equipment read data, will transfer application program interface API, if OpenFile, SiUSBXp.dll realizes this API. The main line driver controls visit to the main line on all equipment’s.

        In this system, developed the USB device driver the tool to use USBXpress Development Kit. The main function is as follows:
    SI_Open() function; SI_Close() function; SI_Read function; SI_Write() function; SI_GetNumDevices() function; SI_CheckRXQueue() function.

    User application procedure

        In this system, the application procedure uses NI Corporation’s LabVIEW software to carry on the compilation, carries on the software development using the presente in figures and diagrams C language, realizes the data demonstration, to meet the different needs the analysis function as well as (see Figure to the data acquisition hardware’s parameter hypothesis 6).

    Figure 6 playbacking data profile demonstration contact surface

    Conclusion

        Connection’s gathering storage circuit unifies closely based on C8051F320 the USB the computer technology and the traditional signal gathering technology, displays PC machine fully and the monolithic integrated circuit respective merit, realizes sensor signal gathering, the memory, the demonstration and processing. But with the aid of the USB connection’s correspondence function, reduced data transmission system’s complexity.
      
    Reference:
    1. the king flowing of molten iron, `uses ADUC812 to realize the ultra large capacity oil well data acquisition and the memory ‘, electronic products world, 2002.8A
    2. Pan Zuojin, ‘C8051F high speed SOC monolithic integrated circuit principle and application ‘, Beijing University of Aeronautics and Astronautics Publishing house, in 2002.
    3. Ma Xishun, ‘high speed SOC monolithic integrated circuit C8051F’, electronic products world, 2002.5A

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 2008-2009 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3