Possible Change Phat Dac GPIO pins to allow Adafruit PITFT 3.5?


Hi all I have a PI2B V1.1 with the PITFT 3.5 which uses the GPIO18 what I am curious as to is if I an change pinout used on the PI to make it possible to run the PHAT DAC with this TFT for my currently running MPD and PianoBar console?
Can I just switch GPIO 18 to another pwm0 or pwm1 location?

My software: PiGuiPiano

LCD diagram: TFT3.5

pHAT Stack - My pile!

It sounds like your software wouldn’t particularly benefit from refined control of the PITFT backlight, so why not use the STMPE method? as I understand it will override the PWM output.

Other than that, both the pHAT DAC and PITFT use device tree overlays and while I’m not qualified to say for sure whether it would be impossible to modify them to redirect their function elsewhere, I’d say you’d be in for a treat.

Don’t let that put you off, but I thought it was worth noting that I think there might be an easier route, as long as you are happy with the compromise.


Actually I think that is the STMP method in use to turn on and off the light. I would have to backtrack and see now. It’s been some time since I wrote all this and set it up.
But than I would have to break that connection to the TFT “I suspect” as the PWM to the PHAT DAC would be sent to the LCD?

Thanks .


Works for sound without the disconnect of GPIO18 from the TFT but I get an error from any touch interaction might be my interaction sound from pygame though have to dig some.


Yes it is something to do with the pygame sound?

    def on_touch():
        #effect = pygame.mixer.Sound('beep2.ogg')


Seems the real issue is that I cannot get full duplex sound.

Or DAC will only play from on source. ie: PianoBar attaches to the DAC on boot and no other sources can connect.