# DConfigPort()

Configures a digital port as input or output.

This method is for use with ports that may be programmed as input or output, such as those on the 82C55 chips and 8536 chips. Refer to the board's hardware User Guide for details of chip operation.

Refer to the Digital Input / Output Hardware topic for additional details on using the UL digital I/O methods.

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function DConfigPort(ByVal portType As MccDaq.DigitalPortType, ByVal direction As MccDaq.DigitalPortDirection) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo DConfigPort(MccDaq.DigitalPortType portType, MccDaq.DigitalPortDirection direction)

## Parameters

portType

The specified port must be configurable. For most boards, AuxPort is not configurable; check the board-specific information in the Universal Library User's Guide for details.

direction

MccDaq.DigitalPortDirection.DigitalOut or MccDaq.DigitalPortDirection.DigitalIn configures the entire eight-bit or four-bit port for output or input, respectively.

## Returns

- An ErrorInfo object that indicates the status of the operation.

## Note

- When used on ports within an 8255 chip, this method will reset all ports on that chip configured for output to a zero state. This means that if you set an output value on FirstPortA and then change the configuration on FirstPortB from Output to Input, the output value at FirstPortA will be all zeros. You can, however, set the configuration on SecondPortx without affecting the value at FirstPortA. For this reason, this method is usually called at the beginning of the program for each port requiring configuration.