PSoC5LP: Split and Recombine Bus Lines in PSoC Hardware?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KyTr_1955226
Level 6
Level 6
250 sign-ins 10 likes given 50 solutions authored

Hi there,

I have a question regarding the re-routing of lines in a bus.

I have a bus of 12 buttons inputs coming into a debouncer.  In certain configurations, I want to use the bottom 5 button lines for a Rotary Encoder and other discrete control signals.

I figured through multiplexing those bottom 5 lines of the bus, I could switch them at runtime to whichever configuration I want, but I'm running into some problems making it happen in PSoC Creator.

My schematic is as follows:

pastedImage_2.png

The idea is that I can use KPD_MUXCTRL to select if any of the debounced inputs are passed through as a button input, or if it is routed to other components, with a logic 1 (key unpressed) being passed through to the keypad status registers.

This design unfortunately does not work, giving the errors:

pastedImage_1.png

So obviously there are a few quirks when it comes to connecting wire busses to one another in this way.  I feel like this should be doable, I'm just missing it.

Is there a way to accomplish what I am looking to do for this design?

Thanks for the help!

0 Likes
1 Solution
4 Replies

Oh wow perfect, thank you!

pastedImage_0.png

Implementing that component looks to have been exactly what I needed.  At least, the fitter errors are completely gone (hopefully it's working as intended) and I can build the project.

Out of curiosity,  what would the solution be (if there is one) without The Dummy using only stock components?

0 Likes

maybe so?
I'm not sure, but the compiler should optimize and remove components NOT
BUS.jpgBUS1.jpg

odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

KyTr,

Since you are looking into button and rotary encoder inputs, you may find these two components useful, which can save some hardware logic:

ButtonSw32: button switch debouncer component

ButtonSw_basic_1b.png

and

Quad Decoder with Button Switch component for rotary shaft encoders

encoder_01b.png

/odissey1

0 Likes