7.1 DIO Description

The DIO application provides various operations on a DIO channel such as input byte, output byte, input bit, output bit, and DIO loopback. This section describes the input byte and output byte DIO operations. The DIO port must be configured in either input or output mode based on the DIO operation to be performed.

Output Byte:

  • Select Write a Byte to port option from main menu

  • Enter value 0-255 or q to quit

To set Port 0 all the pins to high except pin 3 and pin 7, run the DIO application and provide input as follows:

  • Select Write a Byte to port option from main menu : 4

  • Enter value 0-255 or q to quit : 119

The Byte value 119 is sent to port 0.

Measure the voltage on all pins of Port 0 using a multi-meter. They should show 3.3v on all the pins except pin 3 and pin 7, the application generated expected voltages.

Input Byte:

  • Select Read a Byte from port option from main menu:

  • Enter port number (0-2):

  • Press ENTER key to stop reading

Provide 3.3V to Port 0 pin 0 from VCC. It should read and display 0x01. To see the output, run the DIO application and provide input as follows:

  • Select Read a Byte from port option from main menu : 1

  • Enter port number (0-2) : 0

The application should show 0x01 on the screen.

Last updated