Table of ContentsConnecting To Mosaic Controller Selecting the Wildcard Address Selecting the Reference Voltage Analog I/O Wildcard Field Header Overview of the Software Device Driver Functions Initializing the Analog I/O Software Drivers Installing the Analog I/O Wildcard Driver Software |
Analog I/O Wildcard User GuideTo read a voltage from channel 2 (pin 12 on the Field Header) on module 1 with a single-ended conversion, use the function AD16_Sample as shown in the example code Listings 1-5 and Listing 1-5 C Code Listing for reading A/D Channel 2 on Module 1.
Listing 1-6 Forth Code Listing for reading A/D Channel 2 on Module 1.
To convert the 16-bit result returned from AD16_Sample into a voltage, use Equation 1-2.
Vref in Equation 1-2 is the reference voltage selected using the voltage reference selection jumpers which were described in the section entitled "Selecting The Reference Voltage". With the default voltage reference selection jumper configuration (jumpers J4 and J6 installed), Vref is 4.096 volts. Components and transducers with high output impedances connected to the analog inputs will introduce errors in the analog to digital converter. Table 1-7 shows the maximum source resistance at various sampling rates. Larger source resistances may cause conversion errors of more than one least significant bit (LSB). The function AD16_Multiple rapidly obtains a specified number of samples from an A/D channel and stores the results as sequential 2-byte values in memory starting at the specified extended address. If the specified extended address is in common RAM, the fastest sampling frequency is approximately 17 kHz (corresponding to 57.5 microseconds per sample). If the specified extended address is in paged memory, the fastest sampling frequency is approximately 12 kHz (corresponding to 82.5 microseconds per sample). The timing parameter specifies the timing of the samples, with 0 representing the fastest sampling rate, and 65,535 representing the slowest sampling rate. See the glossary entry for more information. Table 1-7 Maximum Source Resistance at Various Sampling Rates/b> |
Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2012 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation