您好,欢迎来到尔游网。
搜索
您的当前位置:首页智能小车C语言

智能小车C语言

来源:尔游网


include\"\"

define uchar unsigned char

define uint unsigned int

sbit dula=P3^4;

sbit wela=P3^5;

sbit M11=P2^0;

sbit M12=P2^1;

sbit M21=P2^2;

sbit M22=P2^3;

int num=1200;

int num1=600;

void main

{

{

TMOD=0x01;

TH0=65536-45872/256;

TL0=65536-45872%256;

TR0=1;

P2=0xff;

M11=1;

M12=0;

M21=1;

M22=0;

whilenum

{

if TF0==1

{

num--;

TH0=65536-45872/256;

TL0=65536-45872%256;

TF0=0;

}

}

M11=0;

M12=1;

M21=0;

M22=1;

}

whilenum1

{

if TF0==1

{

num1--;

TH0=65536-45872/256;

TL0=65536-45872%256;

TF0=0;

}

}

M11=1;

M12=1;

M21=1;

M22=1;

while1;

}

include\"\"

define uchar unsigned char

define uint unsigned int

sbit dula=P3^4;

sbit wela=P3^5;

sbit M11=P2^0;

sbit M12=P2^1;

sbit M21=P2^2;

sbit M22=P2^3;

int num=130;

int num1=320;

char mm1,mm2;

void main

{

TMOD=0x01;

TH0=65536-45872/256;

TL0=65536-45872%256;

TR0=1;

P2=0xff;

M11=1;

M12=0;

M21=1;

M22=0;

whilenum

{

if TF0==1

{

num--;

TH0=65536-45872/256;

TL0=65536-45872%256;

TF0=0;

}

}

TH0=65536-45872/256;

TL0=65536-45872%256;

TF0=0;

whilenum1

{

if TF0==1

{

num1--;

TH0=65536-45872/256;

TL0=65536-45872%256;

TF0=0;

ifnum1%2=0

{

M11=0;

M12=1;

M21=0;

M22=1;

}

else

{

}

}

M11=1;

M12=1;

M21=1;

M11=1;

M12=1;

M21=1;

M22=1;

}

M22=1;

while1;

}

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- axer.cn 版权所有 湘ICP备2023022495号-12

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务