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 |

C: void Send_Break ( int channel_num, int module_num )
4th: Send_Break ( channel_num\module_num -- )
Waits and PAUSEs until the transmitter FIF0 is empty, then transmits a break on the specified serial channel. Break forces the output at the UART to the low (space) state. Use End_Break to end the break sequence.

C: void Set_Baud ( uint baudrate, int channel, int module )
4th: Set_Baud ( baudrate\channel\module -- )
Sets the baud rate of the specified channel on the specified Wildcard. Baud rates up to 56,000 baud are supported. Standard baud rates are 300, 1200, 2400, 4800, 9600, 19200, 38400, and 56000 baud. Both the local and remote UARTs must be configured for the same baud rate.

C: void Set_Data_Format ( int numbits, int stopBits, int parity, int channel, int module )
4th: Set_Data_Format ( numbits\stopBits\parity\channel\module -- )
Sets the data format of the specified channel on the specified Wildcard according to the specified input parameters. Sets the number of data bits per character to equal the numbits parameter, where numbits must equal 5, 6, 7, or 8. Sets the number of stop bits to 1 if stopBits = 1; otherwise sets the number of stop bits to 2. Sets the parity as specified by the parity parameter; allowed values are NO_PARITY, EVEN_PARITY, ODD_PARITY, HIGH_PARITY, or LOW_PARITY (see their glossary entries).

Notes: This function stops any in-progress break transmission.
If numbits = 5 and stopBits=2, the UART hardware implements 1.5 stop bits.

C: int Set_Protocols ( int ch1_modem, int ch1_protocol, int ch2_protocol, int module )
4th: Set_Protocols ( ch1_modem\ch1_protocol\ch2_protocol\module -- error )
Sets the protocols for each channel according to the specified parameters. If an invalid protocol combination is specified as described below, this function exits and returns a nonzero error flag. Otherwise, this function initializes the UART Wildcard hardware, configuring channel 1 for the specified ch1_protocol, and channel 2 for the specified ch2_protocol. Allowed protocol parameters are the constants RS232, RS422, RS485, and NOT_USED; see their glossary entries. The ch1_modem parameter is a flag that determines whether the modem handshaking signals are enabled on channel 1. If the ch1_modem flag is true (nonzero), the handshaking is enabled; otherwise, it is disabled. The DTR and RTS handshaking outputs are set to the active state; see Is_DTR and Is_RTS. The UART hardware is configured with all FIFO’s active, and interrupts disabled (polling is used to monitor the UART). If RS485 is specified on a channel, that channel is put in receiving mode. If RS232 or RS422 is specified on a channel, that channel’s transmitters & receivers are enabled. An invalid protocol combination occurs: (1) if ch1_modem is true AND ch1_protocol is not RS232; or, (2) if ch1_modem is true AND ch2_protocol is RS232. See the "UART Wildcard Hardware: Modem Handshaking Signals" section for more details.

C: void Set_UART_Number ( int module_num )
4th: Set_UART_Number ( module_num -- )
Saves the specified module number in a variable that is accessed by the channel-specific serial I/O primitives Ch1_Emit, Ch2_Emit, Ch1_Ask_Key, Ch2_Ask_Key, Ch1_Key, and Ch2_Key. See also Read_UART_Number.

C: UART_MODULE_NUM
4th: UART_MODULE_NUM ( -- n )
A constant in the demonstration program whose value equals the Wildcard number. This value must correspond to the jumper settings as shown in Table 1-1. This constant is used by the demonstration program functions Ch1_Emit, Ch2_Emit, Ch1_Ask_Key, Ch2_Ask_Key, Ch1_Key, Ch2_Key, and Run_Demo. The default value in the demonstration source code is 4.

C: void Wait_Until_Xmit_Done ( int channel_num, int module_num )
4th: Wait_Until_Xmit_Done ( channel_num\module_num -- )
Waits and PAUSEs until the transmitter FIF0 on the specified channel is empty.

<< Previous |


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