完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
#include #include #define uchar unsigned char #define uint unsigned int ***it Serial_Data_Pin = P0^0; ***it Shift_CLK_Pin = P3^7; ***it RCK_Pin = P0^1; ***it Switch_74ls154 = P3^6; uchar data Bit_Stream_8[32]; uchar code Word_Set_OF_16x16[][32]= { /*---------------80----------------*/ { 0x02,0x00,0x02,0x00,0x02,0x10,0x7F,0xF8,0x42,0x10,0x42,0x10,0x7F,0xF0,0x42,0x10, 0x42,0x10,0x7F,0xF0,0x42,0x10,0x02,0x00,0x02,0x04,0x02,0x04,0x01,0xFC,0x00,0x00 }, { 0x00,0x00,0x3F,0xF0,0x00,0x10,0x00,0x20,0x00,0x40,0x01,0x80,0x01,0x04,0xFF,0xFE, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00}, }; void Delay( uint t) { uchar i; while ( t-- ) for ( i= 0;i<180 ;i++); } void Serial_Input_Pin( uchar Abyte ) { uchar i; for (i = 0; i < 2; i++ ) { Abyte <<= 1; Serial_Data_Pin = CY; Shift_CLK_Pin = 1; _nop_();_nop_(); Shift_CLK_Pin = 0; } } void T0_Led_Display_Control() interrupt 1 { uchar i; TH0 = -1000 / 256; TL0 = -1000 % 256; i = ( P2 + 1) & 0x0f; Serial_Input_Pin( Bit_Stream_8[i * 2 + 1]); Serial_Input_Pin( Bit_Stream_8[i * 2 ]); Switch_74ls154 = 1; RCK_Pin = 1; RCK_Pin = 0; P2 = i; } void main() { uchar i,k; TMOD = 0x01; TH0 = -1000/256; TL0 = -1000%256; IE = 0x82; P2 = 0xFF; while(1) { for( k = 0; k < 12 ; k++) { for( i = 0; k< 32 ; i++) Bit_Stream_8= Word_Set_OF_16x16; TR0 = 1; Delay(1000); TR0 = 0; P2 = 0xFF; } } } 图片如下。
|
|
相关推荐
6个回答
|
|
|
|
@武力戡乱 请求解决
|
|
|
|
|
|
|
|
来了,代码不全呢
|
|
|
|
|
|
电码不全呢
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
5965 浏览 3 评论
7235 浏览 1 评论
7479 浏览 0 评论
Protues中自己封装的芯片元件无Program File、Clock Frequency选项怎么解决,求求大神了!
9266 浏览 1 评论
基于51单片机的车辆倒车雷达报警系统,HC-SR04超声波测距,全套资料
1266 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 13:32 , Processed in 0.896793 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号