Input pin configuration

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

cross mob
lock attach
Attachments are accessible only for community members.
SuCh_2227511
Level 3
Level 3
First like received First like given

I want to detect 3.5mm jack for serial communication as below.

T (tip) and R (ring) are used for UART. R is the reference voltage for UART, which is connected to Vdd. T is data line.

Also Pin_UART is connected to Ring switch to detect the jack insertion. My idea is the pin becomes HIGH when jack is not but LOW with the jack.

As I implement this function in CYBLE 022001-00, the idea is not working. The pin shows always HIGH.

I am wondering my pin configuration is right for this case.

I attached simple code as a model. Please advice. thanks.

Jack detection.png

0 Likes
1 Solution

Hi,

I understood your requirement. You can do the following:

1. Place a series resistance with VDD.

2. Configure the pin with drive mode as "Strong Drive" and Initial Drive state as Low(0).

Thanks

Ganesh

View solution in original post

0 Likes
5 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Please change the pin drive mode to "Resistive pull up" and check once. Hopefully this should work.

Also we do not recommend connecting the pin directly to VDD. You can put a series resistance in series with VDD and put a switch in path to ground (pressing switch should connect pin to ground). Then you can configure the pin as resistive pull-up with Initial drive mode high(1).

Thanks

Ganesh

0 Likes

Ganesh,

"Resistive pull up" and set initial state "HIGH" is the normal way for input pin to put in the ground. Also thanks for the comment for the resistor in series.

However T (tip) and R (ring) are used for UART. R should be the reference voltage for UART, which is connected to Vdd for this reason. T is data line. So such the normal input input setup doesn't work in this case.

0 Likes

Hi,

I understood your requirement. You can do the following:

1. Place a series resistance with VDD.

2. Configure the pin with drive mode as "Strong Drive" and Initial Drive state as Low(0).

Thanks

Ganesh

0 Likes

Ganash, It works. Thank you so much.

0 Likes

I tested with resistor. 10ohm is good to detect but not more than 10.

0 Likes