Blogs New entries New comments Blog list Search blogs. Groups Search groups. Log in Register. Search only containers. Search titles only. Search Advanced search…. New posts. Search forums. Log in. Install the app. Contact us. Close Menu. Welcome to EDAboard.
On their surface, GPIO configuration seems simple: pins are either input or output, and they can be high or low. This guide will help you understand the different pin configuration options that are provided on modern microcontrollers.
Most modern GPIO pins are implemented as a tri-state buffer. This means that the GPIO pin can effectively assume three values:. When a line is put into a high-impedance state, the output is effectively removed from the circuit. This allows multiple circuits or devices to share the same output lines and is commonly utilized to implement communication busses.
Pull-ups are resistors that connect a signal to VCC. Pull-ups are used to set a default state when the signal is floating. Recall that when an input pin is in high-impedance mode and not driven by external sources, it is floating at a residual voltage level.
Pull-up resistors prevent the pin from floating by forcing the signal to VCC when it is not being actively driven. Many microcontrollers supply internal pull-up configuration options. Pull-downs are resistors that connect an signal to ground. Pull-downs are used to set a default state when the signal is floating. Many microcontrollers supply internal pull-down configuration options.
For digital IO, a current sink provides the ground connection to the load. For digital IO, a current source provides the voltage source to the load. When a GPIO is configured as an input, it can be used to read the state of the electrical signal.
Configuring a GPIO as an input puts the pin into a high-impedance state. Onion Omega2 Documentation. You can use the omega2-ctrl tool to change the function of your pins.
The pins fall into two categories: Pins that must be floating at boot time. They cannot be pulled up or pulled down, or else the Omega cannot boot Pins that must be floating or pulled down at boot time. Will settle at digital low when boot is complete. Stable at Power-on-Reset value during boot. From the Command Line The command-line tool gpioctl comes pre-installed on your Omega. Using gpioctl There are 7 options associated with gpioctl. Will fluctuate around 2.
0コメント