ADC--8051
#include <REGX51.H>
sbit rd=P2^0;
sbit wr=P2^1;
sbit intr=P2^2;
sbit cs=P2^3;
void delay(int s)
{
int i,j;
for(i=0;i<s;i++)
{}
for(j=0;j<1275;j++)
{}
}
void main()
{
while(1)
{
cs=0;
rd=1;
wr=0;
delay(500);
wr=1;
while(intr==0);
rd=0;
delay(50);
intr=1;
}
}
No comments:
Post a Comment