I'd like to use PSoC5 as a kind of "bridge". I want to route some pins with other pins. This is going to be a 1-to-1 connection. And it is going to be bi-directional. And the routing-map will be defined in runtime... (UPDATE: if it is not possible to do it in runtime, then "offline" is good too).
For clarification purposes, let's assume that I have 8 GPIOs: A1, A2, B1, B2, C1, C2, D1, D2. I'd like that A1 be routed to A2, B1 to B2... etc. But this info is not hardcoded. I should be able to change in runtime.
My questions are:
- What's the best way to achieve this? DSI?
- What's the maximum number of connections that I can do? Can I do a 28 x 28 routing-map?
[This is a follow up of this question: https://community.cypress.com/t5/PSoC-5-3-1-MCU/PSOC5LP-DSI-manual-routing-for-32x32-mux/td-p/183433 ]
And the follow up questions would be:
Remove the "runtime" requirement. If I have to do the mappings offline... would that change anything? Thanks!
If you don't need real-time hardware response, then it can probably be arranged using API Pin_Read / Pin_Write and some lookup table. Such table can be updated in real-time
Thanks. What do you mean a lookup table? I didn't get how to use it in my use case.
In any case, the response should be in real-time. It seems that one option is to create a component with NxN pins, and then assign them in Verilog. I tested it and it works.
Although not clear yet whether I can assign the pins in runtime yet.
...digital... Too bad. Analog bi-directionality with AMUX control is easier. (Analog has it's own issues.)
You can DMUX digital ins to digital outs with runtime switching changes.
The major issue is that you want bi-directionality. This is a BIG problem.
To achieve bi-directionality you need to control of the Output Enables (OE) for each of the outputs and synchronize it with your digital protocol.
Recommendation: The PSoC can provide DMUXing in one direction without too much problems. It can also provide bi-directionality control to much smaller number of GPIOs. (You'll run out of UDBs quickly).
There are commercially available bi-directional DMUX switches. This is probably your best and lowest-cost choice for larger matrixes. You can use the PSoC5 for control of the DMUX and other functions.
These commercial switches are used in ETHERNET switches, routers, Digital telephony equipment, etc...