Hi all,

I am building my own multiplexer capelet using 7 CD4051 ic's. 6 of the 4051's will have sensors hooked up to them. Those outputs are send to 1 'master' 4051. Then the output of the master will be send to Bela trough a single analog in. I am using Pure Data for this project so I am using the multiplexer-capelet PD patch as a basis. I have p8 pins 43, 45 and 46 hooked up to channel select switches of the 6 4051's. When I hook up the outputs of the 6 4051's to analog ins 0 trough 5 everything seems to work fine. Now I want to feed them trough the master ic and receive them using the ouput of the master ic. Can you give me some tips on how to proceed?

I am wondering which output pins on the bela I should use to switch channels on the master ic. And how can I find out at what rate the 43, 45 and 46 pins are being switched so I can update the master ic accordingly? Any insight into how the multiplexer capelet does all this is welcome.

Thanks in advance and greetings! 😊

    alt text

    I am using this configuration, only then on a Bela and not an Arduino.

    Why do you need a "master" 4051? Are you trying to use only one analog input? If you depart from the design of the capelet (which can be found here), then the software as it is will not work.

    TimdeWilde And how can I find out at what rate the 43, 45 and 46 pins are being switched so I can update the master ic accordingly?

    Well, the code that does that is pretty cryptic and can be found at these lines here (assuming you are using a CTAG). The easiest way is to check the pins with a scope. It is also dependent on what settings you have enabled on the muxer capelet.

      giuliomoro Yes The goal is to use only one analog input. In the IDE I have 64 channels selected.
      What would be the best way to alter the code to make it possible to receive all signals trough 1 analog in?

      Thank you.

      Check with a scope the clock channels: do you see a way how you could reuse the existing signals for your purpose? If not, you'll have to modify the lines I pointed you to.