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   

TARGET_SCREEN

TARGET_SCREEN

Type

Constant

Return Value

Integer

Description

The name of a pen property that contains the screen that the pen object renders to with the Draw method.  TARGET_SCREEN is initialized to GUI_SCREEN0 by Initialize_GUI.

Usage

Set_Property(GUI_PEN, TARGET_SCREEN, (ulong) GUI_SCREEN1);

GUI_PEN TARGET_SCREEN GUI_SCREEN1 u>d Set_Property

Library

library.c

library.4th

TEXTBOX

TEXTBOX

Type

Constant

Return Value

Integer

Description

The name of an object type used to create a new textbox object.  New textbox objects do not have their size set when they are instantiated, have their RENDER property set to GUI_TRUE, BORDER property set to GUI_FALSE, INVERT property set to GUI_FALSE, and uses the STANDARD_FONT to render text.  The size of textbox objects can only be set once using the Set_Property method along with the WIDTH_IN_PIXELS or HEIGHT_IN_PIXELS properties.  The font of a textbox must be set before setting the size of the textbox and size of the textbox must be set before strings or characters are written into the textbox.  Textboxes can not be larger than 128 pixels wide by 128 tall.  The font of a textbox can be changed using the Set_Property method with the TEXTBOX_FONT and FONT_WIDTH_DATA properties.

Usage

textboxInfo = New_Object ( TEXTBOX );

TEXTBOX New_Object textboxInfo !

Library

library.c

library.4th

See Also

FONT_WIDTH_DATA, GUI_FONT, HEIGHT_IN_PIXELS, RENDER, STANDARD_FONT, TEXTBOX_FONT, WIDTH_IN_PIXELS

TEXTBOX_FONT

TEXTBOX_FONT

Type

Constant

Return Value

Integer

Description

The name of a textbox property that contains the object reference to the font object used to render string data in a textbox onto a screen.  TEXTBOX_FONT is initialized to the STANDARD_FONT when a textbox is instantiated.  The STANDARD_FONT is initialized to the GUI_FONT by Initialize_GUI. The GUI_FONT is a proportional font (i.e. the widths of each character vary depending on the character) with a height of 10 pixels.  Changing the STANDARD_FONT to a custom font causes the custom font to be used as the textbox font for all subsequently created textboxes.  Use this property to change the font of only one textbox.  When changing the font of a textbox, be sure to set the font before setting the size of the textbox.  Once the size of the textbox is set, the font can not be changed.

Usage

Set_Property(textboxInfo, TEXTBOX_FONT, (ulong) fontCustom);

textboxInfo @ TEXTBOX_FONT fontCustom @ u>d Set_Property

Library

library.c

library.4th

See Also

GUI_FONT, STANDARD_FONT

TEXTBOX_ROWS

TEXTBOX_ROWS

Type

Constant

Return Value

Integer

Description

The name of a read only textbox property that contains the number of rows of the textbox.  The number of rows of a textbox is equal to the height of the textbox in pixels divided by the height of the TEXTBOX_FONT.

Usage

num_rows = Get_Property ( textboxInfo, TEXTBOX_ROWS );

textboxInfo @ TEXTBOX_ROWS Get_Property num_rows 2!

Library

library.c

library.4th

See Also

HEIGHT_IN_PIXELS, TEXTBOX_FONT

char *Textbox_To_String ( uint textbox_reference )

Textbox_To_String ( u1 – x$addr | u1 = textbox reference )

Type

Function

Input Parameters

textbox_reference       A 16 bit variable that refers to the textbox that the string is read from.

Return Value

The pointer to a character string contained in the specified textbox.

The extended string address of the string requested from the textbox.

Description

A method that returns up to 255 characters of the string in a textbox.  Errors include: INVALID_TEXTBOX.

Usage

intSetting = atoi(Textbox_To_String( textboxInfo ));

textboxInfo @ Textbox_To_String

$>f    \ convert string into floating point number

if     \ if the conversion was successful,

  f.   \ print out the floating point number

endif

Library

library.c

library.4th

See Also

STRING_TO_TEXTBOX

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