oDIO8B Object

Back to top of pageDescription:
 The oDIO8B Object manages 8 of the I/O Lines in such a way that they can be used in a virtual circuit. 

The eight I/O lines are arranged as outputs and can be inverted or blanked.

 The following table lists the size and availability of the oDIO8B Object.
 ObjectSizeDescriptionA1A2B1B2C1
oDIO8B4 ByteProvides an 8 line digital Output.x
Back to top of pageOperation:
 

An oDIO8B Object's State property represents the binary value of the electrical state of the I/O lines specified by the IOGroup property. The I/O groups are 8 contiguous I/O Lines beginning at I/O line 8, 16, or 24. The I/O Lines are set to be outputs.

The electrical state of the specified I/O Lines are set to the value of the State property once each Object List Loop.

The Invert property specifies if the electrical state of the I/O lines are set to the inverted binary value of the State property.

The Blank property specifies if the electrical state of the I/O lines are all set to the same state when the Operate property is set to 0.  The state that is used when this occurs is specified by the InvertB property.  If InvertB is 0, then all I/O lines are set to 0 Volts.  If InvertB is 1, then all I/O lines are set to 5 Volts.

The IOGroup property is an instance of the oIOGroup object which is created when the oDIO8 object is.  The oDIO8B object uses the oIOGroup Object to do the actual I/O to the eight I/O lines.  Since the default property of the oIOGroup specifies which I/O lines to work with, then the IOGroup property can be directly specified.  Example: IOGroup = 1. (see oIOGroup object for more detail)

3 physical 8-bit I/O Groups are implemented within the ooPIC.

Caution: IOGroup 2 is used for special purposes such as PWM, serial input/output and DDELink..  Be sure that you are not using this IOGroup if these special functions are in use.

Back to top of pageProperties:
 

The following table lists the properties of the oDIO8B Object:

Property

Description

State
The value of the 8-bit variable
Object Class: oByte Value Range: 0 - 255
Data Type: Numeric Default Value: 0
Bit Value in StateInvertDescription
00The specified I/O line is at 0 Volts.
01The specified I/O line is at +5 Volts.
10The specified I/O line is at +5 Volts.
1

1

The specified I/O line is at 0 Volts.
IOGroup
A value that specifies which group of 8 I/O lines is used to output the data bits.
Object Class: oIOGroup Value Range: 0 - 3
Data Type: Numeric Default Value: 0
IOGroupConstantDescription
0cvOff

The instance of the oDIO8B Object is inactive.

1 

The oDIO8B Object uses pins 8 - 15 for its I/O.

2 

The oDIO8B Object uses pins 16 - 23 for its I/O.

3 

The oDIO8B Object uses pins 24 - 31 for its I/O

Some I/O Lines have special purposes.  Be sure to see oIOGroup for details.
Invert
Specifies if the data bits are to be inverted when outputted.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Blank
Specifies if all outputs are Blanked when Operate is set to 0.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
In normal operation, the operate property specifies when the electrical state of the I/O Lines are set to the state of the State property and when the Operate property is 0, this function simply stops.   If the Blank property is set to 1, then when the Operate property is 0, the value of the InvertB property is used to set the state of all the I/O lines.
BlankInvertBDescription
00The I/O lines remain unchanged.
01
10The I/O lines are set to 0 volts.
1

1

The I/O lines are set to +5 volts.
InvertB
Specifies if the outputs are High when Blanked.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Strobe
A value that selects if the I/O Lines are strobed on and off.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
This value specifies if the I/O Lines are to be blanked every other Object List Loop.
Operate
A value that selects if data bits are outputted on the I/O group or not.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOffThe data bits are not outputted.
1cvOnThe data bits are outputted.
Address
Returns a pointer to the address of the oCounter Object instance.
Object Class: oAddress Value Range: 0 - 127
Data Type:Pointer (Read Only) Default Value: Address of Object

Back to top of page Example:
 The following examples use the oDIO8B Object.
Visual Basic Syntax C and Java Syntax
' This program continually increments 
' the state property of an oDIO8B. In
' addition, the Operate property is
' turned off and on causing the oDIO8B
' to blank the output.

Dim A As New oDIO8B

Sub main()
  A.IOGroup = 1
  A.Operate = 1
  A.Blank = 1
  Do
    A.State = A.State + 1
    A.Operate = ooPIC.Hz1
  Loop
End Sub
// This program continually increments
// the state property of an oDIO8B. In
// addition, the Operate property is
// turned off and on causing the oDIO8B
// to blank the output.

oDIO8B A = New oDIO8B;

Void main(Void){
  A.IOGroup = 1;
  A.Operate = 1;
  A.Blank = 1;
  Do{
    A.State = A.State+1;
    A.Operate = ooPIC.Hz1;
  } While (1);
}
Basic Syntax
' This program continually increments 
' the state property of an oDIO8B. In
' addition, the Operate property is
' turned off and on causing the oDIO8B
' to blank the output.

A Var oDIO8B(1,,,1,,,cvOn)

Do
  A.State = A.State + 1
  A.Operate = ooPIC.Hz1
Loop

Back to top of page Related Items:

 The following table lists objects that use the oDIO8B Object.
 ObjectDescriptionA1A2B1B2C1
o7SegAn Object that displays a number on a 7-Segment LED display.x
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oDIO1Provides a 1 line digital I/O.xxxxx
oDIO4Provides a 4 line digital I/O.xxxxx
oDIO8Provides an 8-bit digital I/O.xxxxx
oDIO8FProvides an 8-bit digital I/O with flow control.xxx
oDIO16Provides a 16 line digital I/O.xxxxx
Back to top of page Version History and Bug List:
 Firmware Ver C1: Introduced.

Bugs: No known bugs.


 

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