GPIO
Last updated
Last updated
When the user selects from the Navigation Menu, the GPIO (General-Purpose Input/Output) command panel shows up.
For GPIO, there are five potential configurations for a pin: Analog Input (AIN), Analog Output (AOUT), Pulse Width Modulation (PWM), Digital Input (DIN), and Digital Output (DOUT). The table below delineates the capabilities for each Binho Nova IO pin.
IO0
X
X
X
X
IO1
X
X
X
X
IO2
X
X
X
X
IO3
X
X
X
X
IO4
X
X
X
X
Notes:
Analog Input (AIN): When a pin is set to AIN, a READ button appears. Pressing this button prompts the host adapter to gauge the pin's voltage, displaying the result in the Transactions Log View.
Digital Input (DIN): Pins configured as DIN behave similarly to AIN. However, the measurement is binary, indicating either a Low or High value.
Analog and Digital Output (AOUT/DOUT): For these output configurations, a WRITE button accompanied by a textbox is presented. For AOUT, users can input a voltage value ranging from 0.0 V to 3.3 V. For DOUT, this textbox transforms into a dropdown list, offering either Low or High options.
Pulse Width Modulation (PWM): Pins with PWM capabilities allow users to modify both the duty cycle and frequency. Frequency can be adjusted from 750Hz to 80kHz via the provided textbox, while the duty cycle ranges from 0% to 100% (integer values only). It's important to note that IO0 and IO2 share a frequency setting, as do IO3 and IO4. Adjusting the frequency for one channel will also alter its corresponding channel.
To better understand the user interface, let's walk through a simple example using the simulator:
An analog READ operation on the IO0 pin yielded a result of 0.0 V.
An analog WRITE operation was performed on the IO1 pin, setting its value to 1.0 V.
A PWM WRITE was executed on the IO2 pin, with a frequency of 1950 Hz and a duty cycle set at 75%.
A digital READ operation on the IO3 pin returned a value of High.
A digital WRITE operation was conducted on the IO4 pin, selecting a Low value.
For all protocols, both READ and WRITE operations log their results in the Transactions Log.