at89c52独立按键提示音代码
时间: 2024-04-14 11:21:11 浏览: 99
AT89C52的独立按键提示音代码如下:
```c
#include <reg52.h>
#include "key.h"
#include "BEEP.h"
void key_panding() {
unsigned char key_value;
while (1) {
key_value = key_16_pandaun();
if (key_value == 0x01) { // 判断按键1是否按下
BEEP = 1; // 产生提示音
} else if (key_value == 0x02) { // 判断按键2是否按下
BEEP = 0; // 停止提示音
}
}
}
```
阅读全文
相关推荐
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![application/pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044955.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)