oDIO16x Object
An Object that provides a 16-bit digital I/O.
Description:
 

A Hardware Object that provides expanded I/O by multiplexing I/O Lines 8 - 15 by I/O Lines 5 - 7.

Operation:
  An oDIO16 Object expands the available I/O lines by multiplexing I/O Lines 8 - 15 with I/O Lines 5 - 7 to provide 32-bits of I/O while only using 11 I/O lines. the 32-bits of I/O is arranged as a 16-Bit input port and a 16-Bit output port 

Pins 5,6 and 7 are used to select 1 of  the 4 8-bit sections of the 32 bit I/O. 

  • Pin 5 is used as a data strobe.
  • Pins 6 and 7 are used as a 1 of 4 selector. 

This Object was designed so that Pins 5,6 and 7 connect to the A,B,C pins of an 74ls138 IC. 

  • I/O line 5 to A 
  • I/O line 6 to B
  • I/O line 7 to C 

The 74ls138 chip converts the 3 binary bits to one of 8 outputs.  Out of the 8 outputs, only 4 are used.  

  • Y0 goes low when the Object is outputting the Low Byte of the output value
  • Y2 goes low when the Object is outputting the High Byte of the output value
  • Y4 goes low when the Object is inputting the Low Byte of the input value
  • Y6 goes low when the Object is inputting the High Byte of the input value.

Y4 and Y6 can be connected to the Output Enable pin (pin 19) of two 74ls245 8-bit transceiver ICs.  When Y4 or Y6 goes low, the outputs of the 74ls245 IC will be read by I/O lines 8 - 15, thereby transferring the data that is present on the inputs of the 74ls245 into the Object.

Y0 and Y2 can be connected to the Latch Enable pin (pin 11) of two 74ls373 8-bit latch ICs.  When Y0 or Y2 goes low, the Objects data will be presented on I/O lines 8 - 15, thereby transferring the data into the inputs of the 74ls373 IC.

The remaining 4 outputs Y1, Y3, Y5 and Y7 are used as OFF positions for each of the 4 8-bits sections.  One possible use of these lines is a status indicator that indicates when the Object is operating.  By connecting two LEDs across Y7 and Y5,  (with one of the the LED's anode connected to Y5 and the other LED's anode connected to Y7) both LEDs will flash rapidly when the Object is operating.

The Value property is a dual purpose property.  When read, the 16-Bit value of the inputs on the two 74ls245 ICs is returned.  When written to, the 16-Bit value written is latched into the two 74ls373 ICs

Remarks:
 

1 Physical 16-bit I/O expander is implemented within the OOPic.

Storage size & Availability:
 

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

ObjectSizeVersion
oDio16X 5 Bytes A.1.0 to B.1.0.  Obsoleted  in B.2.0 and greater
Properties:
 

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

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

Data-Type: Number-Pointer, Read-Only

Data-Range: 0 - 127

Operate

A value that specifies whether or not the oDIO16x Object scans the multiplexed I/O lines.

Data-Type: Bit, Flag

Data-Range: 0 - 1

The following table list the values of the Operate Property:
Operate Constant Description
0 cvFalse

The Value property is not updated/output.

1 cvTrue

The Value property is updated/output.

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

Example:
  In the following example, the oDio1 Object is used.
Dim A As New oDio16x

Sub Main()
  A.Operate = 1
  Do  
    A = &B1010101010101010
    OOPic.Delay = 50
    A = &B0101010101010101
    OOPic.Delay = 50
  Loop  
End Sub
See Also:
 

oDio16 - An Object that provides a 16-bit digital I/O.