ooPIC Logo

ooPIC Programmer's Guide

 Chapter 1 - Introduction

Back to top of page Defining ooPIC

 ooPIC is an Object-Oriented operating system that has been pre-programmed into a Microchip PIC.

Pronounced OO-Pic, "ooPIC" is an acronym for: Object-Oriented PIC

ooPIC helps you be more creative by providing you with an Object-Oriented language model designed to interact with the electrical hardware components that you attach to the PIC. You design your hardware interface in software by creating Objects and setting their properties to define their behavior and interaction with hardware. These Objects also can be interconnected to form a Virtual Circuit. You then utilize this hardware interface and its associated Virtual Circuits by writing a program that controls and responds to hardware events that occur.

This chapter shows you how to set up the ooPIC Software Development Kit on your computer and introduces other parts of the documentation.

Back to top of page How This Manual is Organized

 The chapters of this guide can be grouped into three parts.
 
Part 1
fundamentals
Chapters 1-4 describes the fundamental information for using this product, including Setup and three simple "First applications" to get you familiar with ooPIC Basic syntax and its use with the ooPIC.
Part 2
Programming
Chapters 5-8 explain the fundamentals of programming ooPIC , including Objects, variables, program control, and hardware I/O
Part 3
Virtual Circuits
Chapter 9-12 cover advanced topics such as Virtual Circuits, The ooPIC system Object, Mathematical operations and networking.

Part 4
Details

Chapters 13-16 cover details pertaining to ooPIC implementation of strings and robotics functionality as well as advanced communications with the ooPIC II and later variants.

Back to top of page Compatibility with Other Languages

 The list below describes the compatibility of the ooPIC language with other common languages.
 
BASICCompatible with conventional BASIC syntax and will be familiar to even the novice Basic programmer.
Visual BasicCompatible with Microsoft's Visual Basic Language as described in "Microsoft Visual Basic Language Reference" by Microsoft Corporation, 1995.
CCompatible with ANSI C as described in "The C Programming Language" by Brain W. Kernighan and Dennis M. Ritchie, Prentice Hall, 1978 and 1988.
JavaCompatible with Sun's Java Language.  It should be noted that only the syntax is implemented.  The Java Virtual Machine and the Java Object set are not.  Instead an Object set specific to the PIC micro is use.  See notice below.
 
Notice: While these scripting languages provide all the tools needed to create ooPIC applications, it should be noted that these scripting languages are NOT full implementations of the respective precedents they are modeled after and that not all of the functionality of those languages is needed nor supported by the ooPIC compiler.

Back to top of page Terms to Get You Started

 The list below defines some of the common terms used in the ooPIC manuals to describe parts of the ooPIC programming language used in this manual.
 
KeywordAny reserved word in the ooPIC language. Keywords may be a command, a function, a statement or any other word that ooPIC uses for any other purpose. All keyword in ooPIC Basic are case insensitive.
IdentifierA word that is defined by the programmer to represent an application specific item. An identifier cannot be spelled the same as any keyword and it must begin with an alphabetic letter
ConstantA predefined keyword that literally represents a value. Constants are used in place of numbers so that code is easier to read.
VariableA variable represents a value but, unlike a constant, it can be changed by assigning it a value. The value represented by a variable will remain the same until another value is assigned.
CommandA keyword that instructs the ooPIC to take a particular action.
FunctionA keyword that instructs the ooPIC to perform a calculation and return a result. A function is a lot like a variable in that it represents a value, but the value that it represents is calculated at the time the function is executed.
StatementA "sentence" of commands, functions, identifiers and constants that instruct the ooPIC to take a particular action and describes how to do it. A Statement usually begins with a command but can also begin with an identifier.
OperatorOperators are special commands that perform calculations, evaluations and assignments.
 If you are new to the Object-oriented and event-driven programming models, you may find some of the terminology a little strange at first. The list below defines some of the common terms used in the ooPIC manuals to describe these programming models.
 
EventAn action recognized by an Object which code can be written to respond to. Events may occur as a result of a hardware condition or software manipulation of an Object.
Event-drivenA term used to describe a programming model. Unlike applications written in a procedural style, an event-driven application consists of code that remains idle until called upon by an Object to response to an event.
MethodA keyword (similar to a function or statement) that is part of the logical unit of an Object and whose operation acts directly upon that Object.
ObjectA term used to describe a set of variables and code that acts as one logical unit.
Object-OrientedA term used to describe a programming model were certain variables and code act as a single logical unit.
PropertyA variable that is part of the logical unit of an Object.
 Virtual Circuits provide a means in which one can emulate electronic circuits that manipulate values. The list below defines some of the common terms used in the ooPIC manuals to describe Virtual Circuits.
 
Default ValueThe term used to describe the property of an object that will be used when none was specified by the program.
LinkA term used to describe a connection point in a Virtual Circuit.
PointerA term used to describe a property that is used to point to another property.
Virtual CircuitA Virtual Circuit is a multitasking background process.  Several Virtual Circuits can be operating simultaneously.

Back to top of page Notations

 Items in Brackets: Brackets, [ ], contain optional items which may be used but are not required. If the item enclosed in brackets is followed by three dots [exp...], it means that any number of expressions may be entered, but none are required.

The following table explains the abbreviations used throughout this manual:

{variable}Any variable.
{object}Any Object.
{class}An Object class.
{label}Any line label.
{constantlist}A list of data items.
{subscript}A numeric value.
{operator}Arithmetic or logical operator.
{expression}Arithmetic or logical Expression.

Back to top of page Setting Up the ooPIC Software Development Kit

 

Before You Run Setup

Before you install the ooPIC Software Development Kit, make sure your computer meets the minimum requirements, and be certain to read the README file, located at the root directory on our installation disk or referenced by the web page.

IMPORTANT
If you are running on Windows® NT®, 2000®, XP® or later you need to first install port95nt.exe which is available on the install disk or on the install pages of the web site.

Check the Hardware and System Requirements.

To run the ooPIC Software Development Kit, you must have certain hardware and software installed on your computer. The minimum system requirements include:

  • Any IBM®-compatible machine running Windows® 95® or later.
  • A hard disk with a minimum of 5 megabytes available space.
  • A 5.25-inch or 3.5-inch disk drives, CD-Rom, Internet Connection, or any other means required to load the software.
  • A mouse or other suitable pointing device.
  • An available Parallel Port if using the parallel programming cable.
  • An available Serial Port or USB Port if using the serial programming cable. (ooPIC II+, ooPIC R or ooPIC C).

Read the README File

The README file lists any changes to the ooPIC documentation since its publication. Check the first section of the file for details and new information.

Setting Up

You install ooPIC Software Development Kit on your computer using the Setup program. The Setup program installs the ooPIC Software Development Kit itself, the Help system and sample applications.

Important:You cannot simply copy files from the distribution disks to your hard disk and run the ooPIC Software Development Kit. You must use the Setup program, which decompresses and installs the files in the appropriate directories.

When you run the Setup Program, a directory is created for ooPIC All of the required files will be installed within this directory with the exception of the Microsoft® Visual Basic® runtime files.

Follow the appropriate one of these procedures to install the ooPIC Software Development Kit on your computer.

If installing from a drive such as a floppy:
  1. Press the Windows Start Button.
  2. Select Run from the Windows Start Menu.
  3. Type "{the drive letter and path that specifies the location of the setup.exe program}:setup" and press return.
  4. Follow the directions given in the installation program.
If installing from a setup file downloaded from the net:
  1. Locate the Setup File in the windows explorer.
  2. Double click on the Setup File.
  3. Follow the directions given in the installation program.
If installing from a CD
  1. Insert CD into CD Drive
  2. Follow the directions given in the installation program.
  3. If the setup does not auto-start, use the one of the other two methods.

Back to top of page Sample Applications

 In addition to the documentation, the ooPIC Software Development Kit includes sample applications that you can load into the ooPIC These applications are excellent learning tools. You can copy any part of them into your own applications, and modify them as necessary. You can find out more about these on our Internet world-wide-web page: http://www.ooPIC.com

Back to top of page On Line Help

 You can access Help by choosing the Contents command form the Help menu.

The fastest way to find a particular topic in Help is to use the Search dialog box.

  • From the Help menu, choose Search for Help On, or click the Search button from any Help topic window.
  • In the Search dialog box, type a word, or select one from the list by scrolling up or down. Press ENTER or choose Show Topics to display a list of topics related to the word you specified.
  • Select a topic name, and the press ENTER or choose "GO TO" to view the topic.

ooPIC Internet Support Services

  • Several services are available on our Internet world-wide-web page.
  • You can access the ooPIC Internet Support Services at: http://www.ooPIC.com

ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.