ButtonSw32: button switch debouncer component

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.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Hi,

Provided below is custom implementation of the button switch debouncer component (ButtonSw32). The component uses vertical stack counters algorithm to detect button pressed and released events, and can simultaneously process up to 32 switches without loss of performance.

Component can be useful whenever a simple button switch event need to be detected by PSoC with high reliability, such as control switches, panel-mounted momentary buttons, mechanical joysticks, etc. Component is useful when PSoC hardware debouncing is not justified for handling simple switch button, or for a system with limited hardware resources, such as PSoC4.

The component was tested using CY8KIT-059 PSoC5 prototyping kit and CY8KIT-042 PSoC4 Pioneer Board. Several demo projects are provided alongside the Application Note.

Component major features:

      Implements vertical counters algorithm.

      Detects button pressed and released events.

      Detects simultaneously up to 32 buttons.

      Does not consume hardware resources.

Attached archive contains component library, component datasheet and several demo projects for PSoC5 and PSoC4. Please read installation instructions in the readme.txt.

The component provided as-is, no liabilities. It is free to use and modify.

regards,

odissey1

Screenshot_1.png

ButtonSw_basic_1b.png

=============================================================================

=============================================================================

P.S. Another useful component for HMI can be found here:

Quad Decoder with Button Switch component for rotary shaft encoders

encoder_01b.png

4 Replies
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello odissey1,

cool component, many thanks for that.

In the component datasheet, how did you create the timing diagrams? On a first look I thought it was InkScape with TimeInk extension, but I doubt that this is true.

Regards

0 Likes

Ralf,

They are more like a "handmade". A numerical table was manually created in IgorPro, plotted and exported as metafile. Quite tedious and error-prone.

/odissey1

0 Likes
jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

this is such a good idea! thanks for sharing!!

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

You are welcome. 

/odissey1

0 Likes