Hello,

since the Multiplexer Capelet is not working for the Bela Mini, i've to develop my ow solution.
And honestly...I have absolutely no clue. Sure, programming a 4051 based multiplexer in C is not the a problem, but in Pure data I am lost.

Is someone willing to push me into the right direction?
PS: I need 16 additional Inputs 🙂

Cheers
Marcus


You should be using some of the digital outputs to drive the binary counter. The issue will be finding out the right timing between when you change the multiplexed input and when it gets sampled. You may have to discard the first of the analog input readings after the multiplexer has been changed because it could be corrupted. In all fairness the easiest way would be to use the existing PRU (the microcontroller that does I/O for Bela and normally drives the 4051), and make a couple of changes to it. There are a couple of changes to do there that I will have to tell you about, but it can be done with no big deal.

  • Korb replied to this.

    giuliomoro In all fairness the easiest way would be to use the existing PRU (the microcontroller that does I/O for Bela and normally drives the 4051), and make a couple of changes to it.

    I very like this idea,

    giuliomoro There are a couple of changes to do there that I will have to tell you about, but it can be done with no big deal.

    That would be awesome 🙂

    I have some Arduino/Teensy skills, not sure if it's helpful in this case.

    5 days later

    next week I should be able to give you some code!

    15 days later

    No problem, I don't want to put any pressure on you. Take your time, I've so many other projects 🙂

    ok, the changes are now in the bela-mini-mux branch: https://github.com/BelaPlatform/Bela/tree/bela-mini-mux

    You can either update your board to that release (see "Updating to an experimental release" here), or simply apply those changes to the code you have on the board .

    You need to run config-pin P1.30 pruout; config-pin P1.32 pruout on your board after every reboot for this to work. If it works ok for you, we can then see how to automate this so you don't have to do it at every reboot.

    5 months later

    Is the mini-mux branch planned to enter the master at some point soon?

    And surely, as a 4051 only gets us 8 channels muxed, this branch is about 8-channel muxing or is it working independently from the chip used for muxing?

    Just asking. Thank you!

      jayrope Is the mini-mux branch planned to enter the master at some point soon?

      Someone will have to test that it works first! Once it's confirmed it works it shouldn't be complicated to mainline it, although it will probably require to manually edit one lime in the file to enable it.

      jayrope And surely, as a 4051 only gets us 8 channels muxed, this branch is about 8-channel muxing or is it working independently from the chip used for muxing?

      The code uses some of the pins on BelaMini to drive a binary counter, the same way it would happen on a Bela when using the multiplexer capelet. Then it's up to you to connect as many 4051 as you need, possibly copying the relevant parts of the schematics of the multiplexer capelet

        That is awesome! You should be enjoying your personal life on a Sunday evening! Thank you for being so THERE!

          jayrope You should be enjoying your personal life on a Sunday evening!

          making pizza, answering while waiting for the oven to be ready. It was as easy as

          git checkout bela-mini-mux
          git rebase master
          git push --force

          😛

            giuliomoro That was for me just a reminder, that i shoudl get a code repository myself. But i mainly speak PD, PHP, CSS, MySQL and my voice in audibly 2+ 1/2 languages 🙂 Enjoy the pizza!

            Almost ready. We just took the focaccia out of the oven, really good!