C51 COMPILER V9.52.0.0   INTERRUPT                                                         09/25/2018 21:12:07 PAGE 1   


C51 COMPILER V9.52.0.0, COMPILATION OF MODULE INTERRUPT
OBJECT MODULE PLACED IN .\Output\Interrupt.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\User\Source\Application\Interrupt.c LARGE OMF2 WARNINGLEVEL(0) OPTIMIZE(
                    -5,SPEED) BROWSE INCDIR(..\Library\FU68xx_Hardware_Driver\Include;..\User\Include) DEBUG PRINT(.\Listing\Interrupt.lst) O
                    -BJECT(.\Output\Interrupt.obj)

line level    source

   1          /**************************** (C) COPYRIGHT 2018 Fortiortech shenzhen *****************************
   2          * File Name          : Interrupt.c
   3          * Author             : Cooper Fang, Fortiortech Appliction Team
   4          * Version            : V1.0
   5          * Date               : 2018-09-25
   6          * Description        : This file contains the configuration of ISR.
   7          ***************************************************************************************************
   8          * All Rights Reserved
   9          **************************************************************************************************/
  10          
  11          /* Includes -------------------------------------------------------------------------------------*/
  12          #include <FU68xx_2.h>
  13          #include <Myproject.h>
  14          
  15          #if (TIM2MODE == TIM2IN)                                                                            // 选
             -择输入模式时，编译输入模式下的Timer2中断
  16          
  17          void TIM2_IN_INT(void) interrupt 4
  18          {
  19   1          if(ReadBit(TIM2_CR1, T2IP))                                                                                                                                         //周期检测标志位为1时，读取周期时间/高�
             -�平时间
  20   1          {
  21   2              PWMIN.PWMINHigh   = TIM2__DR;                                                                                                                       // PWM高电平时间
  22   2                  PWMIN.PWMINPeriod = TIM2__ARR;                                                                                                                              // PWM周期时间
  23   2       
  24   2              ClrBit(TIM2_CR1, T2IP);                                                                     // 清
             -除周期检测标志位
  25   2          }
  26   1          
  27   1          if(ReadBit(TIM2_CR1, T2IF))                                                                     // 计
             -数器上溢标志位为1时，清除各个相关变量
  28   1          {
  29   2              PWMIN.PWMINHigh   = 0;                                                                      // 清
             -除高电平时间
  30   2                      PWMIN.PWMINPeriod = 0;                                                                      // 清除周
             -期时间
  31   2                                      
  32   2                      TIM2__CNTR = 0;                                                                                                                                                         // 清零TIM2__CNTR
  33   2                      TIM2__DR   = 0;                                                                                                                                                         // 清零TIM2__DR
  34   2                      TIM2__ARR  = 0;                                                                                                                                                         // 清零TIM2__ARR
  35   2                                              
  36   2              ClrBit(TIM2_CR1, T2IF);
  37   2          }
  38   1      }
  39          
  40          #elif (TIM2MODE == TIM2OUT)                                                                         // 选
             -择输出模式时，编译输出模式下的Timer2中断
              
              void TIM2_OUT_INT(void) interrupt 4
              {
                  if(ReadBit(TIM2_CR1, T2IF))                                                                     // 上
             -溢中断标志位置1时，即一个PWM周期翻转一次IO口
                      {               
C51 COMPILER V9.52.0.0   INTERRUPT                                                         09/25/2018 21:12:07 PAGE 2   

                              GP05 = ~GP05;                                                                               // 翻转GP0
             -5 IO口,LED灯闪烁
                              ClrBit(TIM2_CR1, T2IF);                                                                     // 清除上
             -溢中断标志位
                      }
              }
              
              #endif
  52          
  53          
  54          
  55          
  56          
  57          
  58          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     73    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
