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

📄 keyled.lst

📁 基于单片机C8051F020
💻 LST
字号:
C51 COMPILER V8.02   KEYLED                                                                05/21/2008 16:41:03 PAGE 1   


C51 COMPILER V8.02, COMPILATION OF MODULE KEYLED
OBJECT MODULE PLACED IN keyled.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE keyled.c LARGE BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include <c8051f020.h >
   2          #include "keyled.h"
   3          #include "iic.h"
   4          
   5          void Keyled_Config (void) {
   6   1      
   7   1      
   8   1      
   9   1              WDTCN = 0x07;   // Watchdog Timer Control Register
  10   1          WDTCN = 0xDE;   // Disable WDT
  11   1          WDTCN = 0xAD;
  12   1      
  13   1      
  14   1      
  15   1              XBR0      = 0xE7;  
  16   1          XBR1      = 0x05;
  17   1          XBR2      = 0x44;
  18   1      
  19   1          P0MDOUT = 0x1D; // Output configuration for P0 
  20   1       
  21   1      
  22   1      
  23   1      
  24   1              OSCXCN = 0x00;  // EXTERNAL Oscillator Control Register 
  25   1      
  26   1              OSCICN = 0x06;  // Internal Oscillator Control Register
  27   1      
  28   1              
  29   1      
  30   1      
  31   1              SMB0CN = 0x40;  // SMBus Control Register
  32   1              SMB0ADR = 0xA0; // SMBus Address Register
  33   1              SMB0CR = 0x60;  // SMBus Clock Rate Register
  34   1      
  35   1              IT0=1;                  // INT0 IS  mode 1
  36   1      
  37   1      }  
  38          
  39          void Delay_zlg7290(unsigned int time )
  40          {
  41   1              while(time--);
  42   1      }
  43          
  44          void  Print_zlg7290( unsigned char bits, unsigned char content )
  45          {
  46   1      
  47   1      
  48   1                        unsigned char temp[2];
  49   1                        temp[0]=(0x60+bits);
  50   1                        temp[1]=content;
  51   1                      
  52   1                        SmbSend ( 0x70 ,0x07 ,2, temp );                      
  53   1                        Delay_zlg7290(2000);  
  54   1      }
  55                  
C51 COMPILER V8.02   KEYLED                                                                05/21/2008 16:41:03 PAGE 2   

  56          
  57          unsigned char   Wait_Key( )
  58          {               
  59   1                      unsigned char  keyvalue[1];
  60   1                  
  61   1                      IE0=0;
  62   1                      while ( IE0==0 );
  63   1                      SmbRec( 0x70,0x01,2,keyvalue);
  64   1                      
  65   1                      return(keyvalue[0]);            
  66   1      }
  67          
  68          void Clear_zlg7290( )
  69          {               
  70   1              unsigned char i;
  71   1                      for(i=0;i<8;i++)
  72   1                      {
  73   2                              Print_zlg7290(i,0x1f);
  74   2                               
  75   2                      }
  76   1      }
  77          
  78          void Disp_Shift( unsigned char direction, unsigned char shiftnum)
  79          {
  80   1              unsigned char command[1];
  81   1                      command[0]=direction+shiftnum-1;
  82   1                      
  83   1                      SmbSend(0x70,0x07,1, command );
  84   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    183    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----       5
   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 + -