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

📄 init.lst

📁 上学时做的一个51单片机按键显示程序
💻 LST
字号:
C51 COMPILER V7.07   INIT                                                                  11/25/2005 20:21:57 PAGE 1   


C51 COMPILER V7.07, COMPILATION OF MODULE INIT
OBJECT MODULE PLACED IN init.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE init.c BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          /*
   2          * Copyright(c)2005 - 2009 danise .China
   3          * All rights reserved.
   4          * Redistribution and use in source and bianry forms
   5          * with or without modification ,are permitted provided
   6          * that following conditions are met:
   7          * 
   8          * 1.Redistrubution of source code must retain the 
   9          * above copyright notice,this list of conditions and
  10          * following disclaimer.
  11          * 
  12          * 2.Redistributions in binary form must reproduce the 
  13          * above copyright notice,this list of conditions and 
  14          * following disclaimer in the documentation and /or other
  15          * materials provided with the distribution.
  16          * 
  17          * Alternately, this acknowledgment may appear in the software
  18          * itself,if and wherever such third-party acknowledgements
  19          * normally appear.
  20          *
  21          * This software is designed for key board and led display.
  22          * 
  23                  
  24          */
  25          #include "./include/init.h"
  26          #include "./include/global.h"
  27          #include "./include/datatypes.h"
  28          #include "./include/i2c.h"
  29          void CP932Timer0Init(void)
  30          {
  31   1              CPL932_TMOD |= 0x01; /*timer1 method 1,timer 0 methed 1*/
  32   1              CPL932_TL0 = 0x6b;
  33   1              CPL932_TH0 = 0x71; /*osc 7.3M  ,10 ms  */
  34   1              CPL932_ET0 = 1; /* set timer0 interrupt */
  35   1              CPL932_TR0 = 1; /* start timer 0*/      
  36   1      }
  37          void CP932Timer1Init(void)
  38          {
  39   1              CPL932_TMOD |= 0x10; /*timer1 method 1,timer 0 methed 1*/
  40   1              CPL932_TL1 = 0x1;
  41   1              CPL932_TH1 = 0x0; /*osc 7.3M  ,10 ms  */
  42   1              CPL932_ET1 = 1; /* set timer0 interrupt */
  43   1              CPL932_TR1 = 1; /* start timer 0 */     
  44   1      }       
  45          void CP932ISRInit(void)
  46          {
  47   1              CPL932_EA = 1;/* open all*/
  48   1      }
  49          void CP932PortInit(void)
  50          {
  51   1              CPL932_PORTMOD_P0M1 = 0x0; /* Quasi-Bidirectional*/
  52   1              CPL932_PORTMOD_P0M2 = 0x0;
  53   1              CPL932_PORTMOD_P1M1 = 0x0C;
  54   1              CPL932_PORTMOD_P1M2 = 0x0C;
  55   1              CPL932_PORTMOD_P2M1 = 0x0;
C51 COMPILER V7.07   INIT                                                                  11/25/2005 20:21:57 PAGE 2   

  56   1              CPL932_PORTMOD_P2M2 = 0x0;
  57   1              
  58   1      }
  59          void InitSysData(void)
  60          {
  61   1              LedsShowStr.length  = 0;
  62   1          LedsShowStr.isdot   =0;
  63   1          LedsShowStr.dotposition =LED_MAX_NUM-1;
  64   1          memset(&LedsShowStr.ledbuf[0],0,8); 
  65   1      }
  66          
  67          void InitIIC(void)
  68          {
  69   1              EI2C=1;
  70   1              SetBus(SLAVEADD);
  71   1              I2CON = 0x44;
  72   1              INT1 = 1;        
  73   1      }
  74          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     80    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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