📄 pll842.lst
字号:
C51 COMPILER V5.50, PLL842 17/10/03 18:01:48 PAGE 1
DOS C51 COMPILER V5.50, COMPILATION OF MODULE PLL842
OBJECT MODULE PLACED IN PLL842.OBJ
COMPILER INVOKED BY: C:\ADUC\BIN\C51.EXE PLL842.C DB
stmt level source
1 //pll834.c
2 /*
3 Author: Eckart Hartmann Date:17/10/2003
4 Description of Software:
5 This program demonstrates the PLL functions:
6 <A HREF="/~ehartman/842/pll/Pll842Dly.html">PllDly()</A>,
7 <A HREF="/~ehartman/842/pll/Pll842Wcd.html">PllWcd()</A> and
8 <A HREF="/~ehartman/842/pll/Pll842Rcd.html">PllRdd()</A>.
9
10 The test waits 1s to ensure PLL is stable, reads the CD bits and
11 then checks the CD bits. If an error occurs P3.4 pulses every second.
12 Then 0ms, 1ms, 255ms, 256ms, 257ms, 32.6s,33s and 65.535s are measured off with
13 P3.3 toggling after each time period. The periods can thus be checked on an
14 oscilloscope. If the test has passed P3.4 flickers continuously.
15 Development progress: <A HREF="/~ehartman/814/pll/Pll814Df.html">Pll814.df</A>
16 */
17 #include"..\kei842.h" //;<A HREF="/~ehartman/842/Kei842Sfr.html">SFR definition file</A>.
18 #include"..\lib842.h" //;<A HREF="/~ehartman/842/Lib842H.html">Function and variable declaration file</A>.
19
20 void PllErr(char cDly);
21 void flicker(void);
22
23 void main(void)
24 {
25 1 PllDly(1000);
26 1 PllWcd(2);
27 1 if(PllRcd()!=2) PllErr(3);
28 1 P34 = 0;
29 1 PllDly(0);
30 1 P34 = !P34;
31 1 PllDly(1);
32 1 P34 = !P34;
33 1 PllDly(255);
34 1 P34 = !P34;
35 1 PllDly(256);
36 1 P34 = !P34;
37 1 PllDly(257);
38 1 P34 = !P34;
39 1 PllDly(32600);
40 1 P34 = !P34;
41 1 PllDly(33000);
42 1 P34 = !P34;
43 1 PllDly(65535);
44 1 P34 = !P34;
45 1 while(1) flicker();
46 1 }
47
48 void PllErr(char cDly)
49 {
50 1 while(1)
51 1 {
52 2 PllDly(cDly*1000);
53 2 P34 = 1;
54 2 PllDly(100);
55 2 P3 = 0x00;
56 2 } }
57
58 void flicker(void)
59 {
C51 COMPILER V5.50, PLL842 17/10/03 18:01:48 PAGE 2
60 1 char c1;
61 1
62 1 for(c1=0; c1<32; c1++)
63 1 {
64 2 PllDly(30);
65 2 P34 = 1;
66 2 PllDly(30);
67 2 P3 = 0x00;
68 2 } }
69
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 174 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 2 2
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 + -