您的位置: proteus仿真社区 >> 论坛 >> 单片机仿真 >> 查看帖子
字体: 小 中 大 | 打印 发表于: 2008-7-03 15:56 作者: way3 来源: proteus仿真社区
1.gif
2.gif
3.gif
8255.rar(2008-07-03 15:56:32, Size: 59.4 KB, Downloads: 1)
最新回复
boyun2183 (2008-7-03 16:25:16)
way3 (2008-7-03 16:52:35)
#include <reg51.h>
//#include <at89x51.h>
#define COM XBYTE[0xDFFF]
#define PA XBYTE[0xDFFC]
#define PB XBYTE[0xDFFD]
#define PC XBYTE[0xDFFE]
sbit P2_7=P2^7;
unsigned char code table[]={0x3f,0x06,0x5b,0x4f,0x66,
0x6d,0x7d,0x07,0x7f,0x6f};
unsigned int i=0,j;
main()
{
P2_7=0;
COM=0x80;
while(1)
{
PA=~table;
PC=~table;
PB=~table;
PC=~PC;
i++;
if(i==10)
i=0;
for(j=0;j<=30000;j++);
}
}
源程序在上面,谢谢boyun2183的鼎力支持!嘎嘎
amei26 (2008-7-17 09:33:19)