cancel
Showing results for 
Search instead for 
Did you mean: 

Detect when GPIO pins are connected together

Chandrabose
Associate

When we generate the PWM pulse in all GPIOP's, if any of the 2 ports or more having interconnection, how to identify or recognize by using the PWM pulse? 

 

Chandrabose_0-1746635109752.png

 

7 REPLIES 7
TDK
Guru

Generally something like this is known from the schematic. It shouldn't be a mystery.

To see if pins are connected, set one of them to input mode with pulldown, set the other to output high, and see if the other one gets set high. This is not a perfect test but it will work if those pins are otherwise floating in the system. There's no need to use a pulse to do this.

If you feel a post has answered your question, please click "Accept as Solution".
Chandrabose
Associate

What I want is, from the master without sending the specific request of rotating the direction of ports, we should read the status of which are ports having the interconnections.

 

This makes no sense.

I think you need to give more context.

Explain what you're trying to achieve here.

Are you trying to make some sort of tester to look for connections/short-circuits ... ?

Remember that we know nothing at all about you or your project other than what you give in your post!

How to write your question to maximize your chances to find a solution.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Chandrabose
Associate

Yes, we are trying to do as continuity tester, where I can do the broadcast message sending to slaves to collect the status of short circuits...

Pin tester or board identifier would be my guess.

I'd want to avoid driving two pins connected together at different levels.

Would perhaps use OPEN DRAIN, PULLED HIGH identify all inputs that are HIGH, and then cycle thru setting one LOW and decimating the list, floating the original pin, and back-testing the others to affirm continuity.

Yeah, could probably do a one-to-many with inter-modulating PWM, but seems over kill, and depends on TIMx CHx connectivity to the pin(s)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Right. I'll edit the title to clarify.

So forget about microcontrollers to start with.

Just think about how you'd do this as just a basic electrical test - with a battery and a bulb or voltmeter.

Are you restricting yourself to just simple galvanic connections? ie, no semiconductors?

Are you restricting yourself to each pin only ever being connected to one other pin?

etc, etc, ...

 

There must be plenty of info out there on the interwebs - people have been making automated cable testers and continuity testers for decades ...

 

PS:

"Detecting when pins are connected together" is essentially what a keyboard scanner does to detect when keys are pressed ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Is this for a class project or a product?