Aardappeltaart
Posts: 168
Joined: Wed Mar 02, 2016 11:32 am

TV-HAT and pcm5102 DAC

Fri Dec 13, 2019 10:23 am

Can a TV-HAT be connected together with a PCM5102 DAC?

Connecting the pins on top of the TV-HAT, something like this:

SCK > GND
BCK > PIN 12 (GPIO18)
DIN > PIN 40 (GPIO21)
LRCK > PIN 35 (GPIO19)
GND > PIN 6 (GND) Ground
VIN > PIN 2 (5V)

See:
https://raspberrypi.stackexchange.com/q ... y-pi-zerow

Or is that simply impossible (e.g. using same interface)?

trejan
Posts: 4473
Joined: Tue Jul 02, 2019 2:28 pm

Re: TV-HAT and pcm5102 DAC

Fri Dec 13, 2019 1:21 pm

They don't conflict. The TV HAT uses SPI0 which is GPIO8, GPIO9, GPIO10 and GPIO11. The TV HAT ID EEPROM is on the usual GPIO0 and GPIO1 but can't share with another HAT ID EEPROM due to address clash. Your I2S DAC will need to be manually configured.

Aardappeltaart
Posts: 168
Joined: Wed Mar 02, 2016 11:32 am

Re: TV-HAT and pcm5102 DAC

Fri Dec 13, 2019 1:54 pm

Thank you.
Will try it out. :)

Already got the DAC working without TV-Hat.

Do not understand the HAT ID EEPROM issue completely, but I guess I figure that out.

trejan
Posts: 4473
Joined: Tue Jul 02, 2019 2:28 pm

Re: TV-HAT and pcm5102 DAC

Fri Dec 13, 2019 2:01 pm

Aardappeltaart wrote:
Fri Dec 13, 2019 1:54 pm
Do not understand the HAT ID EEPROM issue completely, but I guess I figure that out.
Proper HATs have an I2C EEPROM connected to the ID_SC and ID_SD pins on the GPIO header. The Pi firmware will read that EEPROM at startup and load the requested DT overlay so the user doesn't need to set up anything in config.txt. The EEPROM is at a fixed I2C address so you can't have two HATs stacked since both EEPROMs would be at the same address.

There is a special exception for the PoE HAT since that is stackable with another HAT.

Aardappeltaart
Posts: 168
Joined: Wed Mar 02, 2016 11:32 am

Re: TV-HAT and pcm5102 DAC

Wed Dec 18, 2019 10:36 am

@Trejan, thx for your explanation.

Now I need a stacking header and will try to get it connected.

Return to “HATs and other add-ons”