完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
|
相关推荐
1个回答
|
|
单片机8x8LED点阵屏显示数字
硬件连接: 程序: #include 《reg52.h》 #include 《intrins.h》 #define uchar unsigned char #define uint unsigned int uchar code Table_OF_Digits[]= { 0x00,0x3e,0x41,0x41,0x41,0x3e,0x00,0x00, 0x00,0x00,0x00,0x21,0x7f,0x01,0x00,0x00, 0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00, 0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x00, 0x00,0x0c,0x14,0x24,0x7f,0x04,0x00,0x00, 0x00,0x72,0x51,0x51,0x51,0x4e,0x00,0x00, 0x00,0x3e,0x49,0x49,0x49,0x26,0x00,0x00, 0x00,0x40,0x40,0x40,0x4f,0x70,0x00,0x00, 0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00, 0x00,0x32,0x49,0x49,0x49,0x3e,0x00,0x00, }; uchar i=0,t=0,Num_Index = 0; void main() { P3 = 0x80; Num_Index = 0; TMOD = 0x00; TH0 = (8192-2000)/32; TL0 = (8192-2000)%32; TR0 = 1; IE = 0x82; while(1); } void LED_Screen_Display() interrupt 1 { TH0 = (8192-2000)/32; TL0 = (8192-2000)%32; P3 = _crol_(P3,1); P0 = ~Table_OF_Digits[Num_Index * 8 +i]; if(++i == 8) i = 0; if(++t == 250) { t = 0x00; if(++Num_Index == 10) Num_Index = 0; } } |
|
|
|
只有小组成员才能发言,加入小组>>
2548 浏览 0 评论
1146浏览 2评论
745浏览 1评论
499浏览 0评论
265浏览 0评论
427浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 10:20 , Processed in 1.197376 second(s), Total 80, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号