写的是蜂鸣器编曲,错误: MAIN.C(76): error C211: call not to a function MAIN.C(76): error C208: 'function': too many actual parameters MAIN.C(77): error C211: call not to a function MAIN.C(77): error C208: 'function': too many actual parameters 它提示我实参给多了,但是我后面给数组是加了code不知道为什么还是报错
代码如下 #include #include"delay.h" #include"Timer.h" #include"Nixie.h" #include"Buzzer.h" sbit Buzzer=P2^5; unsigned int FreqTable[]={0,63628,63731,63835,63928,64021,64103,64185,64260,64331,64400,64463,64528, 64580,64633,64684,64732,64777,64820,64860,64898,64934,64968,65000,65030, 65058,65085,65110,65134,65157,65178,65198,65217,65235,65252,65268,65283, }; unsigned char code Music[]= { 10,4+4, 10,4,
17,4, 17,4+2, 17,4,
12,4+2, 13,4, 12,4,
10,4+4+4,
10,4+4+4,
0,4, 17,4, 20,4,
22,4+4, 20,4,
17,4, 19,4, 15,4,
17,4+4+4,
17,4+4+4,
17,4+4+4,
0,4+4, 22,4,
22,4+4, 22,4,
20,4+4, 17,4,
17,4, 15,4, 13,4, }; unsigned char FreqSelect,MusicSelect; void main() { Timer0Init(); while(1) { FreqSelect=Music[MusicSelect]; MusicSelect++; Delay(500*Music[MusicSelect]); TR0=0; Delay(5); TR0=1; } } void Timer0_Routine() interrupt 1 { if(FreqTable[FreqSelect]) { TL0=FreqTable(FreqSelect)%256; TH0=FreqTable(FreqSelect)/256; Buzzer=!Buzzer; } }
0
|