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

Serial Communications Basics

RS232

RS422

RS485

UART Wildcard Hardware

Connecting To Mosaic Controller

Selecting the Module Address

RS422/485 Configuration Jumpers

Protocol Configuration and Direction Control Registers

Modem Handshaking Signals

UART Module Field Header

Cable Connections

Software

Overview of the Software Device Driver Functions

Installing the UART Module Driver Software

Using the Driver Code with C

Using the Driver Code with Forth

UART Direction Control in a Multitasking System

Glossary

Overview of Glossary Notation

Glossary Quick Reference

Glossary Entries

C Demonstration Program (in pdf)

Forth Demonstration Program (in pdf)

Hardware Schematics (in pdf)

UART Wildcard User Guide

<< Previous | Next>>

Using the Driver Code with C

Move the library.c and library.h files into the same directory as your other C source code files. After loading the install.txt file as described above, use the following directive in your source code file:

#include "library.c"

This file contains calling primitives that implement the functions in the kernel extension package. The library.c file automatically includes the library.h header file. If you have a project with multiple source code files, you should only include library.c once, but use the directive

#include "library.h"
in every additional source file that references the UART functions.

To load the optional demonstration program described above, use the "make" icon of the C compiler to compile the file named

UmodDemo.c
that is provided on the Demos and Drivers media. Use the terminal to send the resulting UmodDemo.txt file to the QED Board, and type main to run the program. See the demo source code listing below for more details.

Note that all of the functions in the kernel extension are of the _forth type. While they are fully callable from C, there are two important restrictions. First, _forth functions may not be called as part of a parameter list of another _forth function. Second, _forth functions may not be called from within an interrupt service routine unless the instructions found in the file named

\fabius\qedcode\forthirq.c
are followed. Also, in most cases Key and Emit functions should not be called from within interrupt service routines, because these routines call PAUSE, and use of PAUSE within an interrupt routine can halt the multitasker.

NOTE: If your compiler was purchased before June 2002, you must update the files, qlink.bat and qmlink.bat in your /fabius/bin directory on your installation before using the kernel extension.

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