• Windows 95 intelligence data acquisition system

        Abstract: Proposes one kind of intelligence data acquisition system. With the programming simple, the resolution is fixed time high, the operation reliable the monolithic integrated circuit fixed time substitutes for the programming complicated, the resolution to be fixed time low, under work unreliable Windows95 fixed time. Has solved under the Windows 95 environment the short time fixed time inaccurate difficult problem, also simplified user’s application procedure. Overall system structure simple, highly effective reliable, has realized to signal high performance gathering.

        Key word: Timer clock and mouth data acquisition

    Introduction

    The data acquisition system has the widespread application in the various trades and occupations. At present, had high speed, the high accuracy, the multichannel data acquisition card to be published variously. Computer’s inputs the data through card in modulus switch, then carries on work and so on data storage, data processing and graphical display. Along with the microelectronic technology and computer technology’s development, under the Windows 95/98 platform’s application procedure already became the data acquisition and the processing software development mainstream.

    Uses in the data acquisition conventional Windows fixed time being suitable has the serious insufficiency. First, the conventional Windows timer’s resolution fixed time is low. Timer every other 55ms interrupts 1 time, is equal in the highest sampling frequency is only 18.2Hz. To because the Windows 95/98 application procedure is unable to have to do directly with the hardware, cannot through the method change fixed time time length which installs to the timer interruption. The so low sampling frequency does not suit regarding overwhelming majority signal gathering and processing, must seek can by the high-frequency gathering method.

    Next, the Windows system is more than a duty operating system, it is actuates the event based on the news. Timer news WMTIMER is very low in the serial news formation’s first rank, often cannot obtain the prompt response, even in the news formation’s several stitch in time’s timer news by the merge will not have been; But the application procedure is unable to determine loses the news number as a result of this kind of processing, causes the actual sampling interval to be non-uniform.

    In view of the above question, the people found out many methods to solve. At present the commonly used method is programs on PC machine, generally speaking has the following 3 methods:

    (1) in Windows application procedure, in use ordinary C language commonly used function delay()[2,3].

    delay() is in the C language commonly used extends, fixed time letter Lou. Uses delay(), the highest sampling rate may reach 1kHz, but delay() and the multi-duty’s Windows operating system is incompatible. Will use delay() in the Windows application procedure to have the translation directly to warn and to connect the mistake. May through the procedure in demonstrate that showing function delay () the prototype and contains the DELAY module in the Windows storehouse the method to remove this mistake, thus may in the Windows application procedure, the ordinary C procedure use delay() equally likely. However, this kind with the software waiting’s method, says regarding main engine’s resources is an enormous waste.

    (2) uses Windows multimedia timer’s call-back function [4,5]

    The Windows multimedia timers may establish the timer resolution through function timeBeginPeriod, its resolution most is small is 1ms, is 16ms most greatly. This resolution has represented the 60~1000Hz sampling rate, may satisfy the common signal to the sampling rate request. Moreover the multimedia timers use the interrupt to complete fixed time serve, transfers 1 call-back function in the interrupt time, but is not transmits the WM_TIMER information to the news formation. In the application procedure, uses the Windows multimedia timers not to be easy, must follow the strict step. In use call-back function’s going to the market, between the interrupt service and the user master routine, must carry on the data sharing, brings inconveniently for the programming and the debugging. Procedure robustness will also come under the influence. In fixed time time short-time, the main engine load is overweight.

    (3) solid clock fixed time [6]

    The solid clock chip actuates the internal clock electric circuit work under the reference frequency function, simultaneously may through (D3~D0) program to internal register A, chooses 22 frequency division output signal frequency. The solid clock periodically output square-wave and the cycle interrupt request signal (this interrupt request company arrives at IRQ8), thus realized the timing control for the procedure to provide another way. At the same time, in the Windows mechanism, the use priority is higher than the general duty level, but was equal to that the system-level the VxD establishment driver, may guarantee driver when movement enjoys the highest priority, when carries on the hardware equipment’s management, the control will not be interrupted by other duties, had guaranteed fully the driver will return for user’s data is the completely real value. Moreover may carry on directly visit to the hardware, thus through compiles VxD to manage the solid clock interrupt directly, the resolution is fixed time higher. But VxD to debugs the programming level request is high, has slightly carelessly, very easy to appear exceptionally wrong or halts.

    It is not difficult to see, programs the solution fixed time question request debugging on PC machine to have the high programming level directly, the program debugging difficulty, the reliability is bad.

    Therefore, we have designed a set of intelligence data acquisition system. Takes the central processing element with monolithic integrated circuit 89C51, controls pattern making/auxiliary equipments and so on data conversion, exterior data-carrier storage, carries on the data gathering fixed time and pretreats. Parallel mouth achievement data acquisition system which and computer’s connection has through the overwhelming majority computer, carries on the data transmission with PC machine. And carries on the partial signal pretreatment work by the monolithic integrated circuit management timing sampling, has solved the Windows 95 timing sampling problems, reduced the diameter the work load which PC machine aspect programmed, after causing the application procedure might the energy carry on the data acquisition handle work.

    Intelligence data acquisition system

    Intelligence data acquisition system’s diagram as shown in Figure 1. The source signal after enlarging the filter enters a/D switch. The monolithic integrated circuit reads a/D switch’s output by certain gathering rate in the timer interruption, sends in RAM to temporarily store, in decides outside the time interval the data which saves RAM in unceasingly to pass through and the mouth sends in PC machine. The PC machine application procedure the data which transmits by and the mouth receive monolithic integrated circuit, and carries on the data processing and the demonstration to it.

    1. between monolithic integrated circuit and main engine and mouth correspondence

    Along with computer technology’s development, microcomputer’s parallel mouth has had the very big change, by original can only print, namely can only to the peripheral device transmission data, develop into may carries on bidirectional, the fast exchange data bidirectional parallel interface between the microcomputer and the peripheral device. Uses the bidirectional parallel mouth to cause the PC function and between data acquisition system’s monolithic integrated circuit by asynchronous, the entire interlock bidirectional parallel mode correspondence. It can reduce the user to operate external instrumentation’s number of times alternately, completes the data transfer by the higher transmission speed.

    And mouth correspondence hardware partial principle as shown in Figure 2, software partial flow chart as shown in Figure 3.

    And the mouth correspondence has used D the trigger 74HC74 initialization and the reset function provides the handshake signal which the transmission data needs. Completes the monolithic integrated circuit with eight D latch 74HC573 to spread the data the lock to save. In the monolithic integrated circuit delivers several:00 to PC machine, the monolithic embryonic period the data lock has in 74HC573. 74HC573 output termination to microcomputer parallel mouth data register’s input end. After the data lock saves, the monolithic integrated circuit carries the 74HC74 reset the CD reset, causes out-port Q to output the low level, the Q end simultaneously delivers to the parallel mouth condition register, informs PC machine to be possible to fetch. After PC machine examination this signal, after the control mouth selection data latch, the data which saves the lock takes out, and carries the trigger setting SD to set 1, causes the Q end to output the high level, the notice monolithic scheme took out, might deliver the next data. After the monolithic integrated circuit examines the trigger Q end output becomes the high level, also 1 recent data lock saves to 74HC573, simultaneously causes the trigger power output turn over, informs the PC machine fetching. So the reciprocation, no longer needs the reading until PC machine. It is noteworthy that: In order to avoid, because the succession does not match the reset which and at the same time the setting end creates effective, before the monolithic integrated circuit (PC machine) carries on the reset (setting), deals with PC machine (monolithic integrated circuit) the setting (reset) the end carries on the examination; But to avoid the data the transmission mistake, each round of 16 data namely carry on 1 time accumulator and with different or and the verification. The PC machine like discovery check result is wrong, namely notice monolithic integrated circuit reproduction a moment ago 16 integers.

    Uses this kind of electric circuit to carry on and the mouth channel, the circuit design is simple, only needs 1 piece of 74HC573 and 1 piece of 74HC74 then realizes. 74HC573 and the 74HC74 use is very simple, makes the programming to be very also easy, raised the transmission speed greatly.

    2. monolithic integrated circuit and RAM data exchange

    Introduces RAM in and the mouth correspondence, is for solves under Windows the application procedure is unable when the data acquisition to respond the news promptly the question. RAM played “the reservoir” in the system role: In the data acquisition card monolithic integrated circuit 89C51 reads the impression taking/number switch MAX126 various channel switching result by the 200Hz sampling rate in the timer interruption, sends in exterior RAM to temporarily store; But in the master routine, the data which saves RAM in takes out, passes to the notebook through and the mouth correspondence. Data in RAM Round-robin queue way memory. Thus, responds other news when Windows, the notebook speed is slow, inputs the data temporarily stores in RAM; But when the notebook speed is quick, monolithic integrated circuit the data which saves RAM in takes out spreads. Because overall speaking notebook’s speed is sufficiently the data which saves in interruption interval biography RAM. So long as therefore the RAM reserves is big (several times to respond the greatest time which enough in Windows other news possibly spend), may guarantee the data the serial transmission. The monolithic integrated circuit and RAM data exchange flow as shown in Figure 4.

    3. highest sampling rate limit

    May divide into two kind of situations to the highest sampling rate’s discussion: Live transmission and non-live transmission.

    When live transmission, in front of the elephant mentioned such, the monolithic integrated circuit gathers the data, in the timer interruption after the RAM interim, in decides outside the time interval unceasingly to pass through and the mouth to the PC machine transmission. Therefore because the gathering system’s highest sampling rate receives the monolithic integrated circuit and RAM the data exchange as well as with PC machine and the mouth signal instruction execution time limit, and the supposition when uses the 89C51,12MHz crystal oscillator, the sampled data precision is the single byte, then the single channel sampling rate should not be higher than 32kHz.

    If is not high to data processing’s timely request, allows to carry on to the signal processes afterward, then may choose the non-live transmission way. Namely after the monolithic integrated circuit gathers the data, puts in large capacity RAM to save, but does not deliver the number to PC machine. After the complete data acquisition completes, only then carries on the monolithic integrated circuit and PC machine and the mouth correspondence, saves the data RAM in one time to send in PC machine. The non-live transmission way’s highest sampling rate not the monolithic integrated circuit and RAM the address comparison as well as and the mouth data capacity’s limit, enables the sampling the resolution fixed time to be possible to be smaller than (1/32) ms.

    Uses a set of physiological electricity data acquisition system which the above principle realizes, the monolithic integrated circuit uses the 12MHz crystal oscillator, may by the 500Hz sampling rate, carry on 16 channel physiology electrical signal’s real-time gathering and processing. If uses the higher crystal oscillator frequency, or uses the few channel number, this sampling rate may also further enhance.

    Subtotal

    This article proposed one kind of intelligence data acquisition system. With the programming simple, the resolution is fixed time high, the operation reliable the monolithic integrated circuit fixed time substituted for the programming complicated, the resolution to be fixed time low, under work unreliable Windows95 fixed time. By monolithic integrated circuit board on RAM “reservoir ” the function has solved Windows 95 when the timing sampling responds the news the question. Not only has solved under the Windows 95 environment the short news question. Not only has solved under the Windows 95 environment the short time fixed time inaccurate difficult problem, also simplified user’s application procedure. The monolithic integrated circuit may also to the data which inputs carry on the pretreatment, saves the main engine processing data the time. Enables the PC machine application procedure to be possible not to consider fixed time the question, after the centralized energy carries on the data inputs the handle work.

    Uses between the data acquisition system and the main engine between uses the parallel mouth correspondence, not only has solved the Windows 95 time sampling problem, raised system’s data capacity, but also causes the overall system structure simple, to be highly effective, to be reliable. Simultaneously has brought a series of advantage: Cannot look like the present commonly used interpolation formula data acquisition card such to take PC within the aircraft an expansion slot, moreover may connect with the notebook, carries conveniently, the use security, the disturbance which creates to the gathering signal is small, thus has realized to signal high performance gathering.

    Share/Save/Bookmark

    Saturday, July 12th, 2008 at 06:05
  • json
    Saturday, July 12th, 2008 at 08:28 | #1

    so old…

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 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