# cbOutByte()

Writes a byte to a hardware register on a board.

## Function Prototype

C/C++

int cbOutByte(int BoardNum, int PortNum, int PortVal)

Visual Basic

Function cbOutByte(ByVal BoardNum&, ByVal PortNum&, ByVal PortVal%) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

PortNum

Register within the board. Boards are set to a particular base address. The registers on the boards are at addresses that are offsets from the base address of the board (BaseAdr + 0, BaseAdr + 2, etc).

Set this argument to the offset for the desired register. This function takes care of adding the base address to the offset, so that the board's address can be changed without changing the code.

PortVal

Value that is written to the register.

## Returns

- Error code or 0 if no errors

## Notes

- cbOutByte() is used to write to 8 bit ports. cbOutWord() is used to write to 16-bit ports.
- This function was designed for use with ISA bus boards. Use with PCI bus boards is not recommended.