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

Introduction

Connecting to the 24/7 Data Acquisition Module

Hardware

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

Software

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)

Glossary

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

FORTH: AD24_Sample ( -- ud | ud = conversion result including error flag)
C: ulong AD24_Sample ( void )

Acquires and places on the stack a single sample from the 24 bit analog to digital (A/D) converter within a timeout period or a timeout error flag is returned. On success the lower 8 bits of ud are zero; if a timeout occurs the lower 8 bits contain the timeout flag (0x09). The timeout period is calculated using the following equation:

data acquisition board: timeout period calculation

The timeout period allowed is always great enough to account for the filter settling time (pipeline delay) after a channel is changed. The CalibrationDelay used is computed from the most recent calibration that was done, whether it pertained to the current channel or not.

Init_AD24, Use_Onboard_Ref or Use_External_Ref, and Start_Conversion or Start_Conv_With_Values must be called prior to this routine to initialize, configure, and calibrate the 24/7 Data Acquisition Wildcard.

This routine disables interrupts, then checks the data ready line (/DRDY) to see if a sample is ready. If the sample is ready, gets the sample and restores interrupts. If the data is not ready, re-enables interrupts, then calls Pause before checking the data ready line again. If the sample is not ready before the timeout value, the routine returns a 32 bit value with TIMEOUT_ERROR in the least significant byte to indicate a timeout has occurred. If the data is ready, this routine returns the conversion with 0 stored in the least significant byte. For both 16- and 24-bit resolution results the data is returned in the following 32-bit format:

WWWWWWWW XXXXXXXX YYYYYYYY ZZZZZZZZ

For a16 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.

Do not call this routine from within an interrupt service routine. See Example 3 for an example of periodic use.

This routine is not re-entrant. If using in a multitasking system, be sure only one task calls this routine or be sure that separate tasks do not use the AD7714 at the same time.

AD24_Sample takes 1.18 ms to read the data ready line and will obtain a sample within 1.38 ms. The variation between the two times is due to the 200 μs time when the data ready line is high when the AD7714 is updating its output register. The full execution time of this routine if the data is ready is 1.64 ms. If data is not ready, the maximum execution time is slightly greater than the timeout period. Interrupts are disabled for a maximum of less than 400 microseconds.

FORTH: AD24_Sample_NP ( -- ud | ud = conversion result including error flag)
C: ulong AD24_Sample_NP ( void )

Identical to AD24_Sample except does not disable interrupts and does not call Pause. Do not use this routine in an interrupt service. See Example 3 for an example of periodic use.

This routine is not re-entrant. If using in a multitasking system, be sure only one task calls this routine or be sure that separate tasks do not use the AD7714 at the same time.

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