Matte93
Posts: 1
Joined: Fri Sep 01, 2017 8:34 pm

Doubt on GPIO pins

Fri Sep 01, 2017 8:48 pm

Hello, I am thinking of making a compact and portable project by using a Raspberry pi Zero W but I am really new in this world and I haven't understood if I can solder more wires to a single GPIO pin (for example solder 2 wires to BCM21, one wire used by HyperPixel display and the other used by Speaker pHAT).

W. H. Heydt
Posts: 12785
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Doubt on GPIO pins

Sat Sep 02, 2017 12:33 am

What you are asking is if GPIO signal pins can be multiplexed. So far as i know, yes, but not that way.

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Doubt on GPIO pins

Sat Sep 02, 2017 12:43 am

I think this is what your asking. Can you attach 2 hats that use pin 21 (I assume you mean SPI0 MISO pin)

First you need to understand how SPI communication protocol works here's a good place to start https://learn.sparkfun.com/tutorials/se ... erface-spi

basically you can all multi SPI slave devices on to the 1 master SPI bus but each SPI device has tp have a different CS line to tell it that this coms is for it and that is what the pins 24 and 26 do.

So each hat will have the same MOSI, MISO and SCLK pins but it will have different CS pins then in the software that coms with the Hat you need to tell it which CS pin your using

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Doubt on GPIO pins

Sat Sep 02, 2017 6:18 am

Matte93 wrote:
Fri Sep 01, 2017 8:48 pm
I haven't understood if I can solder more wires to a single GPIO pin (for example solder 2 wires to BCM21, one wire used by HyperPixel display and the other used by Speaker pHAT).
In the case of Pimoroni's Hyperpixel the answer is simple: no.
That HAT uses all the GPIO and they cannot be used for other functions since they are all repurposed for non-standard functions.
That also means that I2C, SPI, etc are not available.
https://pinout.xyz/pinout/hyperpixel

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Doubt on GPIO pins

Sat Sep 02, 2017 6:58 am

I didn't realize that the hyper pixel was a DPI screen.

These DPI screen use all of the GPIO pins in order to get the really high data rate. The hyper pixel screen is 800x600 at 60 FPS that's a lot of data that is needed to be transferred 60 times every second.

U basically have 2 options.

If you need this type of resolution and refresh rate then look at using the HDMI port instead of DPI then you will free up all the GPIO pins except maybe for a touch screen will use some pins for touch (usually either I2C pins or SPI pins)

If you don't want to go to HDMI and use the GPIO pins then look at using a lower res screen at a lower refresh rate like a SPI 320x240 screen. Then you will only be using the SPI pins.

Return to “General discussion”