Jump to content

What can you connect to GPIO?

Edward78

Not wanting specifics just wanting to know if you can connect things like Sata controllers???

MSI Performance Gaming AMD Ryzen 1st and 2nd Gen AM4 M.2 USB 3 DDR4 HDMI Display Port Mini-ITX Motherboard (B450I Gaming Plus AC), AMD Ryzen 7 2700 4.1 GHz, TEAMGROUP T-Force Vulcan Z DDR4 16GB (2 x 8GB) 3200MHz (PC4 25600) Ram, EVGA GeForce RTX 3060 Ti XC Gaming, 08G-P5-3663-KL, 8GB GDDR6, Metal Backplate, LHR
Link to comment
Share on other sites

Link to post
Share on other sites

GPIO on what? Like a Raspberry Pi? The pinout for the GPIO on those is pretty well documented, just google it.

Desktop: i9 11900k, 32GB DDR4, 4060 Ti 8GB 馃檪

Link to comment
Share on other sites

Link to post
Share on other sites

It's in the name: General Purpose Input/Output. By default they're used for nothing, and the user can program them to do almost anything, limited by the hardware by which they are backed. In the case of a raspberry pi, for instance, there's no SATA controller or access to PCI Express in order to make SATA work properly. You'd be better off with a SATA-to-USB drive dock for that purpose.

Link to comment
Share on other sites

Link to post
Share on other sites

GPIO, as the name implies, is an input or output line. It can only have two states: on or off (for the electrically inclined, it's usually 0V to 3.3V or 5V). If configured as an output, the software running on the CPU has to tell it when to toggle it on or off. If configured as an input line, the software running on the CPU has to check it. In other words, it's a software controlled I/O line.

This is opposed to say a hardware UART, or a serial data interface. The most software does with it is configure the parameters and feed it data. The hardware in the UART will take care of transmitting the data or receiving the data (the software still has to read the data though).

You can connect anything to a GPIO line as long as you're aware of the following:

  • You have enough GPIO lines the interface needs (SATA needs at least 5 lines)
  • The GPIO lines can output or receive the correct voltage level.
  • You understand the protocol of the interface
  • The software can run fast enough to "bit bang" the signal. For more info on bit banging, see https://en.wikipedia.org/wiki/Bit_banging

But really, you should only use GPIO lines for simple I/O devices like LED lights or switches. You might be able to use them as a low speed UART/SPI/I2C bus, but if your CPU is too slow, then it won't work.

Edited by M.Yurizaki
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now