资 源 简 介
51单片机继电器简单使用# include
# define uchar unsigned char
# define uint unsigned int
sbit k1=P3^4;
sbit k2=P3^5;
sbit jdq=P2^1;
sbit l1=P1^0;
void delayms(uint x) //延时
{
uint i,j;
for(i=x;i>0;i--)
for(j=110;j>0;j--);
}
void main ()
{
jdq=0;
while(1)
{
if(k1==0)
{
delayms(10);
if(k1==0)
{
&nbs