You may use some digital MUXes to connect your inputs to the Quad-decoder.
When the selection of the pins is static (depending on the machine connected to) you may use a virtual MUX.
Routing pins to components can be done by setting the appropriate registers, but I would not do that (shudder).
Mux.cyprj_.Archive01.zip 23.4 K
The PRoC BLE I am using doesnt contain any Muxes unfortunately.
So I will need to switch to PSoC BLE or do it a different way.
I looked at Register TRM, looks like even register based routing very limited
to AMUX buss selection.
Actually analog mux bus register routing on PRoC or PSoC is not a problem. The "analog" view on both shows the registers involved. There is simply a register setting to connect each bit to the bus or not. The two busses are split into two sections and there are 2 settings which need to be made to join both sections together. PRoC doesnt allow you to place an analog mux on the schematic but that doesnt really matter as its not necessary, it still shows it in the analog view. PSoC does allow placement and generates code for connecting each port to the mux, but the code it generates is pretty inefficient as it disconnects and reconnects the bus split for each bit and simply uses a "case" statement with code for each port rather than calculating the registers to be changed.
The problem comes with digital routing. The configuration is not repeatable, if you change one setting a whole lot of registers change. There are no clearly defined routing paths which can be enabled/disabled as on PSoC 1. I had thought it would be possible to switch between 2 or 3 configurations by saving the config in the Cyfitter.C file each time after manually configuring, but even this doesnt appear to work. I have not pursued this any further.