Port I/O
| Library: | Input/Output |
| Introduced: | 4.0.0 |
| Appearance: |
|
Behavior
The Port I/O component models a group of general-purpose input/output (GPIO) pins, which can be configured for input, output, or bidirectional operation. Each pin in the block corresponds to its own square indicator, whose color displays the current logic value.
Depending on the value of the Port Direction attribute, the component operates in one of the following modes:
- Input: The component acts as a signal source for the circuit. The user can change the state of each pin by clicking on it with the Poke Tool. These states are output to the circuit.
- Output: The component receives signals from the circuit and displays them on the indicators.
- Bidirectional (shared OE): Bidirectional mode with a shared output enable signal. An additional 1-bit output enable (OE) input is present. When OE is 1, the component acts as an input for the circuit and forwards values coming from other sources on the bus. When OE is 0, the component acts as a transmitter and drives the bus with values set by the user using the Poke Tool.
- Bidirectional (bit-wise OE): Bidirectional mode with bit-wise direction control. A dedicated output enable bit is provided for each pin in a multi-bit control bus.
Pins (for a component facing East)
- West edge, top pin (input, bit width 1 or equal to number of pins):
- Output enable signal (OE / Out Enable). Only present in bidirectional modes. In shared OE mode, its bit width is 1; in bit-wise OE mode, the bit width matches the number of pins.
- West edge, middle pin (output, bit width equal to number of pins):
- Output pins from the component to the circuit (drive values to the circuit in Input mode or when OE is disabled in bidirectional modes).
- West edge, bottom pin (input, bit width equal to number of pins):
- Input pins to the component from the circuit (receive values from the circuit in Output mode or when OE is enabled in bidirectional modes).
Attributes
When the component is selected or being added, the arrow keys alter its Facing attribute.
- Facing
- Determines the side on which the component's pins are located.
- Number of Pins
- The number of pins in the I/O port (from 1 to 32).
- Port Direction
- Specifies the operation mode: Input, Output, Bidirectional (shared OE), or Bidirectional (bit-wise OE).
- Label, Label Location, Label Font, Label Color
- Configurations for the component's text label.
- Label Visible
- Determines whether the label is displayed.
Poke Tool Behavior
In input-capable modes ("Input" or bidirectional mode when output enable is disabled), clicking on a pin indicator cycles its value: 0 → 1 → high-impedance state (Z/X).
Text Tool Behavior
Allows the component's label to be edited.
Back to Library Reference