Connecting / Disconnecting bidirectional pins internally

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

cross mob
Anonymous
Not applicable

 Hey all,

   

I'm working on a project involving reverse-engineering a serial bus. I want to use my PSOC 4 to listen in on a bidirectional serial line (open drain, pulled high) when the two endpoints are communicating. Additionally, I want to be able to disconnect the two endpoints and listen to them separately.

   

My initial impression was that I would need to use external circuitry to cut and reconnect the physical line (with a bidirectional mosfet switch or SSR), but I'm wondering if there's a way to do this internally in the PSOC? (i.e, cut the serial line and connect the two ends to pins on the PSOC, then connect them internally).

   

Any advice on how to do this?

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The simplest thing would be an ANDgate controlled by a control register to cut the connection between an input and an output.

   

 Another solution is to use the output enable input for the bi-directional pins

   

 

   

Bob

0 Likes
Anonymous
Not applicable

The problem is that the signal is bidirectional, so both pins need to be able to drive the other low. If I try cross-coupling AND gates, it creates lateches. I don't think bidirectoinal pins have an output enable option.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This is a longshot. Right now optimizer, even when turned off, is

   

optimizing out all the Amuxes. I have filed a CASE just to see

   

what I am missing. The speed of the links is limited by the Comparator,

   

that has to be taken into consideration. Also speed is impacted by analog

   

mux series Rdson and stray C. The comp ref should be something like

   

Vdd / 2, just a  pair of equal Rs dividing off Vdd. Also mux Rdson must

   

be examined in light of pullups used on open drain inputs. eg. noise

   

margin.

   

 

   

Regards, Dana.

   

 

   

0 Likes
Anonymous
Not applicable

 Hmm, that's a really interesting solution. I had the same issue with Amux's getting optimized out in a previous project, so it's good to hear I'm not the only one experiencing this. I'll give it a shot when I get the chance.

   

 

   

Thanks again!

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I was thinking of not using a bi-directional pin, but a pin with input and output and an oe-signal. See attached

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Partial response from tech support -

   

 

   
The reason is because of the back to back de-mux and mux connected.
The attached simple project will help to understand the issue better.

Here Amux_1 is optimized since it soed not serve any puropse. No matter which channel is selected, Pin_2 data will go to Amux_2.

Since in your original project, all the inputs were demuxed and muxed, all the Amux busses were getting optimized.
   

I have asked tech support to take a further look.

   

.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

One way to prevent the optimization is to prevent using back to back AMUX buses.  You can connect the AMUX bus output and input to pins and short the pins externally. But the cost is more pins will be consumed.

   

-Keerthi

0 Likes