芯查查logo
  • 数据服务
    1. 新产品
    2. 物料选型
    3. 查替代
    4. 丝印反查
    5. 查品牌
    6. PCN/PDN
    7. 查方案
    8. 查代理
    9. 数据合作
  • SaaS/方案
      SaaS产品
    1. 供应链波动监控
    2. 半导体产业链地图
    3. BOM管理
    4. 解决方案
    5. 汽车电子
    6. 政府机构
    7. 数据API
  • 商城
  • 行业资讯
    1. 资讯
    2. 直播
  • 论坛社区
    1. 论坛
    2. 学习
    3. 测评中心
    4. 活动中心
    5. 积分商城
  • 查一下
  • 开通会员
神秘的千伏Vera
【树莓派 PICO 2 测评】KEYPAD 4X3 MATR

这是测试成功的截图

开始时参考这里的描述:

KEY FEATURES OF MEMBRANE KEYPAD 4X3 MATRIX:

  • 12 tactile membrane keys arranged in 4×3 matrixMembrane Keypad 4 x 3 Drawing
  • Adhesive back for permanently mounting keypad
  • 3″ long 8-pin cable terminates in standard 2.54mm (0.1″) female header.

These membrane keypads work well for adding key input for a project.  The construction makes them durable and weatherproof.

The keypad terminates in an 8-pin cable which has 4 row and 3 column pins.  The row pins are on the left as you are looking at the front of the keypad and they have a dark strip near the connector to help identify them.  The connector is a standard 2.54mm (0.1″) pitch 1×7 female header.

The membrane is a thin but rugged plastic with adhesive on the back.  The protective liner can be left in place to keep the keypad mobile or it can be removed and the keypad permanently mounted if desired.

The matrix is resistive which means that when no button is pushed, none of the pins are electrically connected.  When a button is pressed, the corresponding Row and Col pins have a resistance of approximately 60-90 ohms between them.

The MCU monitors for key presses by setting a row or column as an output and setting the pins LOW one at a time.  It then looks for a LOW logic level on one of the pins on the opposite axis.  It does this in a continual scanning process.

For example, if the ‘8’ button is pressed, there will be a low resistance path between the R2 and C1 pins.  If the MCU sets R2 as a LOW output and reads C1 as an input, it will see the LOW and know that the ‘8’ button was pressed.  These button pushes can easily be detected using 8 pins on an MCU.  Software libraries take care of all the messy work as shown in our example below.


OUR EVALUATION RESULTS:Membrane Keypad 4 x 3 - Connections

These keypads are an inexpensive and easy way to add a robust key entry system.

The downside to any type of matrix keypads is that they do consume a fair number of digital pins on the MCU which may or may not be a concern for a particular application.  They do consume fewer pins than wiring up the same number of discrete buttons

The program below uses the keypad.h library to implement basic input functionality of the keypad.

Eight pins on the MCU are connected to the keypad.  In this case we are using pins 2-8, but any 8 digital pins can be used if they are redefined in the rowPins and colPins statements below.  Wire things up as shown in the picture to the right.

Once the program is downloaded, open the Serial Monitor window using 9600 baud and any key presses should be displayed in the window.

结合这个电路图进行连线

不过基本可以用,好像有点瑕疵,抽时间再调调,这个先发布一下吧

这些仅供参考

开发板测评 树莓派pico 2
版块: 单片机/MCU论坛
前5天 21:13
  • 举报
😁😂😃😄😅😆😉😊😋😌😍😏😒😓😔😖😘😚😜😝😞😠😡😢😣😤😥😨😩😪😫😭😰😱😲😳😵😷😸😹😺😻😼😽😾😿🙀🙅🙆🙇🙈🙉🙊🙋🙌🙍🙎🙏✂✅✈✉✊✋✌✏✒✔✖✨✳✴❄❇❌❎❓❔❕❗❤➕➖➗➡➰🚀🚃🚄🚅🚇🚉🚌🚏🚑🚒🚓🚕🚗🚙🚚🚢🚤🚥🚧🚨🚩🚪🚫🚬🚭🚲🚶🚹🚺🚻🚼🚽🚾🛀Ⓜ🅰🅱🅾🅿🆎🆑🆒🆓🆔🆕
@好友

全部评论

加载中
游客登录通知
已选择 0 人
自定义圈子
移动
发布帖子
发布动态
发布问答
最新帖子
萤火工场GD32VW553-IOT测评+蓝牙串口透传树莓派pico 2测评 - 初体验【工程师经验】+ 飞线【开源】zvs142857 2.1A,3A快充 充电宝迷你UC3842 开关电源优化全解析:攻克常见难题,提升性能
热门版块
查看更多
电子元器件
汽车电子工程师论坛
工业电子专区
新手入门指南
单片机/MCU论坛
PCB设计
开源项目
每日打卡
电子DIY
维修技术

46

收藏

分享

微信扫码
分享给好友

评论