I'm going to connect IR sensor to RPi B+. I need one
spare GPIO pin for that. Which GPIO pins are used
by Digi+?
Thanks.
Date
Votes
13 comments
-
HiFiBerry team here is the HAT configuration:
# GPIO FUNCTION PULL
# —- ——– —-
setgpio 2 ALT0 UP # I2C communication DAC chip
setgpio 3 ALT0 UP # I2C communication DAC chip
setgpio 6 INPUT DEFAULT # do not use, reserved for Master clock
setgpio 18 ALT0 DEFAULT # I2S
setgpio 19 ALT0 DEFAULT # I2S
setgpio 20 ALT0 DEFAULT # I2S
setgpio 21 ALT0 DEFAULT # I2S
That means, GPIO 2,3,6 and 18-21 are used.
Note that this are the GPIO numbers, NOT the pin numbers. These pins are used for the Digi+ and the DAC+
GPIO2 and 3 can be used also for other I2C devices, but not as general-purpose-IOs.
Keytomsart.com has a nice PDF with all the pins and the GPIOs assigned to them:
http://www.keytosmart.com/wp-content/uploads/2014/07/Raspberry-Pi-GPIO-Layout-Worksheet.pdf
Best regards
Daniel -
hifi Thank you Daniel, that's very helpful because I was going to use
GPIO #18 which is pin #12. That's because this pin was used in this
example: http://www.youtube.com/watch?v=QV_QmDKx0kQ -
luketheeduke I would be interested in using a raspberry as a controller for an i2s input, as a USB to SPDIF (via DIGI) interface and use a hifiberryDIGI as SPDIF output.
I have no experience with raspberry yet, but what i can tell from shematics and pictures is that the hifiberryDIGI module connects to the GPIO connector and blocks the P5 connectors which lead i2s input und and output signals.
So when i connect the module with a flex cable i could use the input connectors?
How about clock synchronization?
If i use i2s inputs with my ADC in masterclock mode, since raspberry has no clock, will there be any problems with jitter or is the output stage decoupled and gets its seperate clock from the DIGI?
Can i use the raspberry to send music via USB to SPDIF out? All it needs to do, is route the PCM Data to the DIGI...
As you can see i am kind of inexperienced but would love to be pointed in the right directions.
My goal is to connect an analog input via ADC to a SPDIF output and an USB to SPDIF interface in the mix. The raspberry is used to control volume and channel selection and maybe even play my two favorite internetradio stations. For Audio playback i prefer my Laptop with foobar, so no network media player thingy desired ;)
cheers from germany,
Lukas -
HiFiBerry team Dear Luke,
this wont work. You can't add another I2S input as the Digi already uses the I2S port. The Raspberr yPI has only a single I2S port and this is already used by the Digi. For an input you need to use an USB interface.
In general I would not recommend using I2S for people that do not have a lot of experience with it. Handling different frame formats, clocks,... is not easy and also the drivers have to be provided. Not a beginners project!
Best regards
Daniel -
luketheeduke Too bad. Believed that using a DIGI via GPIO i could use those additional P5 connectors as an input, but like i said, i don´t now much about raspberry.
Unfortunately theres no way to work around i2s, since i want to stay all digital and have volume adjustment in my "preamp". and from what i understand as long as i used fixed Fs (96Khz in my case) and one module as the clock master, it shouldn´t be that much of a problem.
Aren´t drivers only required if you want to use some controls on a module? -
matthew.sharp Dear Daniel,
Thank you for listing the GPIO pins used by the DAC+. Can I ask which pins the DAC+ uses for the 5v supply (2 or 4) and the ground? Also, does the DAC+ use any other pins (other than GPIO 2,3,6 and 18-21)
Many thanks
Matthew -
HiFiBerry team No other GPIOs are used, but +5V, +3.3V and ground are needed to power the board.
Best regards
Daniel -
matthew.sharp Daniel,
Thank you for this. Do you know which particular pins the DAC+ takes takes power from ie for 3.3V is it pin 1 or 17, and for 5V is it pin 2 or 4. Also, do you know which ground pin the DAC+ uses ie 6, 9, 14, 20, 25, 30 0r 34
Thank you,
Matthew -
HiFiBerry team Dear Matthew,
please connect all pins of the DAC+ to the Raspberry Pi. Is there any reason why you need to know the specific pins?
Best regards
Daniel -
matthew.sharp Yes. I'm connecting 1 other item to the GPIO headers (an LCD). The LCD requires a 5V supply. As there are two 5V supplies available on the Pi, I wanted to know which one isn't used by the DAC+. This will enable me to connect the LCD to this free 5V pin.
Thank you! -
HiFiBerry team Dear Matthew,
both are connected, but you can connect your circuit in paralle.
Best regards
Daniel -
janczol Hello,
I've just received my Hifiberry DAC+ for my Raspberry Pi2. Since I have many GPIO pins taken I connected it only to one 5v pin (pin No. 4) and one 3v3 pin (pin No. 17) and 2 ground pins (pin No. 20 and No. 39).
I connected also pins GPIO2,3,18-21 (pin No. 3,5,12,35,38,40) and IS_SD,ID_SC pins (pin No. 27,28).
Everything seems to be working fine. Output is very nice and clean.
Do I need to connect any more pins? May I damage Hifiberry if leave it connected like this?
Bartek -
HiFiBerry team If everything is working, you have all you need.
Best regards
Daniel
Please sign in to leave a comment.