📄 flashmodule.lst
字号:
C51 COMPILER V7.10 FLASHMODULE 09/18/2008 14:09:29 PAGE 1
C51 COMPILER V7.10, COMPILATION OF MODULE FLASHMODULE
OBJECT MODULE PLACED IN FlashModule.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 20progress\FlashModule.c BROWSE DEBUG OBJECTEXTEND PRINT(.\FlashModule.lst)
- OBJECT(FlashModule.obj)
line level source
1 //*******************************************************************************
2 //Copyright (c) 2007,派利斯电子(北京)有限公司 硬件部
3 //文件名称: FlahModule.c
4 //摘 要: 本文件主要包含PT2060程序中Flash参数等操作
5 //当前版本: D-1
6 //作 者: 佟文杰
7 //完成日期: 4/19/2007
8 //*******************************************************************************
9 #define FLASHMODULE_C
10 #include "FlashModule.h"
11 extern xdata unsigned int uiHeartbeatValue;
12 #define FLASHREMOTIONADRESS 0x0800
13
14 int code Def_Para_Array[107] = {
15 // 第一行为数组数据代表的变量名称
16 // 第二行为数组数据代表的含义
17 // 第三行为数组数据存入到flash的真实数据
18 //--------------------------第一通道的参数Channel1Para----------------------------------------
19 // uiSampleRate, uiSamPeriod, uiMeasureType, uiMeasureUnit;
20 // 4.0K 250ms RMS mm/s
21 3, 3, 3, 2,
22 // uiSensorType, uiSensitive, iSensorDirection, uiAlertType;
23 // TM0180/5m(无前置) mv/um 朝向/背向
24 24, 4000, 0, 1,
25 // iDangerHigh, iFallingDangerH, iDangerLow, iFallingDangerL;
26 //
27 3750, 1, 0, 1,
28 // iAlertLow, iFallingAlertL, iAlertHigh, iFallingAlertH;
29 //
30 0, 1, 2500, 1,
31 // iGapHigh, iGapLow, iGapFalling, iScaleHigh;
32 // 电压 负数 范围 1-5
33 17000, -2000, 1000, 5000,
34 // uiAlertDelay, uiDangerDelay, uiLatch, uiChEnable;
35 // 单位:S 同前 不自锁 使能
36 3, 1, 1, 1,
37 // uiPhaseRef, uchChType;
38 //
39 0, 16,
40 // iScaleLow, iExponentValue, iZeroPosition, iHystersisVolt;
41 // 电压*1000 负数 电压*100 迟滞
42 0, 0, /* 8*/ 0, 0,
43 // iTriggerVolt;
44 //
45 0 ,
46 // uiteeth, iTriggerSelect, uiAngle, uiBarrier;
47 // 0/1 自动选择/用户选择 0/1 0/1 无隔离栅/有隔离栅
48 60, 0, 0, 1,
49 // uiLowCutoff, uiHighCutOff, uiChConfig;
50 // 低端截止频率
51 0, 0, 0,
52
53 //--------------------------第二通道的参数Channel2Para----------------------------------------
54 // uiSampleRate, uiSamPeriod, uiMeasureType, uiMeasureUnit;
C51 COMPILER V7.10 FLASHMODULE 09/18/2008 14:09:29 PAGE 2
55 // 4.0K 250ms RMS mm/s
56 3, 3, 3, 2,
57 // uiSensorType, uiSensitive, iSensorDirection, uiAlertType;
58 // TM0180/5m(无前置) mv/um 0/1 朝向/背向
59 24, 4000, 0, 1,
60 // iDangerHigh, iFallingDangerH, iDangerLow, iFallingDangerL;
61 //
62 3750, 1, 0, 1,
63 // iAlertLow, iFallingAlertL, iAlertHigh, iFallingAlertH;
64 //
65 0, 1, 2500, 1,
66 // iGapHigh, iGapLow, iGapFalling, iScaleHigh;
67 // 电压 负数 范围 1-5
68 17000, -2000, 1000, 5000,
69 // uiAlertDelay, uiDangerDelay, uiLatch, uiChEnable;
70 // 单位:S 同前 不自锁 使能
71 3, 1, 1, 1,
72 // uiPhaseRef, uchChType;
73 //
74 0, 16,
75 // iScaleLow, iExponentValue, iZeroPosition, iHystersisVolt;
76 // 电压*1000 负数 电压*100 迟滞
77 0, 0, /*8000*/ 0, 0,
78 // iTriggerVolt;
79 //
80 0 ,
81 // uiteeth, iTriggerSelect, uiAngle, uiBarrier;
82 // 0/1 自动选择/用户选择 0/1 无隔离栅/有隔离栅
83 60, 0, 0, 1,
84 // uiLowCutoff, uiHighCutOff, uiChConfig;
85 // 低端截止频率
86 0, 0, 0,
87
88 //-----------------------------厂家信息FactoryInfo--------------------------------------------
89
90 // uiSoftwareVer;
91 //
92 403,
93 // uiProductSNHigh; uiProductSNLow long型数据分开
94 //
95 0, 0 ,
96 // uiCheckerNum, uiModuleType, uiHardwareVer;
97 //
98 0, 5, 302,
99 //----------------------------标定第一通道CalibrationChannel1---------------------------------
100 // uiVibADZero, uiVibADFull, uiDisADZero, uiDisADFull;
101 // e09
102 0x04, 0x0c8a, 0x03, 0x0384,
103 //
104 // uiLittleRangeZero, uiLittleRangeFull;
105 7, 0xb1d,
106 // uiGAPADZero, uiGAPADFull;
107 0xb9, 0x0b7d,
108 // uiDAZero, uiDAFull;
109 // 4mA 20mA
110 0x2b1, 0xd8f,
111 //----------------------------标定第二通道CalibrationChannel1---------------------------------
112 // uiVibADZero, uiVibADFull, uiDisADZero, uiDisADFull;
113 // e09
114 0x04, 0x0c8a, 0x03, 0x0384,
115
116 //
C51 COMPILER V7.10 FLASHMODULE 09/18/2008 14:09:29 PAGE 3
117 // uiLittleRangeZero, uiLittleRangeFull;
118 7, 0xb1d,
119 // uiGAPADZero, uiGAPADFull;
120 0xb9, 0x0b7d,
121 // uiDAZero, uiDAFull;
122 // 2mA 23.4mA
123 0x2b1, 0xd8f,
124 //----------------------------其他参数--------------------------------------------------------
125
126 // uiDataSpan, uiTripValue[0], uiTripValue[0], uiBypassFlag[0] uiBypassFlag[1];
127 //
128 16384, 0, 0, 0, 0
129
130 };
131 //--------------------------------------------------------------------------------------------------
132 //函数名称:void DelayTimeCount(unsigned int uiTime)
133 //功 能:由心跳计算延时的时间,心跳为10ms,所以设置的时间必须是10ms的倍数 延时的时间大约为uiTime×10ms
-
134 //输入参数:输入心跳的个数
135 //返 回:无
136 //完成日期:4/13/2007
137 //-------------------------------------------------------------------------------------------------
138 void DelayTimeCount(unsigned int uiTime)
139 {
140 1 unsigned int xdata uiHeartbeatValueBAK;
141 1 unsigned int xdata uiHeartbeatcount = 0;
142 1 unsigned int xdata uiCurrentHeartBeatNumber;
143 1 StopHeartBeat();
144 1 uiHeartbeatValueBAK = uiHeartbeatValue;
145 1 StartHeartBeat();
146 1 while (1)
147 1 {
148 2 StopHeartBeat();
149 2 uiCurrentHeartBeatNumber = uiHeartbeatValue;
150 2 StartHeartBeat();
151 2 if (uiCurrentHeartBeatNumber >= uiHeartbeatValueBAK)
152 2 {
153 3 uiHeartbeatcount = uiCurrentHeartBeatNumber - uiHeartbeatValueBAK;
154 3
155 3 }
156 2 else
157 2 {
158 3 uiHeartbeatcount = 65535 - uiHeartbeatValueBAK + uiCurrentHeartBeatNumber;
159 3 }
160 2 if (uiHeartbeatcount >= uiTime)
161 2 {
162 3 break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -