// 定义包含的头文件 #include<reg51.h> #include <intrins.h> // 定义显示的数字对应的编码 code unsigned char tab[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40}; // 定义显示的缓冲区 unsigned char dspbuf[8] = {0,0,10,0,0,10,0,0}; unsigned char i,j,k; unsigned char dspbuf1[8] = {0,0,10,0,0,10,0,0}; // 定义音调的频率 code unsigned int yindiao[]={0,120,106,94,89,79,71,62,59, 56, 53, 50, 47, 44, 41, 38}; // 定义阶排的频率 code unsigned int jiepai[]={0,523,587,659,698,784,880,988}; [2024-11-25 18:12:57 | AI写代码神器 | 334点数解答]