- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ganash, It works. Thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested with resistor. 10ohm is good to detect but not more than 10.