内容发布更新时间 : 2024/11/15 2:08:03星期一 下面是文章的全部内容请认真阅读。
[5] Samsung Electronics. S3C44BOX Risc microcontroller ARM instruction sheet .2002. [6] 郭天祥.《51单片机C语言教程》[M].子工业出版社,2005年7月. [7] 丁元杰.《单片微机原理及应用》[M],械工业出版社,2005年7月.
[8] 楼然苗,光.《单片机课程设计指导》[M].京: 北京航空航天大学出版社,2007.
附 录
1 实物图
sbit SB1=P0^6;
sbit IRIN=P3^3;
2 源程序清单
#include
sbit LeftLed=P2^0; sbit RightLed=P0^7; sbit FontLled=P1^7;
sbit LeftIR=P3^5; sbit RightIR=P3^6; sbit FontIR=P3^7;
sbit M1A=P0^0; sbit M1B=P0^1;
sbit M2A=P0^2; sbit M2B=P0^3;
sbit B1=P0^4;
unsigned char code LedShowData[]={
0x03,0x9F,0x25,0x0D,0x99,
0x49,0x41,0x1F,0x01,0x19
};
unsigned char code RecvData[]={
0x19,0x46,0x15,0x43,0x44, 0x40,0x0D,0x0E,0x00,0x0F
};
unsigned char IRCOM[7]; static unsigned int LedFlash; bit EnableLight=0;
#define ShowPort P2
unsigned char temp = 1;
void tingzhi()
{
M1A=0;
M1B=0;
M2A=0; { M2B=0; }
void qianjin() {
M1A=1; M1B=0; M2A=1; M2B=0; }
void houtui() {
M1A=0; M1B=1; M2A=0; M2B=1; }
void zuozhuan()
M1A=0; M1B=1; M2A=1; M2B=0; }
void youzhuan() {
M1A=1; M1B=0; M2A=0; M2B=1; }
void Delay1ms(unsigned int i) {
unsigned char j,k; do{ j = 10; do{ k = 50;