UART communication

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

cross mob
BhSa_4078721
Level 2
Level 2
10 replies posted 10 questions asked 5 replies posted

Hi,

I am using cy8c4025 axi-412

And trying to send out UART data on capsense button press..

On single touch only one time data should send on UART. Bt practically it sends data 3 to 4 times on single touch.

How can I limit this data to send for only one time.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Please note that you have to limit sending multiple times through UART in firmware.

Please find the attached document with two assignments and attached projects. Please check Assignment_1 which is similar to the case you mentioned.

Thanks and regards

Ganesh

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Please note that you have to limit sending multiple times through UART in firmware.

Please find the attached document with two assignments and attached projects. Please check Assignment_1 which is similar to the case you mentioned.

Thanks and regards

Ganesh

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

BhSa,

You need to create your own capsense 'switch' debouncing in your SW application.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi LePo_1062026​, BhSa_4078721

It is not "switch debounce". In this case, UART sends the data multiple times as CapSense is active for a long duration (multiple scan cycles) even when it is pressed for a short instance.

The solution recommended in post#1 is the way to go. CapSense does not suffer from debounce like mechanical buttons since the firmware takes care of this. There are parameters such as Hysteresis and debouce that are set in the component that make sure that debounce does not occur.

Thanks,
Hari

0 Likes

Hari,

The Capsense detect is a 'virtual' switch.  BhSa's complaint:

On single touch only one time data should send on UART. Bt practically it sends data 3 to 4 times on single touch.

How can I limit this data to send for only one time.

If the Application first sees the the CapSense 'switch' press the first time, it should send the output through the UART ... once.  As long as the Capsense on the 'switch' is still active, no more data is sent through the UART.   Once the Capsense 'switch press' is no longer active, then the internal variable is cleared to allow further 'switch presses'.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes