C51 COMPILER V9.59.0.0 COMPARE 03/09/2021 14:04:35 PAGE 1 C51 COMPILER V9.59.0.0, COMPILATION OF MODULE COMPARE OBJECT MODULE PLACED IN .\list\compare.obj COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE compare.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\list\compa -re.lst) TABS(2) OBJECT(.\list\compare.obj) line level source 1 /*---------------------------------------------------------------------*/ 2 /* --- STC MCU Limited ------------------------------------------------*/ 3 /* --- STC 1T Series MCU Demo Programme -------------------------------*/ 4 /* --- Mobile: (86)13922805190 ----------------------------------------*/ 5 /* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/ 6 /* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/ 7 /* --- Web: www.STCMCU.com --------------------------------------------*/ 8 /* --- Web: www.STCMCUDATA.com ---------------------------------------*/ 9 /* --- QQ: 800003751 -------------------------------------------------*/ 10 /* Èç¹ûÒªÔÚ³ÌÐòÖÐʹÓô˴úÂë,ÇëÔÚ³ÌÐòÖÐ×¢Ã÷ʹÓÃÁËSTCµÄ×ÊÁϼ°³ÌÐò */ 11 /*---------------------------------------------------------------------*/ 12 13 #include "compare.h" 14 15 //======================================================================== 16 // º¯Êý:void CMP_Inilize(CMP_InitDefine *CMPx) 17 // ÃèÊö: ¶¨Ê±Æ÷³õʼ»¯³ÌÐò. 18 // ²ÎÊý: CMPx: ½á¹¹²ÎÊý,Çë²Î¿¼compare.hÀïµÄ¶¨Òå. 19 // ·µ»Ø: ³É¹¦·µ»Ø0, ¿Õ²Ù×÷·µ»Ø1,´íÎó·µ»Ø2. 20 // °æ±¾: V1.0, 2012-10-22 21 //======================================================================== 22 void CMP_Inilize(CMP_InitDefine *CMPx) 23 { 24 1 CMPCR1 = 0; 25 1 CMPCR2 = CMPx->CMP_OutDelayDuty & 0x3f; //±È½Ï½á¹û±ä»¯ÑÓʱÖÜÆÚÊý, 0~63 26 1 if(CMPx->CMP_EN == ENABLE) CMPCR1 |= CMPEN; //ÔÊÐí±È½ÏÆ÷ ENABLE,DISABLE 27 1 if(CMPx->CMP_RiseInterruptEn == ENABLE) CMPCR1 |= PIE; //ÔÊÐíÉÏÉýÑØÖÐ¶Ï ENABLE,DISABLE 28 1 if(CMPx->CMP_FallInterruptEn == ENABLE) CMPCR1 |= NIE; //ÔÊÐíϽµÑØÖÐ¶Ï ENABLE,DISABLE 29 1 if(CMPx->CMP_P_Select == CMP_P_ADC) CMPCR1 |= PIS; //±È½ÏÆ÷ÊäÈëÕý¼«ÐÔÑ¡Ôñ, CMP_P_P37: Ñ¡ÔñÄÚ²¿P3.7×öÕý -ÊäÈë, CMP_P_ADC: ÓÉADCIS[2:0]ËùÑ¡ÔñµÄADCÊäÈë¶Ë×öÕýÊäÈë. 30 1 if(CMPx->CMP_N_Select == CMP_N_P36) CMPCR1 |= NIS; //±È½ÏÆ÷ÊäÈ븺¼«ÐÔÑ¡Ôñ, CMP_N_GAP: Ñ¡ÔñÄÚ²¿BandGapµ -çѹBGv×ö¸ºÊäÈë, CMP_N_P36: Ñ¡ÔñÍⲿP3.6×öÊäÈë. 31 1 if(CMPx->CMP_Outpt_En == ENABLE) CMPCR1 |= CMPOE; //ÔÊÐí±È½Ï½á¹ûÊä³öµ½P3.4/P4.1, ENABLE,DISABLE 32 1 if(CMPx->CMP_InvCMPO == ENABLE) CMPCR2 |= INVCMPO; //±È½ÏÆ÷Êä³öÈ¡·´, ENABLE,DISABLE 33 1 if(CMPx->CMP_100nsFilter == DISABLE) CMPCR2 |= DISFLT; //ÄÚ²¿0.1uFÂ˲¨, ENABLE,DISABLE 34 1 P_SW2 = (P_SW2 & ~(0x08)) | CMPx->CMP_P_SW; 35 1 if(CMPx->CMP_Polity > Polity_3) return; //´íÎó 36 1 CMP_Polity(CMPx->CMP_Polity); //Ö¸¶¨ÖжÏÓÅÏȼ¶(µÍµ½¸ß) Polity_0,Polity_1,Polity_2,Polity_3 37 1 } 38 39 /********************* UART1ÖжϺ¯Êý************************/ 40 void CMP_int (void) interrupt CMP_VECTOR 41 { 42 1 CMPCR1 &= ~CMPIF; //Çå³ýÖжϱêÖ¾ 43 1 P47 = CMPCR1 & 0x01; //ÖжϷ½Ê½¶ÁÈ¡±È½ÏÆ÷±È½Ï½á¹û 44 1 } MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 207 ---- CONSTANT SIZE = ---- ---- XDATA SIZE = ---- ---- PDATA SIZE = ---- ---- DATA SIZE = ---- ---- C51 COMPILER V9.59.0.0 COMPARE 03/09/2021 14:04:35 PAGE 2 IDATA SIZE = ---- ---- BIT SIZE = ---- ---- END OF MODULE INFORMATION. C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)