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

The C Programmer’s Guide to the Mosaic Handheld

Table of Contents

PART 1 GETTING STARTED

Introduction. How to Use This Manual

Chapter 1: Getting to Know Your Handheld Instrument

Chapter 2: Powering Your Handheld

PART 2 PROGRAMMING THE MOSAIC HANDHELD

Chapter 3: Your First Program

Chapter 4: The IDE: Writing, Compiling, Downloading and Debugging Programs

Chapter 5: Making Effective Use of Memory

Chapter 6: Real Time Programming

Chapter 7: Failure and Run-Time Error Recovery

Chapter 8: Programming the Graphical User Interface

PART 3 COMMUNICATIONS, MEASUREMENT, AND CONTROL

Chapter 9: Digital and Timer-Controlled I/O

Chapter 10: Data Acquisition

Chapter 11: Serial Communications

Chapter 12: The Battery-Backed Real Time Clock

Chapter 13: Customizing the Handheld's I/O

PART 4: REFERENCE DATA

Appendix A: GUI Function Reference

Appendix B: Handheld Schematics

Glossary

<< Previous | Next >>

A     B     C     DF    G     H     I     K     LM    N     P     R     S    T    UVWXY   

LAST_COORDS

LAST_COORDS

Type

Constant

Return Value

Integer

Description

The name of a pen property that contains the x and y-coordinates used with the previous call of Draw.  The y-coordinate is located in the most significant 16 bits and the x-coordinate is located in the least significant 16 bits.  The contents of this property are used as the first end point of a line drawn with the Draw method.  The x and y coordinates passed to the Draw method supply the second end point for the line.

Usage

longCoords = Get_Property(GUI_PEN, LAST_COORDS);

GUI_PEN LAST_COORDS Get_Property coords 2!

Library

library.c

library.4th

LINE

LINE

Type

Constant

Return Value

Long

Description

The name of a value of the SHAPE property of the GUI_PEN object.  When the SHAPE property of the GUI_PEN object is set to LINE, the Draw method draws a line between the LAST_COORDS stored in the GUI_PEN and the specified x and y parameters.

Usage

Set_Property(GUI_PEN, SHAPE, LINE);

GUI_PEN SHAPE LINE Set_Property

Library

library.c

library.4th

See Also

POINT

LINE_OUT_OF_RANGE

LINE_OUT_OF_RANGE

Type

Constant

Return Value

Integer

Description

The name of an error that indicates the line number passed to Set_Property for the FIRST_VISIBLE_LINE property is not valid i.e. the line number is less than 0 or greater than STRING_LINES (the number of lines of the string based on the width of the textbox and the number of characters in the string).

Usage

Set_Property(textboxString, FIRST_VISIBLE_LINE, (long) 16);

If (Read_Error() == LINE_OUT_OF_RANGE)

{

  printf(“The line number is out of range.\n”);

  Clear_Error();

}

textboxString @ FIRST_VISIBLE_LINE 16 u>d Set_Property

Read_Error LINE_OUT_OF_RANGE =

if

  cr .” The line number is out of range.”

  Clear_Error

endif

Library

library.c

library.4th

See Also

FIRST_VISIBLE_LINE, STRING_LINES

void Load ( uint screen_reference, uint object_reference, uint x_coordinate, uint y_coordinate )

Load ( u1 \ u2 \ u3 \ u4 -- | u1 = screen reference, u2 = object reference, u3 = x coord, u4 = y coord )

Type

Function

Input Parameters

screen_reference        A 16 bit variable that refers to the screen that the object specified by object_reference will be loaded into.

object_reference         A 16 bit variable that refers to an object to be loaded onto a screen.

x_coordinate              A 16 bit number that specifies the location of the left edge of the object in the horizontal direction relative to the left edge of the screen.  For speed, the x-coordinate must fall on an 8 pixel boundary.  The valid range for the x-coordinate depends on the width of the object.  The x-coordinate must be specified so that the entire object is between 0 and 127 pixels.  The origin of a screen is it’s upper left corner.

y_coordinate              A 16 bit number that specifies the location of the top of the object in the vertical direction relative to the top edge of the screen.  The valid range of the y-coordinate depends on the height of the object.  The y-coordinate must be specified so that the entire object is between 0 and 127 pixels.  The origin of a screen is it’s upper left corner.

Description

A method that loads an object into a screen at a specified location and renders the image of the object onto the screen.  Errors include: HEAP_FULL, INVALID_SCREEN, INVALID_OBJECT, X_OUT_OF_RANGE, and Y_OUT_OF_RANGE.

Usage

Load( GUI_SCREEN0, graphicStop, 0, 0);

GUI_SCREEN0 graphicStop @ 0 0 Load

Library

library.c

library.4th

See Also

Un_Load

LOW_BATTERY

LOW_BATTERY

Type

Constant

Return Value

Long

Description

The name of a value of the BATTERY_STATE property of the GUI_BATTERY object that indicates a low charge on the rechargeable batteries. 

Usage

If ( Get_Property ( GUI_BATTERY, BATTERY_STATE ) == LOW_BATTERY )

{

  printf(“The batteries are running low.  Please recharge.\n”);

}

GUI_BATTERY BATTERY_STATE Get_Property LOW_BATTERY d=

if

  cr .” The batteries are running low.  Please recharge.”

endif

Library

library.c

library.4th

See Also

BATTERY_STATE, GUI_BATTERY, FULL_BATTERY, MEDIUM_BATTERY, NO_BATTERY

MEDIUM_BATTERY

MEDIUM_BATTERY

Type

Constant

Return Value

Long

Description

The name of a value of the BATTERY_STATE property of the GUI_BATTERY object that indicates a medium charge on the rechargeable batteries.

Usage

If ( Get_Property ( GUI_BATTERY, BATTERY_STATE ) == MEDIUM_BATTERY )

{

  printf(“The batteries are charged.\n”);

}

GUI_BATTERY BATTERY_STATE Get_Property MEDIUM_BATTERY d=

if

  cr .” The batteries are charged.”

endif

Library

library.c

library.4th

See Also

BATTERY_STATE, GUI_BATTERY, FULL_BATTERY, LOW_BATTERY, NO_BATTERY

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