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

Analog I/O Wildcard Hardware

Connecting To Mosaic Controller

Selecting the Wildcard Address

Selecting the Reference Voltage

Analog I/O Wildcard Field Header

Software

Overview of the Software Device Driver Functions

Initializing the Analog I/O Software Drivers

Using the DAC Drivers

Using the A/D Drivers

Installing the Analog I/O Wildcard Driver Software

Using the Driver Code with C

Using the Driver Code with Forth

Glossary

Overview of Glossary Notation

Glossary Quick Reference

Glossary Entries

Hardware Schematics (pdf, 38.3KB)

Analog I/O Wildcard User Guide

<< Previous | Next>>

Software

A package of pre-coded device driver functions is provided to make it easy to use the Analog I/O Wildcard. This code is available as a pre-compiled “kernel extension” library to C and Forth programmers.

Overview of the Software Device Driver Functions

The Analog I/O Wildcard driver code makes it easy to initialize the A/D and DAC, acquire 16-bit samples from the A/D, and write 12-bit values to the DAC. The following sections describe the functions that initialize the A/D and DAC, read from the A/D inputs, and write to the DAC outputs.

Most of the functions accept as input parameters the channel number and the Analog I/O Wildcard Number (0 through 7). Be sure the module number passed to the software functions correspond to the hardware jumper settings as described in Table 1-2 above.

Initializing the Analog I/O Software Drivers

Use Init_Analog_IO to initialize the software drivers for the DAC and A/D, set the reference voltage of the DAC, and output 0 volts to all DAC channels. Init_Analog_IO must be called before attempting to read a value from the A/D or write a value to the DAC. The constants INT_2V_DAC12, INT_1V_DAC12, and EXT_DAC12, specify one of the three different reference voltage options for the DAC when passed to Init_Analog_IO. The following section provides more information about the DAC reference voltage options.

Using the DAC Drivers

The Analog I/O Wildcard has eight 12-bit DAC outputs. Each DAC accepts a number between 0 and 4095 that we’ll designate as N, and outputs a voltage given by Equation 1-1.

Vout = 2 * Vref * (N/4096) Eqn. 1-1

There are three different options for Vref:

  1. The DAC’s internally generated 2.048 volts, selected by passing the constant INT_2V_DAC12 to Init_Analog_IO. This is the default option and provides an output range for each DAC channel of 0 to 4.096 volts.
  2. The DAC’s internally generated 1.024 volts, selected by passing the constant INT_1V_DAC12 to Init_Analog_IO. This provides an output range for each DAC channel of 0 to 2.048 volts.
  3. An externally generated voltage applied to the reference pin (pin 4) of the Field Header with jumpers J3 and J6 installed, selected by passing the constant EXT_DAC12 to Init_Analog_IO. The maximum voltage of the external reference voltage is 5 volts. However, voltages above 2.048 volts will result in degraded performance of the DAC. Also, the DAC’s maximum specified output voltage is 4.6 volts, corresponding to an external reference of 2.3 V.

<< Previous | Next>>


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