基于单片机的多路数据采集系统设计毕业论文 - 图文 下载本文

converted to a voltage. Integrated Digitizer

As the cost of A/D converters declines, the digitizing function can be moved into the amplifier. For example, the HEKA elektronik EPC-9 patch-clamp amplifier contains a built in digitizing unit (an Instrutech ITC-16).

Integrating a digitizer into an amplifier can substantially reduce total noise in the digitized signal, since the analog signal is not carried over a cable from the amplifier to an external digitizer. Be careful of instrument specifications when comparing an analog amplifier to one with a built-in digitizer. Including the digital electronics in the amplifier housing may increase noise, and the digitizer itself may add noise to the signal. However, the total noise in the digitized signal may be much less than if an external digitizer is used. Compare an amplifier with an integrated digitizer to the combination of an analog amplifier and an external digitizer.

A major advantage of integrating a digitizer into an amplifier is that the amplifier designer can easily include features for computer control. A data acquisition program connected to such an amplifier can then offer an integrated user interface, simplifying operation. In addition, the acquisition program can record all amplifier settings, simplifying data analysis. From Signals to Samples

A digitizer consists of an A/D (analog to digital) converter that samples an analog input signal and converts it to a sequence of digital values. Aliasing

The sampling theorem states that, in order to be able to reconstruct a signal, the sampling rate must be at least twice the signal bandwidth. What happens if a signal contains components at a frequency higher than half the sampling frequency? The frequency components above half the sampling rate appear at a lower frequency in the sampled data.

The apparent frequency of a sampled signal is the actual frequency modulo half of the sampling rate. For example, if a 26kHz signal is sampled at 50kHz, it appears to be a 1kHz signal in the sampled data. This effect is called aliasing. Anti-Aliasing Filter

If a signal to be digitized has components at frequencies greater than the half the sampling frequency, an anti aliasing filter is required to reduce the signal band width. The anti-aliasing filter must cut off signal components above one half the sampling rate.

Most signal sources are inherently band-limited, so in practice, anti-aliasing filters are often not required. However, some signal sources produce broadband noise that must be removed by an anti-aliasing filter.

For example, patch-clamp amplifiers have built-in anti aliasing filters. The pipette used for patch-clamp recording inherently filters signals above a low frequency in the range of 1kHz. The good high frequency response of a patch clamp amplifier is achieved only by boosting the high frequency component of the signal to compensate for the frequency response of the pipette. This can produce significant high-frequency noise. A patch-clamp amplifier provides a filter to eliminate this noise. Integrating Converters

The discussion of aliasing assumes instantaneous sampling. The output value produced by the A/D is represents the instantaneous analog signal amplitude. Such sampling A/D converters are the most common for use in instrumentation.

Some A/D converters employ an integrating conversion technique. The output value produced by such a digitizer represents the integral of the analog signal amplitude over the sampling interval. Such converters eliminate aliasing. They can be viewed as containing a built-in anti-aliasing filter.

Integrating converters are rarely used in high-speed control applications. The most common techniques for implementing high-speed integrating converters result in a delay of many sample intervals between an analog sample and the corresponding digitizer output value. This delay can introduce considerable phase shift at high frequencies in closed-loop response if the digitizer is used in a control system. Resolution

Typically a digitizer provides the computer with fixed length binary numbers. For example, the Axon Instruments Digidata 1200A produces 12-bit numbers, while the Instrutech Corporation ITC-16 produces 16-bit numbers. The length of each value is called the resolution of the device, measured in bits.

The resolution can be translated to an absolute input level. Most digitizers measure swings of up to approximately 10V from zero, for a total range of 20V. A 12-bit value has a resolution of 1 part in 4096, so the resolution of a 12-bit digitizer is 20V divided by 4096, or approximately 5mV. This is expressed by saying that a change of one count (or one least significant bit, or LSB) represents 5mV.

错误!链接无效。

Since analog instruments rarely have an accuracy significantly exceeding 0.1%, it might seem that 10 or 11 bit resolution would be sufficient in a digitizer. However, additional bits of resolution are needed because the input signal frequently does not use the entire input range. For example, even if the instrumentation amplifier gain has been adjusted to yield an input signal with a 20V range, small components of the signal with a 2V range might also be of interest.0.1% resolution of a 2V signal within a 20V range requires at least 13 bits of resolution. Accuracy

Several specifications are used to express the accuracy of a digitizer.

The absolute accuracy expresses how precisely the digital values produced represent the analog inputs. For example, a digitizer might have an absolute accuracy of 1 part in 4096. This can also be expressed by saying that the digitizer has 12 bit absolute accuracy.

The relative accuracy expresses how precisely the digitizer measures the difference between two analog input values. This is frequently of greater interest than the absolute accuracy.

The noise specification expresses how much the digitizer output will vary with no change in the analog input. This is frequently expressed as a number of bits. For example, a 16-bit digitizer with two bits of noise will produce effectively the same results as a 14-bit digitizer.

The accuracy of a digitizer varies strongly with its maximum sampling rate. The more accurate the digitizer, the slower it is.

Be careful when reading digitizer specifications. In some cases, manufacturers publish specifications of the A/D converter used in a digitizer as the specifications for the entire digitizer. However, the accuracy of the digitizer may be significantly less. The digitizer may include necessary components such as amplifiers and voltage references that degrade the accuracy. In addition, the A/D specifications apply only under specific conditions described in the converter datasheet. In the digitizer, those conditions may not apply.

From Samples to Computer

Once data has been digitized, it must be transferred to a computer. Usually a digitizer is built as a computer plug in board, so transfers take place over the computer bus.

Digitizers used for high-speed measurement can feed data to the computer at a high and constant rate. For example, a digitizer running on one channel at 100k samples/second will typically produce 200k bytes/second of data continuously. This is a large stream of data.

The continuous nature of much data acquisition requires some kind of buffering. For example, if the computer stops for 30ms to write data to disk or to update a display, 6000 bytes of data will accumulate. The data must be stored somewhere, or it will be lost. Data Transfer: DMA

The Axon Instruments Digidata 1200 uses DMA (direct memory access) to transfer data to the memory of the host computer. DMA transfers proceed regardless of the activity in the host.

DMA transfers encounter problems on during

4K Pagecontinuous acquisition. The problem is that the DMA

4K Pagecontroller used on PC motherboards is only capable of

transferring data to a contiguous block of memory. However, Microsoft Windows 95 and Windows NT use allocate

Digitizermemory in 4K byte pages. A data acquisition program might have a large buffer, but the buffer will be scattered 4K byte 4K Pagepages in physical memory. The DMA controller can transfer to only one page at a time. When done with a page, it interrupts the host computer. The device driver for the

4K Pagedigitizer must then reload the DMA controller for the next page. Computer MemoryNormally these periodic interrupts are not a problem.

For example, even at the full 330kHz rate of the Digidata 1200, a 4K page is filled only every 6ms. The interrupt handling in the driver might take 50us on a fast processor. Less than 1% of the time of the processor is taken servicing interrupts.

However, a problem occurs under multitasking operating systems such as Microsoft Windows NT, because many other activities can take place simultaneously. If another device driver is performing processing and has locked out interrupts temporarily, the digitizer device driver may have to wait to service the DMA controller.

To deal with this problem, Axon Instruments has increased the buffer memory in the Digidata from 2K samples in the Digidata 1200 to 8K samples in the 1200A and 1200B. This increase allows the unit to buffer data for up to 24ms even at 330kHz, avoiding problems. Data Transfer: Buffers

The Instrutech Corporation ITC-16 and ITC-18 do not use DMA. Instead, they use a large buffer to hold data until it can be processed by the host computer. The data is then transferred to the host computer by programmed I/O. That is, the device driver performs the transfer. On current computers, programmed I/O is about as efficient as DMA. These computers are generally limited in performance by the memory system. Therefore, even through a DMA transfer occurs without the intervention of the host computer, the transfer ties up the memory, which effectively stalls the processor. The Instrutech digitizers do not provide interrupts to the host computer. Instead, host computer periodically polls the device to obtain data. This polling is performed periodically by the

application program (i.e. HEKA Pulse or Bruxton Corporation Acquire. Since the polling may be infrequent, the digitizer needs a large buffer. For example ,if a program can poll the digitizer only once every 100ms,the digitizer must have a 20000 sample memory to operate at 200kHz.The Instrutech ITC-16 has a 16k sample FIFO. The Instrutech ITC-18 is available with either a 256k sample FIFO or a 1M sample FIFO. Data Transfer: PCI Bus Mastering

Some PCI bus data acquisition boards can write data directly into the memory of the host computer using bus mastering. Bus master data transfers do not use the motherboard DMA controller, and therefore can potentially support writing directly to a buffer composed of discontiguous 4K pages. In the future, bus master designs are likely to become popular. Those familiar with computer system design will notice that the PCI bus master transfers are in fact direct memory access (DMA) transfers. On PC systems, for historical reasons, the term DMA refers to the use of the DMA controller built in to the motherboard. Data Transfer: Output

The discussion so far has concentrated on data transfer for acquired data. If the digitizer is used for synchronous stimulation or control, the same data transfer problem occurs as for acquiring data. In fact, the total data rate doubles. Consider, for example, a stimulus/response measurement on one channel with a 100kHz sampling rate. Acquired data is received by the computer at 100kHz. Simultaneously, the stimulus waveform must be delivered by the computer to the digitizer at 100kHz. The full data rate 200kHz.The Axon Instruments and Instrutech digitizers have symmetric handling of inputs and outputs. The output buffers are the same size as the input buffers, and the same data transfer technique is used. Measurement Accuracy

The following sections discuss the issues that influence the accuracy of dynamic measurements. Crosstalk

Most digitizers record from multiple analog input channels, with 8 or 16 input channels being commonly supported. An important specification is the crosstalk between input channels, that is, the amount of input signal from one channel that appears on another channel.

Crosstalk is a problem because many Multiplexer Channel Adigitizers use a single analog to digital

Channel Bconverter, and a switch called a

A/Dmultiplexer to select between input Channel Cconverter Channel Dchannels.

The multiplexer itself is a source of

crosstalk. Even when a switch is open, capacitive coupling between the input of the switch and the output of the multiplexer produces a frequency-dependent crosstalk. High-frequency input signals are coupled to the multiplexer output even when they are not selected.

To measure such crosstalk, ground an analog input and sample from it. Meanwhile, connect a high-frequency signal to other input channels. Notice the amplitude of the high-frequency signal that appears on the grounded input. This is the crosstalk. Vary the input frequency and notice the change in the amount of crosstalk.

Crosstalk may not be significant when a digitizer is used for patch-clamp data acquisition. Typically one analog input is used for the ion channel signal, while other analog inputs are used to