自己的项目

源代码在线查看: jhd.lst

软件大小: 29 K
上传用户: ASD___1234
关键词: 项目
下载地址: 免注册下载 普通下载 VIP

相关代码

				C51 COMPILER V7.09   JHD                                                                   10/20/2006 11:30:08 PAGE 1   
				
				
				C51 COMPILER V7.09, COMPILATION OF MODULE JHD
				OBJECT MODULE PLACED IN jhd.obj
				COMPILER INVOKED BY: D:\keil709\exe\C51\BIN\C51.EXE c\jhd.c BROWSE DEBUG OBJECTEXTEND PRINT(.\jhd.lst) OBJECT(jhd.obj)
				
				line level    source
				
				   1          #include  
				   2          
				   3          
				   4          //****************************
				   5          extern void delay_155us();
				   6          extern void delay_half_1s(int delay_half_1s_time);
				   7          extern void delay_8ms(int delay_8ms_time);
				   8          //****************************
				   9          
				  10          
				  11          
				  12          char bdata temp_ramaddr;
				  13          sbit jhd529_bf = temp_ramaddr^7;
				  14          
				  15          char jhd529_addr;
				  16          
				  17          //*********** LCD复位子程序 *****
				  18          void jhd529_reset_lcd()
				  19          {
				  20   1         jhd529_reset = 1;  
				  21   1         jhd529_reset = 0;  
				  22   1         delay_155us();
				  23   1         jhd529_reset = 1;        
				  24   1      }//end 
				  25          //***********************************
				  26          
				  27          //*********** 通讯模式子程序 *****
				  28          void jhd529_communication_mode(int comm_mode)
				  29          {
				  30   1         jhd529_psb = 1;  
				  31   1         delay_155us();
				  32   1         if(comm_mode == 1)
				  33   1            jhd529_psb = 1;   //4/8 bit
				  34   1         else
				  35   1            jhd529_psb = 0;   //serial    
				  36   1      }//end 
				  37          //***********************************
				  38          
				  39          //*********** 写数据子程序 *****
				  40          void jhd529_write_data(char data_data)
				  41          { 
				  42   1         jhd529_bf = 1;
				  43   1      
				  44   1         jhd529_rs = 0;
				  45   1         jhd529_rw = 1;  
				  46   1         while(jhd529_bf)
				  47   1          { 
				  48   2            P1 = 0xFF;
				  49   2            jhd529_e = 1;
				  50   2            temp_ramaddr = P1;
				  51   2            jhd529_e = 0;
				  52   2          }
				  53   1      
				  54   1         jhd529_rs = 1;
				  55   1         jhd529_rw = 0;
				C51 COMPILER V7.09   JHD                                                                   10/20/2006 11:30:08 PAGE 2   
				
				  56   1         P1 = data_data;
				  57   1         jhd529_e = 1;
				  58   1         jhd529_e = 0;    
				  59   1      }//end func
				  60          //*******************************
				  61          
				  62          //*********** 写指令子程序 *****
				  63          void jhd529_write_instruction(char data_instruction)
				  64          {
				  65   1         jhd529_bf = 1;
				  66   1      
				  67   1         jhd529_rs = 0;
				  68   1         jhd529_rw = 1;  
				  69   1         while(jhd529_bf)
				  70   1          { 
				  71   2            P1 = 0xFF;
				  72   2            jhd529_e = 1;
				  73   2            temp_ramaddr = P1;
				  74   2            jhd529_e = 0;
				  75   2          }
				  76   1      
				  77   1         jhd529_rw = 0;
				  78   1         P1 = data_instruction;
				  79   1         jhd529_e = 1;
				  80   1         jhd529_e = 0;    
				  81   1      }//end func
				  82          //*******************************
				  83          
				  84          //************ LCD初始化 ********
				  85          void jhd529_initial()
				  86          {
				  87   1         jhd529_communication_mode(1);
				  88   1         delay_half_1s(1);
				  89   1      
				  90   1         jhd529_write_instruction(0x01);
				  91   1         delay_155us();
				  92   1      
				  93   1         jhd529_write_instruction(0x30);
				  94   1         delay_155us();
				  95   1      
				  96   1         jhd529_write_instruction(0x0C);
				  97   1         delay_155us();
				  98   1      
				  99   1         jhd529_write_instruction(0x01);
				 100   1         delay_8ms(5);
				 101   1      
				 102   1         jhd529_write_instruction(0x06);
				 103   1         delay_155us();
				 104   1      
				 105   1      }//end func
				 106          //********************************
				 107          
				 108          
				 109          
				
				
				MODULE INFORMATION:   STATIC OVERLAYABLE
				   CODE SIZE        =    153    ----
				   CONSTANT SIZE    =   ----    ----
				   XDATA SIZE       =   ----    ----
				   PDATA SIZE       =   ----    ----
				   DATA SIZE        =      2       2
				C51 COMPILER V7.09   JHD                                                                   10/20/2006 11:30:08 PAGE 3   
				
				   IDATA SIZE       =   ----    ----
				   BIT SIZE         =   ----    ----
				END OF MODULE INFORMATION.
				
				
				C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
							

相关资源