找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1267|回复: 4
打印 上一主题 下一主题
收起左侧

STM32单片机矩阵键盘逻辑写的没有问题,但一直不出功能,求大佬

[复制链接]
跳转到指定楼层
楼主
ID:1119762 发表于 2024-6-13 14:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
STM32矩阵键盘逻辑写的没有问题,但一直不出功能,求大佬
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:59202 发表于 2024-6-13 16:28 | 只看该作者
啥也没有能说啥
回复

使用道具 举报

板凳
ID:1125104 发表于 2024-6-13 18:21 | 只看该作者
Many microcontrollers have different locations for accesing the inputs and outputs. For example on ATMEL AVR microcontroler to read or write the logical values to port B you use PORTB. To read the actual phisical value of port B you will need to use PINB. Example: "in r16,PINB" will read the physical bits of port B. This is what you need to use to read the keyboard matrix.
回复

使用道具 举报

地板
ID:1125104 发表于 2024-6-13 18:25 | 只看该作者
Maybe you are reading the logical value of the keyboard matrix i/o port instead of reading the phisical value.

On ATMEL AVR microcontroller, to read the logical value of port b for example you use:
in r16,PORTB

To read the actual phisical value of port b you will use:
in r16,PINB

So, in your matrix keyboard you need to read the physical value (the real value), not the logical value from the port.
回复

使用道具 举报

5#
ID:1125137 发表于 2024-6-13 22:02 | 只看该作者
不发原理图,不发代码,谁知道你写的啥啊,一个矩阵键盘能需要什么逻辑
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表