完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子琴2.C(163): error C187: not an lvalue
主程序第一行,不明白为什么会错,咋改,很急,求解 #include #define uchar unsigned char //无符号字符型 宏定义 变量范围0~255 #define uint unsigned int //无符号整型 宏定义 变量范围0~65535 ***it beep = P1^5; //蜂鸣器定义 ***it K1=P3^2;//音乐播放按键 uchar flag_en = 0; //开始放歌 uchar flag_i = 0; uchar num=0;//初始化num,用于控制数1码管显示的字符 //数码管段选定义 0 1 2 3 4 5 6 7 8 9 uchar code smg_du[]={0x28,0xee,0x34,0xa4,0xe2,0xa1,0x21,0xec,0x20,0xa0, // A B C D E F 不显示 0x60,0x23,0x39,0x26,0x31,0x71,0xbf}; //断码 uchar m,n; uchar code T[49][2]={{0,0}, {0xF8,0x8B},{0xF8,0xF2},{0xF9,0x5B},{0xF9,0xB7},{0xFA,0x14},{0xFA,0x66},{0xFA,0xB9},{0xFB,0x03}, {0xFB,0x4A},{0xFB,0x8F},{0xFB,0xCF},{0xFC,0x0B},{0xFC,0x43},{0xFC,0x78},{0xFC,0xAB},{0xFC,0xDB}, {0xFD,0x08},{0xFD,0x33},{0xFD,0x5B},{0xFD,0x81},{0xFD,0xA5},{0xFD,0xC7},{0xFD,0xE7},{0xFE,0x05}, {0xFE,0x21},{0xFE,0x3C},{0xFE,0x55},{0xFE,0x6D},{0xFE,0x84},{0xFE,0x99},{0xFE,0xAD},{0xFE,0xC0}, {0xFE,0x02},{0xFE,0xE3},{0xFE,0xF3},{0xFF,0x02},{0xFF,0x10},{0xFF,0x1D},{0xFF,0x2A},{0xFF,0x36}, {0xFF,0x42},{0xFF,0x4C},{0xFF,0x56},{0xFF,0x60},{0xFF,0x69},{0xFF,0x71},{0xFF,0x79},{0xFF,0x81} }; uchar code music1[][2]={{0,4}, //两只蝴蝶 {23,4},{21,4},{23,16},{23,4},{21,4},{23,4},{21,4},{19,16},{16,4},{19,4},{21,8},{21,4},{23,4},{21,4},{19,4},{16,4},{19,4},{14,24}, {23,4},{21,4},{23,16},{23,4},{21,4},{23,4},{21,4},{19,24},{16,4},{19,4},{21,8},{21,4},{23,4},{21,4},{19,4},{16,4},{19,4},{21,24}, {23,4},{21,4},{23,16},{23,4},{21,4},{23,4},{21,4},{19,16},{16,4},{19,4},{21,8},{21,4},{23,4},{21,4},{19,4},{16,4},{19,4},{14,24}, {23,4},{26,4},{26,16},{26,4},{28,4},{26,4},{23,24},{21,4},{23,4},{21,8},{21,4},{23,4},{21,4},{19,4},{16,4},{16,2},{19,2},{19,24},{0,20}, {26,4},{26,4},{28,4},{31,4},{30,4},{30,4},{28,4},{23,4},{21,4},{21,4},{23,16},{0,4},{23,4},{23,4},{26,4},{28,8},{28,12},{16,4},{23,4},{21,4}, {21,24},{23,4},{26,4},{26,4},{23,4},{26,8},{0,4},{31,8},{30,4},{28,4},{30,4},{23,8},{0,4},{28,4},{28,4},{30,4},{28,4},{26,4},{23,4},{21,8},{23,4},{21,4},{23,4},{26,16}, {0xFF,0xFF}}; uchar code music2[][2]={{0,4}, //生日快乐 {17,6},{17,2},{19,8},{17,8},{22,8},{21,16}, {17,6},{17,2},{19,8},{17,8},{24,8},{22,16},{17,6},{17,2},{29,8},{26,8},{22,8},{21,8},{19,8},{27,6},{27,2},{26,8},{22,8},{24,8},{22,16}, {0xFF,0xFF}}; uchar code music3[][2]={{0,4}, //爱情买卖 {22,4},{22,4},{17,4},{15,4},{15,4},{17,12}, {15,4},{15,2},{17,2},{15,4},{13,4},{13,4},{15,12},{0,4}, {20,4},{20,4},{20,4},{17,4},{20,4},{20,4},{20,4},{17,4}, {22,4},{17,4},{17,4},{15,4},{15,4},{17,12}, {22,4},{22,4},{17,4},{15,4},{15,4},{17,12}, {15,4},{15,2},{17,2},{15,4},{13,4},{13,4},{15,12}, {20,4},{20,4},{20,2},{17,2},{17,4},{20,4},{20,4},{20,2},{17,2},{17,2},{17,2}, {24,4},{20,4},{20,2},{17,2},{17,4},{20,4},{22,12}, {17,4},{22,4},{25,4},{25,4},{17,4},{22,4},{25,8}, {24,4},{22,2},{24,2},{22,4},{20,4},{15,4},{17,12}, {15,4},{15,4},{15,4},{10,4},{15,4},{17,4},{20,8}, {17,4},{24,4},{24,4},{20,4},{15,4},{17,12}, {17,4},{22,4},{25,4},{25,4},{17,4},{22,4},{25,8}, {29,4},{27,2},{29,2},{27,4},{25,4},{25,4},{27,12}, {29,4},{29,2},{27,4},{25,4},{27,6},{27,2},{25,4},{24,4}, {20,4},{20,2},{17,2},{20,4},{20,2},{22,2},{22,16}, {0xFF,0xFF}}; void delay(uchar p) { uchar i,j; for(;p>0;p--) for(i=181;i>0;i--) for(j=181;j>0;j--); } void pause() { uchar i,j; for(i=150;i>0;i--) for(j=150;j>0;j--); } /***********************1ms延时函数*****************************/ void delay_1ms(uint q) { uint i,j; for(i=0;i
|
|
相关推荐
2个回答
|
|
先看明白那句话是什么错误,然后跳到相应的行,基本你就明白了
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
751 浏览 0 评论
使用Keil建立完整的工程,并使用外部中断0触发数码管显示903
1330 浏览 0 评论
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-使用AHT20进行环境监测之AHT20传感器介绍
1184 浏览 0 评论
899 浏览 0 评论
947 浏览 1 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
11864 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-3 10:14 , Processed in 0.588560 second(s), Total 55, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号