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

Glossary

This glossary defines important constants and functions from the Analog I/O Wildcard driver code.

Overview of Glossary Notation

The main glossary entries presented in this document are listed in case-insensitive alphabetical order (the underscore character comes at the end of the alphabet). The keyword name of each entry is in bold typeface. Each function is listed with both a C-style declaration and a Forth-style stack comment declaration as described below. The "C:" and "4th:" tags at the start of the glossary entry distinguish the two declaration styles.

The Forth language is case-insensitive, so Forth programmers are free to use capital or lower case letters when typing keyword names in their program. Because C is case sensitive, C programmers must type the keywords exactly as shown in the glossary. The case conventions are as follows:

  • Function names begin with a capital letter, and every letter after an underscore is capitalized. Other letters are lower case, except for capitalized acronyms such as "DAC".
  • Constant names and C macros use capital letters.
  • Variable names use lower case letters.

Each glossary entry starts with C-style and Forth-style declarations, and presents a description of the function. Here is a sample glossary entry:

C: void To_DAC12 ( int value, int channel_num, int module_num )
4th: To_DAC12 ( value\channel_num\module_num -- )

Writes the specified 12-bit value to the specified channel of the 12-bit DAC on the specified module. The eight valid module numbers are 0 to 7 while the channel number is specified with one of the following constants DAC12_CH0, DAC12_CH1, DAC12_CH2, DAC12_CH3, DAC12_CH4, DAC12_CH5, DAC12_CH6, and DAC12_CH7. The 12-bit value is clamped to the range of 0 to 4095 but no error checking is performed on the channel number or the module number. Init_Analog_IO must be called before calling To_DAC12 to initialize the DACís reference voltage. Unlike the routines for the 8-bit DAC and 12-bit A/D, a resource variable is not needed for the 12-bit DAC and the 16-bit A/D in multitasking systems. To_DAC12 executes in approximately 37 microseconds. See also Init_Analog_IO.

The C declaration specifies the return data type before the function name, and lists the comma-delimited input parameters between parentheses, showing the type and a descriptive name for each.

The Forth declaration contains a "stack picture" between parentheses; this is recognized as a comment in a Forth program. The items to the left of the double-dash ( -- ) are input parameters, and the item to the right of the double-dash is the output parameter. Forth is stack-based, and the first item shown is lowest on the stack. The backslash ( \ ) character is read as "under" to indicate the relative positions of the input parameters on the stack. In the Forth declaration the parameter names and their data types are combined. All unspecified parameters are 16-bit integers. Forth promotes all characters to integer type.

The presence of both C and Forth declarations is helpful: the C syntax shows the types of the parameters, and the Forth declaration provides a descriptive name of the output parameter.

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