?? delay_loop.lst
字號:
C51 COMPILER V6.21 DELAY_LOOP 01/23/2002 17:24:56 PAGE 1
C51 COMPILER V6.21, COMPILATION OF MODULE DELAY_LOOP
OBJECT MODULE PLACED IN Delay_loop.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE Delay_loop.c OPTIMIZE(6,SPEED) BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /*------------------------------------------------------------------*-
2
3 Delay_Loop.C (v1.00)
4
5 ------------------------------------------------------------------
6
7 Create a simple software delay using a loop.
8
9 COPYRIGHT
10 ---------
11
12 This code is associated with the book:
13
14 EMBEDDED C by Michael J. Pont
15 [Pearson Education, 2002: ISBN: 0-201-79523-X].
16
17 This code is copyright (c) 2001 by Michael J. Pont.
18
19 See book for copyright details and other information.
20
21 -*------------------------------------------------------------------*/
22
23 #include "Main.H"
24 #include "Port.H"
25
26 #include "Delay_loop.h"
27
28 /*------------------------------------------------------------------*-
29
30 DELAY_LOOP_Wait()
31
32 Delay duration varies with parameter.
33
34 Parameter is, *ROUGHLY*, the delay, in milliseconds,
35 on 12MHz 8051 (12 osc cycles).
36
37 You need to adjust the timing for your application!
38
39 -*------------------------------------------------------------------*/
40 void DELAY_LOOP_Wait(const tWord DELAY_MS)
41 {
42 1 tWord x, y;
43 1
44 1 for (x = 0; x <= DELAY_MS; x++)
45 1 {
46 2 for (y = 0; y <= 120; y++);
47 2 }
48 1 }
49
50 /*------------------------------------------------------------------*-
51 ---- END OF FILE -------------------------------------------------
52 -*------------------------------------------------------------------*/
MODULE INFORMATION: STATIC OVERLAYABLE
C51 COMPILER V6.21 DELAY_LOOP 01/23/2002 17:24:56 PAGE 2
CODE SIZE = 32 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -