来晚了 |
我去 感觉号复杂 |
谢谢了!!! ![]() ![]() ![]() |
海哥沧海一笑 发表于 2015-7-5 17:33 谢谢了 ![]() ![]() ![]() |
啊?什么意思啊?能不能说清楚一点我不是太懂 |
#include<reg51.h> #include<intrins.h> void Delay(); sbit P2_0=P2^0; sbit P2_1=P2^1; sbit P2_2=P2^2; sbit P2_3=P2^3; sbit P2_4=P2^4; sbit P2_5=P2^5; sbit P2_6=P2^6; sbit P2_7=P2^7; void main() { P1=0x00; Delay(); P1=0xFF; Delay(); P1=0x00; Delay(); P1=0xFF; Delay(); while(1) { if(P2==0xFE) { P1=0xC0; } else if(P2==0xFD) { P1=0xF9; } else if(P2==0xFB) { P1=0xA4; } else if(P2==0xF7) { P1=0xB0; } else if(P2==0xEF) { P1=0x99; } else if(P2==0xDF) { P1=0x92; } else if(P2==0xBF) { P1=0x82; } else if(P2==0x7F) { P1=0xF8; } else if(P2==0xFC) { P1=0x80; } else if(P2==0xFA) { P1=0x90; } else if(P2==0xF6) { P1=0x88; } else if(P2==0xEE) { P1=0x83; } else if(P2==0xDE) { P1=0xC6; } else if(P2==0xBE) { P1=0xA1; } else if(P2==0x7E) { P1=0x86; } else { P1=0xFF; } } } void Delay() { int i; for(i=0;i<1000;i++) { _nop_(); } } |
请大家帮个忙了。没人看嘛都?![]() |