该功能主要是
源代码在线查看: 两项四线步进电机.lst
软件大小: |
34 K |
上传用户: |
lvuxinwu |
|
|
关键词: |
|
下载地址: |
免注册下载 普通下载
|
|
C51 COMPILER V8.02 两项四线步絖电籣 11/30/2008 19:46:35 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE 两项四线步絖电籣
OBJECT MODULE PLACED IN D:\我的文档\桌面\时钟\步进电~1\两项四线步进电机.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE D:\我的文档\桌面\时钟\步进电~1\两项四线步进电机.C DB SB OE
line level source
1 #include
2 #define uchar unsigned char
3 #define uint unsigned int
4 sbit P0_0=P0^0; //A
5 sbit P0_1=P0^1; //~A
6 sbit P0_2=P0^2; //B
7 sbit P0_3=P0^3; //~B
8 sbit EAA=P0^4;//EA/A
9 sbit EAB=P0^5;//EA/B
10
11 uchar y=10;
12 delay();
13 main()
14 {
15 1 EAA=0;
16 1 EAB=0;
17 1
18 1 while(1)
19 1 {
20 2 P0_0=1;
21 2 P0_1=0;
22 2 P0_2=1;
23 2 P0_3=0;
24 2 delay();
25 2 P0_0=0;
26 2 P0_1=1;
27 2 P0_2=1;
28 2 P0_3=0;
29 2 delay();
30 2 P0_0=0;
31 2 P0_1=1;
32 2 P0_2=0;
33 2 P0_3=1;
34 2 delay();
35 2 P0_0=0;
36 2 P0_1=1
37 2 P0_2=0;
*** ERROR C141 IN LINE 37 OF D:\我的文档\桌面\时钟\步进电~1\两项四线步进电机.C: syntax error near 'P0_2'
38 2 P0_3=1;
39 2 delay();
40 2
41 2
42 2 }
43 1
44 1 }
45 delay()
46 {uchar i,j;
47 1 for(i=0;i 48 1 {for(j=0;j 49 1
50 1 }
C51 COMPILATION COMPLETE. 0 WARNING(S), 1 ERROR(S)