標題: STM32單片機矩陣鍵盤邏輯寫的沒有問題,但一直不出功能,求大佬 [打印本頁] 作者: xuanchenxing101 時間: 2024-6-13 14:43 標題: STM32單片機矩陣鍵盤邏輯寫的沒有問題,但一直不出功能,求大佬 STM32矩陣鍵盤邏輯寫的沒有問題,但一直不出功能,求大佬 作者: xxxevery 時間: 2024-6-13 16:28
啥也沒有能說啥作者: heihei51aaaaa 時間: 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.作者: heihei51aaaaa 時間: 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. 作者: wnk64 時間: 2024-6-13 22:02
不發原理圖,不發代碼,誰知道你寫的啥啊,一個矩陣鍵盤能需要什么邏輯