oDIO8 Object
An Object that provides an 8-bit digital I/O.
Description:
 

A Hardware Object that consists of 8 of the OOPic's I/O Lines.

Operation:
 

An oDIO8 Object's Value 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 Direction property specifies if the I/O Lines are inputs or outputs.

When the IOGroup property is set the Direction property is updated to reflect the current state of the specified I/O Lines.

Remarks:
 

Three physical 8-bit I/O Groups are implemented within the OOPic.

Caution: IOGroup 2 is used for special purposes.  Be sure that you are not using this IOGroup if these special functions are in use.

Storage size & Availability:
 

The following table lists the size and availability of the oDio8 Object:

ObjectSizeVersion
oDio8 1 Bytes A.1.0 and greater
Properties:
 

The following table lists the Properties of the oDIO8 Object:
Property Description
Address

Returns a pointer to the address of the oDIO8 Object instance.

Data-Type: Number-Pointer, Read-Only

Data-Range: 0 - 127

Direction

Determines if the I/O Lines are inputs or outputs.

Data-Type: Bit

Data-Range: 0 - 1

The following table lists the values of the Direction Property:
Direction Constant Description
0 cvOutput

The specified I/O Lines are outputs and the Value property is written to them.

1 cvInput

The specified I/O Lines are High-Z and the Value property is read from them.

IOGroup

The physical I/O Group to use.

Data-Type: Nibble

Data-Range: 0 - 3

The following table lists the values of the IOGroup Property:
IOGroup Constant Description
0 cvOff

The instance of the oDIO8 Object is inactive.

1  

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

2  

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

3  

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

String

The Value property represented as a string.

Note: The String property is available in OOPic Basic Version 2

Data-Type: String

Value

The electrical connection to the I/O Lines.

Data-Type: Byte Default

Data-Range: 0 - 255

Methods:
 

The following table lists the Methods of the oDIO8 Object:
Methods Description
Clear

Clears the Value property to 0.

Dec

Decrements the Value property by 1.

Inc

Increments the Value property by 1.

Invert

Inverts the bits in the Value property

LShift

Shifts the bits in the Value property left.

RShift

Shifts the bits in the Value property Right.

Set

Sets the Value property to 255.

Example:
  In the following example, the oDio8 Object is used.
'This program creates one oDio8 Object
'and outputs a count pattern.

Dim A As New oDio8

Sub main()
  A.IOGroup = 1
  A.Direction = cvOutput
  Do
    A.Inc
  Loop
End Sub
See Also:
 

oDio1 - An Object that provides an 1-bit digital I/O.
oDio4 - An Object that provides a 4-bit digital I/O.
oDio16 - An Object that provides a 16-bit digital I/O.