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

C: RS232
4th: RS232 ( -- n )
A constant (= 2) that, when passed as a parameter to the Set_Protocols function, configures the specified channel’s data format for RS232.

C: RS422
4th: RS422 ( -- n )
A constant (= 1) that, when passed as a parameter to the Set_Protocols function, configures the specified channel’s data format for RS422.

C: RS485
4th: RS485 ( -- n )
A constant (= 0x21) that, when passed as a parameter to the Set_Protocols function, configures the specified channel’s data format for RS485.

C: void RS485_Rcv_UART ( int channel_num, int module_num )
4th: RS485_Rcv_UART ( channel_num\module_num -- )
Puts the specified RS485 channel into receive mode. Turns on the receiver and turns off the transmitter of the RS485 driver chip on the specified channel. The application program is responsible for making sure that all pending outgoing characters have been transmitted before invoking this function, as characters that have not yet been transmitted will be lost when the transmitter is disabled. To avoid this problem, use the higher level function named RS485_Rcv_When_Xmit_Done.

C: void RS485_Rcv_When_Xmit_Done ( int channel_num, int module_num )
4th: RS485_Rcv_When_Xmit_Done ( channel_num\module_num -- )
Puts the specified RS485 channel into receive mode. Waits and PAUSEs until the transmit FIFO is empty, then turns on the receiver and turns off the transmitter of the RS485 driver chip on the specified channel. This function ensures that pending outgoing characters are fully transmitted before disabling the RS485 transmitter.

C: void RS485_Xmit_UART ( int channel_num, int module_num )
4th: RS485_Xmit_UART ( channel_num\module_num -- )
Puts the specified RS485 channel into transmit mode. Turns on the transmitter and turns off the receiver of the RS485 driver chip on the specified channel. The application program is responsible for making sure that all expected characters have been received before invoking this function, as incoming characters that have not yet been queued in the receiver FIFO will be lost when the receiver is disabled.

C: void Run_Demo ( void )
4th: Run_Demo ( -- )
The top level function in the demonstration program. When called, it builds and activates two tasks named CH1_TASK and CH2_TASK. Each task runs the interactive monitor using a channel on the UART Wildcard. The initialization is performed by Default_UART_Init (see its glossary entry). Each task revectors the Emit, Key and Ask_Key (also called ?KEY) primitives so that all task I/O is implemented via the UART Wildcard. The default QED-Forth task stays active using the serial port on the Mosaic Controller. Thus, invoking this function allows you to simultaneously run three serial connections on the Mosaic Controller.

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