⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 framemodule.lst

📁 该程序完成了c8051外围电路的驱动和串口协议的编写。希望能给大家学习51单片机带来帮助
💻 LST
字号:
C51 COMPILER V7.10   FRAMEMODULE                                                           09/18/2008 14:09:28 PAGE 1   


C51 COMPILER V7.10, COMPILATION OF MODULE FRAMEMODULE
OBJECT MODULE PLACED IN Framemodule.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 20progress\Framemodule.c BROWSE DEBUG OBJECTEXTEND PRINT(.\Framemodule.lst)
                    - OBJECT(Framemodule.obj)

line level    source

   1          //*******************************************************************************
   2          //Copyright (c) 2007,派利斯电子(北京)有限公司 硬件部
   3          //文件名称: Framemodule.c
   4          //摘    要: 本文件主要包含PT2060程序中框架部分的操作
   5          //当前版本: D-1 
   6          //作    者:  佟文杰
   7          //完成日期: 4/13/2007
   8          //修 改 人:
   9          //修改原因:
  10          //修改日期:
  11          //*******************************************************************************
  12          #define FRAMEMODULE_C
  13          
  14          #include <math.h>
  15          #include "hardware.h"
  16          #include "currentmodule.h"
  17          #include "channelstatus.h"
  18          #include "Framemodule.h"
  19          #include "adsample.h"
  20          #include "alarm.h"
  21          #include "can.h"
  22          #include "comm.h"
  23          #include "flashmodule.h"
  24          #include "C8051F020.H"                  //主函数的头文件调用最后全归结到调用framemodule.h文件
  25          
  26          //extern unsigned int SamplePTR0; ///////////////////////////////////
  27          //unsigned int idata SamplePTR0BAK;
  28          //unsigned char idata uchRMSFlag;
  29          //unsigned char idata uchRMSFlagBAK;
  30          
  31          xdata union para1 All;
  32          xdata struct Status MainModule;
  33          extern xdata unsigned int  uiHeartbeatValue;
  34          
  35          unsigned int idata uiHeartBeatNumber;
  36          unsigned int idata uiHeartbeatcount;            //20080322
  37          
  38          
  39          
  40          //------------------------------------------------------------------------------------------
  41          //以下函数是框架调用的SET函数
  42          //-----------------------------------------------------------------------------------------
  43          void SetSystemOkStatusMain(unsigned char uchOkStatus)
  44          {
  45   1              MainModule.uchSystemOKStatus = uchOkStatus;     
  46   1      }
  47          
  48          void SetChannelOkStatusMain(unsigned char uchChannel,unsigned char uchOkStatus)
  49          {                                                                                                  
  50   1              MainModule.uchChannelOK[uchChannel - 1] = uchOkStatus;
  51   1      }
  52          
  53          void SetPowerStatusMain(unsigned char uchPowerStatus)
  54          {
C51 COMPILER V7.10   FRAMEMODULE                                                           09/18/2008 14:09:28 PAGE 2   

  55   1              MainModule.uchPowerStatus = uchPowerStatus;
  56   1      }
  57          
  58          void SetAlarmStatusMain(unsigned char uchChannel, unsigned char uchAlarmStatus)   
  59          {
  60   1              MainModule.uchChannelAlarm[uchChannel - 1] = uchAlarmStatus;    
  61   1      }
  62          
  63          void SetCurrentMeasureValueMain(unsigned char uchChannel,float iValue)
  64          {                                                                                           
  65   1              MainModule.iCurrentMeasureValue[uchChannel - 1] = iValue;       
  66   1      }
  67          
  68          void SetPercentValueMain(unsigned char uchChannel,float iValue)
  69          {                                                                                         
  70   1              MainModule.iPercentValue[uchChannel - 1] = iValue;      
  71   1      }
  72          
  73          void SetGapVoltageMain(unsigned char uchChannel,int iValue)
  74          {                                                                                    
  75   1              MainModule.iGapVoltage[uchChannel - 1] = iValue;
  76   1      }
  77          
  78          void SetHWTripleStatusMain(unsigned int uchHWTripleStatus)              
  79          {
  80   1              MainModule.uchHWTripleStatus = uchHWTripleStatus;
  81   1      }
  82          
  83          void SetHWBypassStatusMain(unsigned char uchBypassStatus)       
  84          {
  85   1              MainModule.uchHWBypassStatus = uchBypassStatus;
  86   1      }
  87          
  88          void SetModuleStatusMain(unsigned char uchModuleStatus)         
  89          {
  90   1              unsigned char xdata uchTempStatus;
  91   1      
  92   1              if ((uchModuleStatus == 0x04) || (uchModuleStatus == 0x01) || (uchModuleStatus == 0x02)
  93   1                              || (uchModuleStatus == 0x03))
  94   1              {
  95   2                      uchTempStatus = uchModuleStatus;        //模块类型如果是运行、Config、标定和测试则负值,否则是0X00,什么也不执

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -