C51 COMPILER V9.59.0.0 APP 06/10/2021 18:07:14 PAGE 1 C51 COMPILER V9.59.0.0, COMPILATION OF MODULE APP OBJECT MODULE PLACED IN .\list\APP.obj COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE ..\App\src\APP.c LARGE OMF2 OPTIMIZE(8,SPEED) BROWSE INCDIR(..\Driver\in -c;..\User;..\App\inc) DEBUG PRINT(.\list\APP.lst) TABS(2) OBJECT(.\list\APP.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 "APP.h" 14 15 //======================================================================== 16 // 本地常量声明 17 //======================================================================== 18 19 u8 code t_display[]={ //标准字库 20 // 0 1 2 3 4 5 6 7 8 9 A B C D E F 21 0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71, 22 //black - H J K L N o P U t G Q r M y 23 0x00,0x40,0x76,0x1E,0x70,0x38,0x37,0x5C,0x73,0x3E,0x78,0x3d,0x67,0x50,0x37,0x6e, 24 0xBF,0x86,0xDB,0xCF,0xE6,0xED,0xFD,0x87,0xFF,0xEF,0x46}; //0. 1. 2. 3. 4. 5. 6. 7. 8. 9. -1 25 26 u8 code T_COM[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; //位码 27 28 u8 code T_KeyTable[16] = {0,1,2,0,3,0,0,0,4,0,0,0,0,0,0,0}; 29 30 //======================================================================== 31 // 本地变量声明 32 //======================================================================== 33 34 u8 LED8[8]; //显示缓冲 35 u8 display_index; //显示位索引 36 37 u8 IO_KeyState, IO_KeyState1, IO_KeyHoldCnt; //行列键盘变量 38 u8 KeyHoldCnt; //键按下计时 39 u8 KeyCode; //给用户使用的键码 40 u8 cnt50ms; 41 42 u8 hour,minute,second; //RTC变量 43 u16 msecond; 44 45 //======================================================================== 46 // 函数: APP_config 47 // 描述: 用户应用程序初始化. 48 // 参数: None. 49 // 返回: None. 50 // 版本: V1.0, 2020-09-24 51 //======================================================================== 52 void APP_config(void) 53 { 54 1 // Lamp_init(); C51 COMPILER V9.59.0.0 APP 06/10/2021 18:07:14 PAGE 2 55 1 // ADtoUART_init(); 56 1 // INTtoUART_init(); 57 1 // RTC_init(); 58 1 // I2C_PS_init(); 59 1 // SPI_PS_init(); 60 1 // EEPROM_init(); 61 1 // WDT_init(); 62 1 // PCA_PWM_init(); 63 1 // PCA_Capture_init(); 64 1 // PWM15bit_init(); 65 1 // BMM_AD_init(); 66 1 // BMM_M2M_init(); 67 1 // BMM_UART_init(); 68 1 // BMM_SPI_PS_init(); 69 1 BMM_LCM_init(); 70 1 } 71 72 //======================================================================== 73 // 函数: DisplayScan 74 // 描述: 显示扫描函数. 75 // 参数: None. 76 // 返回: None. 77 // 版本: V1.0, 2020-09-25 78 //======================================================================== 79 void DisplayScan(void) 80 { 81 1 P7 = ~T_COM[7-display_index]; 82 1 P6 = ~t_display[LED8[display_index]]; 83 1 if(++display_index >= 8) display_index = 0; //8位结束回0 84 1 } MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 69 ---- CONSTANT SIZE = 67 ---- XDATA SIZE = 20 ---- 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)