找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1272|回復(fù): 4
打印 上一主題 下一主題
收起左側(cè)

STM32單片機矩陣鍵盤邏輯寫的沒有問題,但一直不出功能,求大佬

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:1119762 發(fā)表于 2024-6-13 14:43 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
STM32矩陣鍵盤邏輯寫的沒有問題,但一直不出功能,求大佬
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報

沙發(fā)
ID:59202 發(fā)表于 2024-6-13 16:28 | 只看該作者
啥也沒有能說啥
回復(fù)

使用道具 舉報

板凳
ID:1125104 發(fā)表于 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.
回復(fù)

使用道具 舉報

地板
ID:1125104 發(fā)表于 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.
回復(fù)

使用道具 舉報

5#
ID:1125137 發(fā)表于 2024-6-13 22:02 | 只看該作者
不發(fā)原理圖,不發(fā)代碼,誰知道你寫的啥啊,一個矩陣鍵盤能需要什么邏輯
回復(fù)

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復(fù) 返回頂部 返回列表