# Title: 2x2 Key Click Board™ ## Description: DEBOUNCE CIRCUIT In electronics, two metal components tend to bounce or create multiple signals when they are in contact with each other — like when you push a button — before they get to a stable state. You want a single contact to be recorded, but the microcontroller records this as if you pressed the button many times. So debouncing is, as the name states, the removal of bounces or spikes of low and high voltages. Graphically speaking, you want a clean line, not spikes. A debounce circuit makes sure that there are no voltage changes on the output. Thanks to it, one button press is recorded as such. INTERRUPT SERVICE ROUTINE All four Schmitt-trigger outputs are connected to input pins of the logic OR gate 74HC32, whose output is directly connected to the INT pin on mikroBUS. This pin is used to signalize an interrupt to the MCU any time a button is pressed. In this way, the MCU software can be implemented as a simple polling routine, without any delays programmed in the code (like it would be necessary if there wasn't a hardware debouncing circuit present). Thanks to the INT pin you can easily program a common interrupt service routine, in order to detect when a button is pressed (the state of the button changes from low to high logic level). SPECIFICATIONS Type Pushbutton/Switches Applications Human machine interface applications On-board modules 74HC32 quad 2-input OR gate from NXP and the SN74HC14 Hex Schmitt-Trigger Inverter from Texas Instruments Key Features 74HC32 quad 2-input OR gate, SN74HC14 Hex Schmitt-Trigger Inverte Interface GPIO Compatibility mikroBUS Click board size M (42.9 x 25.4 mm) Input Voltage 3.3V or 5V ADDITIONAL INFORMATION J2 is the interrupt enable pin (by default it is in the enable status). J1 is the power selection pin. PINOUT DIAGRAM This table shows how the pinout on 2x2 Key click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns). Notes Pin Pin Notes When button T1 is pressed the pin is active T1-OUT 1 AN PWM 16 T4-OUT When button T4 is pressed the pin is active When button T2 is pressed the pin is active T2-OUT 2 RST INT 15 TINT Interrupt pin that notifies the MCU that a button is pressed When button T3 is pressed the pin is active T3-OUT 3 CS TX 14 NC NC 4 SCK RX 13 NC NC 5 MISO SCL 12 NC NC 6 MOSI SDA 11 NC Power supply +3.3V 7 3.3V 5V 10 +5V Power supply Ground GND 8 GND GND 9 GND Ground ## Product type: Click Board ## Vendor: Mikroelektronika d.o.o. ## Tags: Click Board, HMI, MikroE, Switch ## Price range: 7.7 - 7.7 GBP ## Link: https://thedebugstore.com/products/mikroe-2152-2x2-key-click-board-uk ## Compare-at price range: 11.0 - 11.0 GBP ## Options - Title: Default Title ## Collections - [New Products](https://thedebugstore.com/a/llms/collections/new-products-debug-store) - [Mikroelektronika d.o.o. (MikroE)](https://thedebugstore.com/a/llms/collections/mikroelektronika-catalogue-uk) - [HMI Interface Click Boards™](https://thedebugstore.com/a/llms/collections/hmi-interface-click-boards-catalogue-uk) - [MikroE Click Boards™](https://thedebugstore.com/a/llms/collections/mikroe-click-boards-catalogue-uk) - [Google Shopping - invalid product](https://thedebugstore.com/a/llms/collections/google-shopping-valid-products) - [Pushbutton/Switch Click Boards™](https://thedebugstore.com/a/llms/collections/pushbutton-switch-click-boards-catalogue) - [Click Boards™ Summer Sale](https://thedebugstore.com/a/llms/collections/inventory-sale) - [MikroE Sale](https://thedebugstore.com/a/llms/collections/mikroe-sale) - [MIKROE Stock](https://thedebugstore.com/a/llms/collections/mikroe-products-in-stock-sale) ## Variants - Default Title, SKU: MIKROE-2152, Available: yes, Inventory: 1 ## Metafields - full_description:
In electronics, two metal components tend to bounce or create multiple signals when they are in contact with each other — like when you push a button — before they get to a stable state. You want a single contact to be recorded, but the microcontroller records this as if you pressed the button many times.
So debouncing is, as the name states, the removal of bounces or spikes of low and high voltages. Graphically speaking, you want a clean line, not spikes. A debounce circuit makes sure that there are no voltage changes on the output. Thanks to it, one button press is recorded as such.
All four Schmitt-trigger outputs are connected to input pins of the logic OR gate 74HC32, whose output is directly connected to the INT pin on mikroBUS. This pin is used to signalize an interrupt to the MCU any time a button is pressed.
In this way, the MCU software can be implemented as a simple polling routine, without any delays programmed in the code (like it would be necessary if there wasn't a hardware debouncing circuit present).
Thanks to the INT pin you can easily program a common interrupt service routine, in order to detect when a button is pressed (the state of the button changes from low to high logic level).
| Type | Pushbutton/Switches |
| Applications | Human machine interface applications |
| On-board modules | 74HC32 quad 2-input OR gate from NXP and the SN74HC14 Hex Schmitt-Trigger Inverter from Texas Instruments |
| Key Features | 74HC32 quad 2-input OR gate, SN74HC14 Hex Schmitt-Trigger Inverte |
| Interface | GPIO |
| Compatibility | mikroBUS |
| Click board size | M (42.9 x 25.4 mm) |
| Input Voltage | 3.3V or 5V |
This table shows how the pinout on 2x2 Key click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
| Notes | Pin | ![]() |
Pin | Notes | |||
|---|---|---|---|---|---|---|---|
| When button T1 is pressed the pin is active | T1-OUT | 1 | AN | PWM | 16 | T4-OUT | When button T4 is pressed the pin is active |
| When button T2 is pressed the pin is active | T2-OUT | 2 | RST | INT | 15 | TINT | Interrupt pin that notifies the MCU that a button is pressed |
| When button T3 is pressed the pin is active | T3-OUT | 3 | CS | TX | 14 | NC | |
| NC | 4 | SCK | RX | 13 | NC | ||
| NC | 5 | MISO | SCL | 12 | NC | ||
| NC | 6 | MOSI | SDA | 11 | NC | ||
| Power supply | +3.3V | 7 | 3.3V | 5V | 10 | +5V | Power supply |
| Ground | GND | 8 | GND | GND | 9 | GND | Ground |
The 2x2 Key Switch Click Board™ has a 4 button keypad. The Click Board™ allows multiple key presses and has a debounce circuit composed of 74HC32 quad 2-input OR gate from NXP and the SN74HC14 Hex Schmitt-Trigger Inverter from Texas Instruments. 2x2 Key Click Board™ is designed to use either 3.3V or 5V power supply. The buttons can be independently read.
- amazon_main_image: https://www.thedebugstore.com/images/product/lg-2x2-key-click-2152-front_1.jpg - amazon_other_image_1: https://www.thedebugstore.com/images/product/lg-2x2-key-click-2152-back_1.jpg - amazon_other_image_2: https://www.thedebugstore.com/images/product/lg-2x2-key-click-2152-in-use_1.jpg - amazon_browse_node: 428655031 - mpn: MIKROE-2152 - backorder_label: If no stock shown above, check availability - badge: - widget:The demo initialises the TFT display and sets pins to operate in input direction. The main function of the demo uses the polling method to check if inputs are on an active level. The TFT display shows the button state according to detect level.
1 void main()
2 {
3 system_init();
4
5 Draw_Taster(X1, Y1, RELEASED, "T1");
6 Draw_Taster(X2, Y1, RELEASED, "T2");
7 Draw_Taster(X1, Y2, RELEASED, "T3");
8 Draw_Taster(X2, Y2, RELEASED, "T4");
9
10 while(1)
11 {
12 if(Taster_Pressed(TAST1, &t1_state))
13 Draw_Taster(X1, Y1, PRESSED, "T1");
14
15 if(Taster_Released(TAST1, &t1_state))
16 Draw_Taster(X1, Y1, RELEASED, "T1");
17
18 if(Taster_Pressed(TAST2, &t2_state))
19 Draw_Taster(X2, Y1, PRESSED, "T2");
20
21 if(Taster_Released(TAST2, &t2_state))
22 Draw_Taster(X2, Y1, RELEASED, "T2");
23
24 if(Taster_Pressed(TAST3, &t3_state))
25 Draw_Taster(X1, Y2, PRESSED, "T3");
26
27 if(Taster_Released(TAST3, &t3_state))
28 Draw_Taster(X1, Y2, RELEASED, "T3");
29
30 if(Taster_Pressed(TAST4, &t4_state))
31 Draw_Taster(X2, Y2, PRESSED, "T4");
32
33 if(Taster_Released(TAST4, &t4_state))
34 Draw_Taster(X2, Y2, RELEASED, "T4");
35
36 t1_state = TAST1;
37 t2_state = TAST2;
38 t3_state = TAST3;
39 t4_state = TAST4;
40
41 Delay_ms(POLLING_PERIOD);
42 }
43 }
The 2x2 Key Switch Click Board™ has a 4 button keypad. The Click Board™ allows multiple key presses and has a debounce circuit composed of 74HC32 quad 2-input OR gate from NXP and the SN74HC14 Hex Schmitt-Trigger Inverter from Texas Instruments. 2x2 Key Click Board™ is designed to use either a 3.3V or 5V power supply. The buttons can be independently read.
- target_keyword: 2x2 Key Click Board - brands: gid://shopify/Metaobject/56256004319 - breadcrumbs: ["gid://shopify/Collection/447955239135","gid://shopify/Collection/241680580797","gid://shopify/Collection/241545019581"] - customhs_code: 847330 - detailed_description: {"type":"root","children":[{"type":"heading","level":3,"children":[{"type":"text","value":"DEBOUNCE CIRCUIT"}]},{"type":"paragraph","children":[{"type":"text","value":"In electronics, two metal components tend to bounce or create multiple signals when they are in contact with each other — like when you push a button — before they get to a stable state. You want a single contact to be recorded, but the microcontroller records this as if you pressed the button many times."}]},{"type":"paragraph","children":[{"type":"text","value":"So debouncing is, as the name states, the removal of bounces or spikes of low and high voltages. Graphically speaking, you want a clean line, not spikes. A debounce circuit makes sure that there are no voltage changes on the output. Thanks to it, one button press is recorded as such."}]},{"type":"heading","level":3,"children":[{"type":"text","value":"INTERRUPT SERVICE ROUTINE"}]},{"type":"paragraph","children":[{"type":"text","value":"All four Schmitt-trigger outputs are connected to input pins of the logic OR gate 74HC32, whose output is directly connected to the INT pin on mikroBUS. This pin is used to signalize an interrupt to the MCU any time a button is pressed."}]},{"type":"paragraph","children":[{"type":"text","value":"In this way, the MCU software can be implemented as a simple polling routine, without any delays programmed in the code (like it would be necessary if there wasn't a hardware debouncing circuit present)."}]},{"type":"paragraph","children":[{"type":"text","value":"Thanks to the INT pin you can easily program a common interrupt service routine, in order to detect when a button is pressed (the state of the button changes from low to high logic level)."}]},{"type":"heading","level":3,"children":[{"type":"text","value":"SPECIFICATIONS"}]},{"type":"paragraph","children":[{"type":"text","value":"Type\nPushbutton/Switches\nApplications\nHuman machine interface applications\nOn-board modules\n74HC32 quad 2-input OR gate from NXP and the SN74HC14 Hex Schmitt-Trigger Inverter from Texas Instruments\nKey Features\n74HC32 quad 2-input OR gate, SN74HC14 Hex Schmitt-Trigger Inverte\nInterface\nGPIO\nCompatibility\nmikroBUS\nClick board size\nM (42.9 x 25.4 mm)\nInput Voltage\n3.3V or 5V"}]},{"type":"heading","level":3,"children":[{"type":"text","value":"ADDITIONAL INFORMATION"}]},{"type":"list","listType":"unordered","children":[{"type":"list-item","children":[{"type":"text","value":"J2 is the interrupt enable pin (by default it is in the enable status)."}]},{"type":"list-item","children":[{"type":"text","value":"J1 is the power selection pin."}]}]},{"type":"heading","level":3,"children":[{"type":"text","value":"PINOUT DIAGRAM"}]},{"type":"paragraph","children":[{"type":"text","value":"This table shows how the pinout on 2x2 Key click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns)."}]},{"type":"paragraph","children":[{"type":"text","value":"Notes\nPin\nPin\nNotes\nWhen button T1 is pressed the pin is active\nT1-OUT\n1\nAN\nPWM\n16\nT4-OUT\nWhen button T4 is pressed the pin is active\nWhen button T2 is pressed the pin is active\nT2-OUT\n2\nRST\nINT\n15\nTINT\nInterrupt pin that notifies the MCU that a button is pressed\nWhen button T3 is pressed the pin is active\nT3-OUT\n3\nCS\nTX\n14\nNC\nNC\n4\nSCK\nRX\n13\nNC\nNC\n5\nMISO\nSCL\n12\nNC\nNC\n6\nMOSI\nSDA\n11\nNC\nPower supply\n+3.3V\n7\n3.3V\n5V\n10\n+5V\nPower supply\nGround\nGND\n8\nGND\nGND\n9\nGND\nGround"}]},{"type":"heading","level":3,"children":[{"type":"text","value":" "}]},{"type":"paragraph","children":[{"type":"text","value":" "}]}]} - summary:Discover the versatility and functionality of the 2x2 Key Click Board™, a cutting-edge solution for your keypad needs. Designed to offer seamless integration and reliable performance, this innovative board caters to a wide range of applications with its advanced features and intuitive design.
When you choose the 2x2 Key Click Board™, you unlock a world of possibilities. Whether you are a hobbyist or a professional, this versatile keypad solution is tailored to meet your specific requirements with precision and efficiency.
Engineered to adapt to various power supply configurations, the 2x2 Key Click Board™ is compatible with both 3.3V and 5V power sources, ensuring flexibility and convenience in your projects.
With independent button reading capability, this Click Board™ offers enhanced control and precision, allowing you to customise your key inputs according to your specific requirements.
Explore the seamless integration and unparalleled performance of the 2x2 Key Click Board™, a reliable and versatile solution for all your keypad needs. Elevate your projects to new heights with this cutting-edge keypad solution that combines innovation with reliability and efficiency.
Embrace the future of keypad technology with the 2x2 Key Click Board™ - your gateway to seamless key input solutions for a wide range of applications. Unlock the potential of your projects with this advanced Click Board™ that promises precision, reliability, and flexibility in every keystroke.