MIKROE-2152

MIKROE-2152

  • 厂商:

    MIKRO

  • 封装:

    -

  • 描述:

    2X2KEYCLICK

  • 数据手册
  • 价格&库存
MIKROE-2152 数据手册
2x2 Key click 1 2x2 Key click 2x2 Key click 2x2 Key click IC/Module Interface SN74HC14 datasheet [1] 74HC32 datasheet [2] AN, RST, CS, PWM, INT Power supply 3.3V or 5V Product page 2x2 Key click [3] Schematic 2x2 Key click schematic [4] 2x2 Key click has a 4 PCB button keypad. It carries the SN74HC14 Hex Schmitt-Trigger Inverter from Texas Instruments and 74HC32 quad 2-input OR gate from NXP. The click allows multiple key presses and is designed to use either 3.3V or 5V power supply. The silkscreen markings on the click let you know which button is which. The buttons that can be independently read. Features and usage notes The 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. 2x2 Key click 2 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). Key features • 74HC32 quad 2-input OR gate • High noise immunity • Low power dissipation • SN74HC14 Hex Schmitt-Trigger Inverter • Outputs Can Drive Up to 10 LSTTL Loads • Low Power Consumption, 20-μA Max ICC • 4 black PCB buttons onboard • Interface: PWM, INT, AN, RST, CS pins • Runs on either 3.3V or 5V power supply 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 mikroBUStm When button T1 is pressed the pin is active T1-OUT 1 AN X 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 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 Ground GND 8 GND GND 9 GND Interrupt pin that notifies the MCU that a button is pressed Power supply Ground 2x2 Key click 3 Programming The demo initialises the TFT display and sets pins to operate in input direction. The main fucntion 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. void main() { system_init(); Draw_Taster(X1, Draw_Taster(X2, Draw_Taster(X1, Draw_Taster(X2, Y1, Y1, Y2, Y2, RELEASED, RELEASED, RELEASED, RELEASED, "T1"); "T2"); "T3"); "T4"); while(1) { if(Taster_Pressed(TAST1, &t1_state)) Draw_Taster(X1, Y1, PRESSED, "T1"); if(Taster_Released(TAST1, &t1_state)) Draw_Taster(X1, Y1, RELEASED, "T1"); if(Taster_Pressed(TAST2, &t2_state)) Draw_Taster(X2, Y1, PRESSED, "T2"); if(Taster_Released(TAST2, &t2_state)) Draw_Taster(X2, Y1, RELEASED, "T2"); if(Taster_Pressed(TAST3, &t3_state)) Draw_Taster(X1, Y2, PRESSED, "T3"); if(Taster_Released(TAST3, &t3_state)) Draw_Taster(X1, Y2, RELEASED, "T3"); if(Taster_Pressed(TAST4, &t4_state)) Draw_Taster(X2, Y2, PRESSED, "T4"); if(Taster_Released(TAST4, &t4_state)) Draw_Taster(X2, Y2, RELEASED, "T4"); t1_state t2_state t3_state t4_state = = = = TAST1; TAST2; TAST3; TAST4; Delay_ms(POLLING_PERIOD); } 2x2 Key click } Resources • • • • • SN74HC14 datasheet [1] 74HC32 datasheet [2] Demo code / Library [5] 2x2 Key click schematic [4] mikroBUS™ standard specifications [6] References [1] [2] [3] [4] [5] [6] http:/ / www. ti. com/ lit/ ds/ symlink/ sn74hc14. pdf http:/ / www. nxp. com/ documents/ data_sheet/ 74HC_HCT32. pdf http:/ / www. mikroe. com/ click/ 2x2-key/ http:/ / cdn-docs. mikroe. com/ images/ 7/ 7d/ 2x2-Key. pdf https:/ / libstock. mikroe. com/ projects/ view/ 1965/ 2x2-key-click http:/ / www. mikroe. com/ mikrobus/ 4 Article Sources and Contributors Article Sources and Contributors 2x2 Key click  Source: http://docs.mikroe.com/index.php?oldid=2680  Contributors: Lana.vulic Image Sources, Licenses and Contributors File:2x2-key-click.jpg  Source: http://docs.mikroe.com/index.php?title=File:2x2-key-click.jpg  License: unknown  Contributors: Lana.vulic File:mikrobus logo.png  Source: http://docs.mikroe.com/index.php?title=File:Mikrobus_logo.png  License: unknown  Contributors: Vojislav.gvozdic License Creative Commons Attribution https:/ / creativecommons. org/ licenses/ by/ 4. 0/ 5
MIKROE-2152 价格&库存

很抱歉,暂时无法提供与“MIKROE-2152”相匹配的价格&库存,您可以联系我们找货

免费人工找货