📄 flux_pca.lst
字号:
47 =1 设置时段计时函数
48 =1 函数原型: void fnSet_TurnTime (uchar uc4_SetTime[4],bit bTimeSortStateTemp);
49 =1 功能: 设置时段计时
50 =1 bit bTimeSortStateTemp
51 =1 0 倒计时
52 =1 1 正计时
53 =1 ********************************************************************/
54 =1 extern void fnSet_TurnTime (uchar uc4_SetTime[4],bit bTimeSortStateTemp);
55 =1
56 =1 /*******************************************************************
57 =1 开始时段计时函数
58 =1 函数原型: void fnStart_ TurnTime();
59 =1 功能: 开始时段计时
60 =1 ********************************************************************/
61 =1
62 =1 extern void fnStart_TurnTime();
63 =1
64 =1 extern void fnStop_TurnTime();
65 =1 extern bit fnIfEnd_TurnTime();
66 =1
67 =1
68 =1 /*******************************************************************
69 =1 设置某位LED的显示、闪烁属性
70 =1 函数原型: void fnSet_DisplayLED(uchar ucDisplayLEDTempNum,uchar ucDisplayLEDTempBuf,
71 =1 uchar ucDisplayLEDTempGlint);
72 =1 功能: 设置某位LED的显示、闪烁属性
73 =1 参数: uchar ucDisplayLEDTempNum LED序号 1-8
74 =1 uchar ucDisplayLEDTempBuf LED显示属性
75 =1 uchar ucDisplayLEDTempGlint LED闪烁属性
76 =1
C51 COMPILER V7.07 FLUX_PCA 07/08/2004 05:56:11 PAGE 10
77 =1 ********************************************************************/
78 =1
79 =1 extern void fnSet_DisplayLED(uchar ucDisplayLEDTempNum,uchar ucDisplayLEDTempBuf,
80 =1 uchar ucDisplayLEDTempGlint);
81 =1
82 =1 #ifndef READYDEF_uchar
83 =1 #undef uchar
84 =1 #endif
85 =1
19 #include <CAT24WC16P.H>
1 =1 /***********************************************************************************
2 =1
3 =1 CAT24WC16P非遗失存储芯片控制程序 CAT24WC16P.H
4 =1
5 =1 MCU 型号: Philips P89C668
6 =1 时钟频率: 11.0592 MHz
7 =1 接口方式: I2C 100KHz
8 =1 开发环境: Keil C51 V7.06
9 =1 开发日期: 2003.08.27
10 =1 程序编写: BaoFang
11 =1
12 =1 ***********************************************************************************/
13 =1
14 =1
15 =1 #ifdef uchar /*宏uchar定义*/
=1 #define READYDEF_uchar 1
=1 #else
18 =1 #define uchar unsigned char
19 =1 #endif
20 =1
21 =1
22 =1
23 =1
24 =1 #ifdef uint /*宏uint定义*/
=1 #define READYDEF_uint 1
=1 #else
27 =1 #define uint unsigned int
28 =1 #endif
29 =1
30 =1
31 =1
32 =1 /*******************************************************************
33 =1 从CAT24WC16P器件随机地址读入N字节数据函数(N<=2048)(地址:0-2047)
34 =1 函数原型: bit fnRead_Eeprom(uint uiAddress,uchar ucSize, uchar *uc_Data);
35 =1 功能: 从启动总线到发送地址、子地址、读数据、结束总线的全过程,器件
36 =1 数据地址(0-7FF),读入的内容在指向的存储区N个字节。
37 =1 如果返回1,表示操作成功,否则操作有误。
38 =1 ********************************************************************/
39 =1 extern bit fnRead_Eeprom(uint uiAddress,uchar ucSize, uchar *uc_Data);
40 =1
41 =1 /*******************************************************************
42 =1 从CAT24WC16P器件随机地址写入N字节数据函数(N<=16)(地址:0-2047)
43 =1 函数原型: bit fnWrite_Eeprom(uint uiAddress,uchar ucSize, uchar *uc_Data);
44 =1 功能: 从启动总线到发送地址、子地址、读数据、结束总线的全过程,器件
45 =1 数据地址(0-7FF),写入的内容在指向的存储区N个字节。
46 =1 如果返回1,表示操作成功,否则操作有误。
47 =1 ********************************************************************/
48 =1 extern bit fnWrite_Eeprom(uint uiAddress,uchar ucSize, uchar *uc_Data);
49 =1
50 =1
51 =1
52 =1
C51 COMPILER V7.07 FLUX_PCA 07/08/2004 05:56:11 PAGE 11
53 =1
54 =1 #ifndef READYDEF_uchar /*取消宏uchar定义*/
55 =1 #undef uchar
56 =1 #endif
57 =1
58 =1
59 =1 #ifndef READYDEF_uint /*取消宏uint定义*/
60 =1 #undef uint
61 =1 #endif
20 #include <BitOp.H>
1 =1 /***********************************************************************************
2 =1 C51 位操作函数库头文件 BitOp.H
3 =1
4 =1 MCU 型号: Philips P89C668
5 =1 时钟频率: 11.0592 MHz 6Clock
6 =1 开发环境: Keil C51 V7.06
7 =1 开发日期: 2003.09.17
8 =1 程序编写: BaoFang
9 =1
10 =1 ***********************************************************************************/
11 =1
12 =1
13 =1 #ifdef uchar
=1 #define READYDEF_uchar 1 /*宏uchar已定义*/
=1 #else
16 =1 #define uchar unsigned char
17 =1 #endif
18 =1
19 =1
20 =1
21 =1 /*******************************************************************
22 =1 测试变量某一位是否为‘1’
23 =1 函数原型: uchar fnBitTest(uchar ucNumTest,uchar ucBitNum)
24 =1 功能: 测试变量某一位是否为‘1’
25 =1 返回0--否
26 =1 返回1--是
27 =1 变量:ucNumTest为待测试的数
28 =1 ucBitNum为位数,其值从 0到7
29 =1 *******************************************************************/
30 =1 extern uchar fnBitTest(uchar ucNumTest,uchar ucBitNum);
31 =1
32 =1
33 =1 /*******************************************************************
34 =1 清除某一位
35 =1 函数原型: uchar fnBitClr(uchar ucNumTest,uchar ucBitNum)
36 =1 功能: 清除某一位
37 =1 返回结果
38 =1 变量:ucNumTest为待清除的数
39 =1 ucBitNum为位数,其值从 0到7
40 =1 *******************************************************************/
41 =1 extern uchar fnBitClr(uchar ucNumTest,uchar ucBitNum);
42 =1
43 =1
44 =1 /*******************************************************************
45 =1 设置某一位
46 =1 函数原型: uchar fnBitSet(uchar ucNumTest,uchar ucBitNum)
47 =1 功能: 设置某一位
48 =1 返回结果
49 =1 变量:ucNumTest为待设置的数
50 =1 ucBitNum为位数,其值从 0到7
51 =1 *******************************************************************/
52 =1 extern uchar fnBitSet(uchar ucNumTest,uchar ucBitNum);
C51 COMPILER V7.07 FLUX_PCA 07/08/2004 05:56:11 PAGE 12
53 =1
54 =1
55 =1
56 =1 /*******************************************************************
57 =1 取反某一位
58 =1 函数原型: uchar fnBitCpl(uchar ucNumTest,uchar ucBitNum)
59 =1 功能: 取反某一位
60 =1 返回结果
61 =1 变量:ucNumTest为待取反的数
62 =1 ucBitNum为位数,其值从 0到7
63 =1 *******************************************************************/
64 =1 extern uchar fnBitCpl(uchar ucNumTest,uchar ucBitNum);
65 =1
66 =1
67 =1
68 =1 #ifndef READYDEF_uchar
69 =1 #undef uchar
70 =1 #endif
71 =1
72 =1
73 =1 /*————————————————————
74 =1 〖说明〗这是直接输入二进制常数的KEIL C补丁,如输入B0000_0101;
75 =1 则宏替换后就是0x05;在做某些位操作时这个补丁会带来很大的方便。
76 =1 由于是用#define定义的,所以程序中包含这个头文件,并不会增加代码长度。
77 =1 〖版本〗V1.00A Build 0323
78 =1 —————————————————————*/
79 =1
80 =1
81 =1 #define B_00000 0x00
82 =1 #define B_00001 0x01
83 =1 #define B_00010 0x02
84 =1 #define B_00011 0x03
85 =1 #define B_00100 0x04
86 =1 #define B_00101 0x05
87 =1 #define B_00110 0x06
88 =1 #define B_00111 0x07
89 =1 #define B_01000 0x08
90 =1 #define B_01001 0x09
91 =1 #define B_01010 0x0A
92 =1 #define B_01011 0x0B
93 =1 #define B_01100 0x0C
94 =1 #define B_01101 0x0D
95 =1 #define B_01110 0x0E
96 =1 #define B_01111 0x0F
97 =1
98 =1 #define B_10000 0x10
99 =1 #define B_10001 0x11
100 =1 #define B_10010 0x12
101 =1 #define B_10011 0x13
102 =1 #define B_10100 0x14
103 =1 #define B_10101 0x15
104 =1 #define B_10110 0x16
105 =1 #define B_10111 0x17
106 =1 #define B_11000 0x18
107 =1 #define B_11001 0x19
108 =1 #define B_11010 0x1A
109 =1 #define B_11011 0x1B
110 =1 #define B_11100 0x1C
111 =1 #define B_11101 0x1D
112 =1 #define B_11110 0x1E
113 =1 #define B_11111 0x1F
114 =1
C51 COMPILER V7.07 FLUX_PCA 07/08/2004 05:56:11 PAGE 13
115 =1 #define B_FFFFF 0x80
116 =1
117 =1 #define B0000_0000 0x00
118 =1 #define B0000_0001 0x01
119 =1 #define B0000_0010 0x02
120 =1 #define B0000_0011 0x03
121 =1 #define B0000_0100 0x04
122 =1 #define B0000_0101 0x05
123 =1 #define B0000_0110 0x06
124 =1 #define B0000_0111 0x07
125 =1 #define B0000_1000 0x08
126 =1 #define B0000_1001 0x09
127 =1 #define B0000_1010 0x0A
128 =1 #define B0000_1011 0x0B
129 =1 #define B0000_1100 0x0C
130 =1 #define B0000_1101 0x0D
131 =1 #define B0000_1110 0x0E
132 =1 #define B0000_1111 0x0F
133 =1
134 =1 #define B0001_0000 0x10
135 =1 #define B0001_0001 0x11
136 =1 #define B0001_0010 0x12
137 =1 #define B0001_0011 0x13
138 =1 #define B0001_0100 0x14
139 =1 #define B0001_0101 0x15
140 =1 #define B0001_0110 0x16
141 =1 #define B0001_0111 0x17
142 =1 #define B0001_1000 0x18
143 =1 #define B0001_1001 0x19
144 =1 #define B0001_1010 0x1A
145 =1 #define B0001_1011 0x1B
146 =1 #define B0001_1100 0x1C
147 =1 #define B0001_1101 0x1D
148 =1 #define B0001_1110 0x1E
149 =1 #define B0001_1111 0x1F
150 =1
151 =1 #define B0010_0000 0x20
152 =1 #define B0010_0001 0x21
153 =1 #define B0010_0010 0x22
154 =1 #define B0010_0011 0x23
155 =1 #define B0010_0100 0x24
156 =1 #define B0010_0101 0x25
157 =1 #define B0010_0110 0x26
158 =1 #define B0010_0111 0x27
159 =1 #define B0010_1000 0x28
160 =1 #define B0010_1001 0x29
161 =1 #define B0010_1010 0x2A
162 =1 #define B0010_1011 0x2B
163 =1 #define B0010_1100 0x2C
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -