manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets
Table of Contents


Connecting to the 24/7 Data Acquisition Module


On-Board Reference

Digital Inputs

Analog Inputs

Programmable Gain

Input Protection

Allowable Input Impedance

Converter Noise and Effective Resolution

Other Sources of Noise and Offset Error

Tips For Measuring Small Voltages

Addressing the 24/7 WildCard Using Module Select Jumpers


Initializing the 24/7 Data Acquisition Wildcard

Specifying the Reference Voltage

Starting a Conversion

Calibration Options
Choosing the Sample Rate
Setting the Gain
Choosing Bipolar or Unipolar Conversion
Specifying 16- or 24-bit Resolution
Synchronizing Conversions
Specifying the Source Channels

Obtaining A Sample

Single- and Multi-Channel Sampling

Continuous Sampling from a Single Channel
Sequential Sampling from Several Channels

C Example Listing (pdf)

Forth Example Listing (pdf)


Appendix A:24/7 Data Acquisition Wildcard Pin-outs

Appendix B:24/7 Data Acquisition Wildcard Schematics (pdf)

24/7 Data Acquisition Wildcard Users Guide

<< Previous | Next>>

Obtaining A Sample

Once the 24/7 Data Acquisition Wildcard has been initialized, calibrated, and configured, you can take one or more samples using AD24_Sample or AD24_Multiple. Irrespective of the resolution option chosen, the samples are returned as 32-bit (4 byte) values. AD24_Sample acquires a single sample by polling the analog to digital converter. If a sample is not available within a timeout period, an error is returned. The timeout period is calculated by Equation 3.

data acquisition board: calculation of timeout value

Equation 3: Calculation of the Timout Value

The calibration delay is based on the calibration option and is listed in Table 4 as the "Duration of Calibration". The timeout period allowed is always great enough to account for the filter settling time (pipeline delay) after a channel is changed. If a timeout occurs, the timeout error flag is placed in the least significant byte of the returned 32-bit value. A 32-bit value is used to allow an error flag to be returned with data regardless of the resolution (16 or 24 bits). See Figure 3 for a diagram of the data format.


Figure 3: 32 Bit Value Returned By AD24_Sample

For a 16 bit sample, WWWWWWWW is the most significant byte, XXXXXXXX is the least significant byte, YYYYYYYY is 0, and ZZZZZZZZ is the timeout flag. For a 24 bit sample, WWWWWWWW is the most significant byte, XXXXXXXX is the next significant byte, YYYYYYYY is the least significant byte, and ZZZZZZZZ is the timeout flag.

To obtain multiple samples, you can use AD24_Multiple. This routine acquires up to 8192 samples and stores the samples as sequential 32 bit values in memory within a timeout period or a false flag is returned. This routine sets up an interrupt service routine to obtain the multiple samples. The interrupt service routine (ISR) runs at more than twice the sample frequency to eliminate clock variations between the 24/7 Data Acquisition Wildcard and the controller board and to guarantee that a sample is not missed even if the ISR is delayed up to 1/2 a sample period (or one full ISR period). Equation 4 shows how the ISR period is calculated.

data acquisaition board:calculation of ISR period

Equation 4: Calculation of the ISR Period

The interrupt latency delay is composed of 200 μs for the time to update the analog to digital converter’s data register with sample values, 10 μs of interrupt latency delay, and 50 μs to read the data ready line when the ISR is entered. You can also use this equation to calculate the maximum time the ISR can be delayed or the SPI used without missing a sample. The 24/7 Data Acquisition Wildcard uses the SPI to communicate with the controller board. You can create other tasks or routines that use the SPI as long as they do not use the SPI longer than one ISR period. For example to guarantee that a sample is not missed at a sample rate of 10 Hz, the maximum time another interrupt can take or routine can use the SPI is approximately 50 ms (0.04987 = ((1/10) - 0.00026) / 2).

<< Previous | Next>>

Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation