I am trying to build a zynthian using all the same items in the V2 kit, but instead of using the Hifiberry DAC+ I would like to use my Hifiberry Digi+ so that I have digital audio out.
The Pi won’t boot when everything is connected. I think that the Hifiberry Digi+ might be using the same GPIO pins as the all in one module.
Can anyone suggest how I might make this work? I am thinking that if I can configure the software to use alternate pins then I can make a custom cable to attach the module to the Pi.
Info from GPIO usage of HiFiBerry boards | HiFiBerry
[1] “GPIO2-3 (pins 3 and 5) are used by our products for configuration. If you are experienced with I2C, you might add other slave devices. If you a a novice, we don’t recommend this at all.”
[2] “On the HiFiBerry Digi+, GPIO16 is also reserved.”
Fork zyncoder and change the Pin definition on line 44 of zyncoder/zyncoder.c to a free pin - maybe 35 (GPIO 19) as I don’t think the screen uses this
Make a different cable which connects PIN 35 on the Digi+ to PIN 36 on the module, and doesn’t connect PIN 36 on the Digi+ to anything
Pins 30 and 34 are Ground and on the schematic seem to be connected to Pin 36. I will have to try to understand this and how this would affect using a different pin.
perhaps there is a address conflict on the I2C bus?
Hifiberry says for the Digi+: GPIO2-3 (pins 3 and 5) are used by our products for configuration. If you are experienced with I2C, you might add other slave devices. If you a a novice, we don’t recommend this at all.
This is not a problem as long as you don’t have an address conflict on the I2C bus. The MCP23017 on the AllInOne board seems to have 0x20 as address. I don’t know what address the Digi+ has. But you can try by starting without AllInOne and connect via ssh to your Raspberry. Then start i2cdetect -y 1 as root. If it reports also the 0x20 as address you have a problem. To solve it you have to solder a little bit (to give the MCP23017 a new address) and manipulate zyncoder.c (line 118).
@mheidt You will always have the problem to additionally setup the address (in hardware) on the AllInOne. Jumpers are needed for selecting the I2C address of the MCP23017. Perhaps a good idea for the next PCB revision/production.
Sorry, forget my last comment (i deleted it). I was using the WiringPi GPIO numbering convention, and it’s not the RBPi official convention, used by HifiBerry.
So you are right, the GPIO 16 is pin 36, used by the AllInOne circuit for MCP23017 interrupt A. This is a problem. In the next hardware revision i will add a “jumper” configuration, so you can choose a different pair of pins. Of course, you will have one for free, although i can’t tell you a date, i hope it will be not too late
Regarding the code, i will do the modifications for allowing the configuration of interrupt pins from the webconf.
I was totally confused by the pins and GPIOs too. In the code the pin numbers are used (WiringPi convention?), everywhere else refers to the GPIO numbers.
I have some breadboard wires so I will attempt to connect to another pin and change the code and see if I can get it booting.
Yes, zynthian code uses WiringPi GPIO numbering convention because we use this library for interfacing GPIO. It’s a mess to have 2 conventions … in the next refactoring i should change this.