cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

kemic_264446
New Contributor II
        I should know how to do this, but for some reason I have a mental block. I have a very basic project, with two digital input pins and a debouncer. The pins component is set to have 2 pins. The debouncer is set to a signal width of 2. The Pins component shows 2 separate connections for the pins. 0 and 1. The debouncer input shows as a bus d[1:0] The question is, how do I connect the 2 pins to the debouncer inputs? If I draw a wire out from the debouncer inputs it correctly shows as being a bus with indexes from 1 to 0. If I draw a wire out from one of the pins is correctly shows as a wire. (Width is 1). When I try to connect the wire to the bus it immediately changes back to being a single wire. I just can't remember how to connect a wire to a specific index in the bus. Help anyone? My really basic project is attached.   
0 Likes
Reply
11 Replies
Anonymous
Not applicable
        Here it is.   
0 Likes
Reply
kemic_264446
New Contributor II

 Yes - thanks.

   

That shows how to convert the pins component to show as a bus, and is a good solution in my case.

   

But what if I wanted to connect outputs from two different things to a bus - how do I connect a wire to a specific index on a bus?

0 Likes
Reply
JoMe_264151
Expert II

Difficult to explain in words:

   

1st: connect the wanted signal to the bus.

   

2nd: edit the signal (double click) and specify which bit of the bus it should be connected to.

   

 

   

That's all

   

 

   

Bob

0 Likes
Reply
JoMe_264151
Expert II

Here's a picture of the dialog

   

 

   

Bob

0 Likes
Reply
HeLi_263931
Honored Contributor II
        This is btw. covered in detail in the online help (Help/Topics, then 'Using Design Entry Tools' / 'Schematic Editor' / 'Drawing Busses'). Don't forget to deselect 'Specify Full name' in the connect wire, otherwise you will change the whole wire.   
0 Likes
Reply
Anonymous
Not applicable
        Next is this.   
0 Likes
Reply
kemic_264446
New Contributor II

 Hi Bob,

   

 

   

Thanks - that's what I thought and I'm sure that's how I remembered doing it in the past.

   

Take a look at the attached project. (Updated from 1st post)

   

I have 2 switches, which are on a bus, connected to a debouncer which has a width of 2.

   

The output of the debouncer is again a bus, with a width of 2 and I wish to connect it to the 2 ISRs.

   

As soon as I connect it to either if the ISRs the entire bus becomes a single wire again. I must have forgotten a step somewhere.

0 Likes
Reply
kemic_264446
New Contributor II

 OK I got it to work, but it's a bit non-obvious.

   

I drew the bus first, conneted the two ISRs - which immediately changed the bus back to a wire, and then set the name-and-width of each wire, and finally set the name-and-width of the bus back to being a bus again.

0 Likes
Reply
Anonymous
Not applicable
        Nevertheless, I'm not sure. Try to test actually. It's like Bus-Tap on the CPLD or FPGA.   
0 Likes
Reply
Anonymous
Not applicable
        Is it OK? I'm quite not sure, Need actual test.   
0 Likes
Reply
kemic_264446
New Contributor II

 The wires and bus need to have the same base name.

   

I've got this working now 🙂

   

Maybe in a future edition of Creator if you drag a wire to bus it could prompt you for the index, and automatically rename the wire. That'd be neat and in fact that is what the Eagle schematic editor does.

   

 

   

Thanks to everyone for their help.

0 Likes
Reply