4 Replies Latest reply on Jun 23, 2020 4:32 AM by LePo_1062026

    UART communication

    BhSa_4078721

      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.

        • 1. Re: UART communication
          GaneshD_41

          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

          • 2. Re: UART communication
            LePo_1062026

            BhSa,

             

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

             

            Len

            • 3. Re: UART communication
              AH_96

              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

              • 4. Re: UART communication
                LePo_1062026

                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