赞
踩
图1. proteus仿真界面截图
图2. Keil编程界面源代码截图
图3. Altium designer 原理图
图4. Altium designer 原理图PCB
- #include<reg51.h>
- #include<absacc.h>
- #define dac0832 XBYTE[0X7fff]
- unsigned char code shu[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
- float s;
- sbit ALE=P3^0;
- sbit START=P3^1;
- sbit EOC=P3^2;
- sbit OE=P3^3;
- sbit SHCP=P2^0;
- sbit DS=P2^1;
- sbit STCP=P2^2;
- sbit P11=P3^5;
- sbit P12=P3^7;
- sbit clk=P2^6;
- unsigned char j,k,m,n,i,a;
- unsigned int b;
- void delay(unsigned char t)
- { while(t--);
- }
- void display()
- {
-
- j=0x01;
- for(i=0;i<8;i++)
- { if((shu[m]&j)==0)
- { DS=0;}
- else {DS=1;}
- SHCP=1;
- SHCP=0;
- j<<=1;
- }
- P12=0;
- P11=1;
-
-
-
-
-
- STCP=0;
- STCP=1;
- delay(200);
- j=0x01;
- for(i=0;i<8;i++)
- { if((shu[n]&j)==0)
- { DS=0;}
- else {DS=1;}
- SHCP=1;
- SHCP=0;
- j<<=1;
- }
- P11=0;
- P12=1;
-
-
-
- STCP=0;
- STCP=1;
- delay(200);
- }
-
-
- void main()
- {
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。