0

I'm new to the world of GPIO pins and I have 2 HATs that both want access to GPIO 18.

As this is an output pin can you share it between 2 HATS without side effects?

3
  • You will probably get side effects. What HATS are they and what are they using pin18 for? pinout.xyz/pinout/pin12_gpio18
    – CoderMike
    Apr 25, 2021 at 13:36
  • HATs are not stackable. What are you trying to achieve?
    – Dougie
    Apr 25, 2021 at 17:36
  • This is what I have found about GPIO 18 pinout.xyz/pinout/pin12_gpio18 It says it's the PCM Clock. I'm assuming as an ex assembler hacker that if it's a clock it's probably read only but I was wondering if 2 wires coming off could affect the accuracy? The two cards I'm trying to stack are a Respeker mic array and a UPS board. I reckon the mic array is using the PCM clock for bog standard sound manipulation which needs an accurate hardware clock and the other to manage UHART coms on GPIO pins 14 and 15 Apr 28, 2021 at 21:28

2 Answers 2

1

Given the level of detail in your question, the answer is "probably not". That would require one HAT have intimate knowledge of how the other HAT was using the pin, and that the developers were clever enough to avoid conflict.

0

I was in similar situation: my DAC HAT was operating on non-configurable GPIO PIN (PCM) and then I needed to install a fan that was coming with the script using the same pin. Fortunately, the fan script was open source and I was able to change the configuration in it to use another pin and then I reconnected the fan to the new pin. Sometimes you might not be so lucky - in example the HAT has hardcoded pin and you cannot change neither its configuration nor even the physical connection.

1
  • great point about the source code, I shall take a look thanks. Apr 28, 2021 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.