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

📄 cpu.lst

📁 一款电力行业使用的温湿度控制器源代码 湿度传感器采用HF3223 温度采用DS18B20 单片机采用mega8 编程采用winavr2007
💻 LST
字号:
   1               		.file	"cpu.c"
   2               		.arch atmega8
   3               	__SREG__ = 0x3f
   4               	__SP_H__ = 0x3e
   5               	__SP_L__ = 0x3d
   6               	__tmp_reg__ = 0
   7               	__zero_reg__ = 1
   8               		.global __do_copy_data
   9               		.global __do_clear_bss
  11               		.text
  12               	.Ltext0:
 124               	.global	f_60s
 125               	.global	f_60s
 126               		.section .bss
 129               	f_60s:
 130 0000 00        		.skip 1,0
 131               	.global	f_5s
 132               	.global	f_5s
 135               	f_5s:
 136 0001 00        		.skip 1,0
 137               	.global	f_1s
 138               	.global	f_1s
 141               	f_1s:
 142 0002 00        		.skip 1,0
 143               	.global	f_500ms
 144               	.global	f_500ms
 147               	f_500ms:
 148 0003 00        		.skip 1,0
 149               	.global	f_15ms
 150               	.global	f_15ms
 153               	f_15ms:
 154 0004 00        		.skip 1,0
 155               	.global	SystemMode
 156               	.global	SystemMode
 159               	SystemMode:
 160 0005 00        		.skip 1,0
 161               		.text
 163               	.global	TimerInit
 165               	TimerInit:
   1:drive/cpu.c   **** #include"inc/config.h"
   2:drive/cpu.c   **** 
   3:drive/cpu.c   **** BOOL            f_15ms  ;
   4:drive/cpu.c   **** BOOL            f_500ms ;
   5:drive/cpu.c   **** BOOL            f_1s        ;
   6:drive/cpu.c   **** BOOL            f_5s        ;
   7:drive/cpu.c   **** BOOL            f_60s       ;
   8:drive/cpu.c   **** u08			   	SYS_ch      ;
   9:drive/cpu.c   **** u08			  	AlrmStatusT ;
  10:drive/cpu.c   **** u08			 	AlrmStatusH ;
  11:drive/cpu.c   **** u08         	Humidity    ;
  12:drive/cpu.c   **** int16           Temperature ;
  13:drive/cpu.c   **** BOOL			f_sensor_t  ;	//温度传感器不存在
  14:drive/cpu.c   **** BOOL			f_sensor_h  ;
  15:drive/cpu.c   **** u08			    RelayBreak  ;
  16:drive/cpu.c   **** u08             SystemStatus;
  17:drive/cpu.c   **** u08             SystemMode =AUTO_TH  ;
  18:drive/cpu.c   **** /*******************system time base  *****************************/
  19:drive/cpu.c   **** #define _CPU_C    1
  20:drive/cpu.c   **** BOOL            f_15ms          =false;  //time base
  21:drive/cpu.c   **** BOOL            f_500ms         =false;  //time base
  22:drive/cpu.c   **** BOOL            f_1s            =false;
  23:drive/cpu.c   **** BOOL            f_5s            =false;
  24:drive/cpu.c   **** BOOL            f_60s	        =false;
  25:drive/cpu.c   **** 
  26:drive/cpu.c   **** 
  27:drive/cpu.c   **** //*****************************************************************//
  28:drive/cpu.c   **** //functionname:     void  TimerInit(void);
  29:drive/cpu.c   **** //purpose:		 initialize	timer by user
  30:drive/cpu.c   **** //input:
  31:drive/cpu.c   **** //output
  32:drive/cpu.c   **** //call:
  33:drive/cpu.c   **** //becalled;
  34:drive/cpu.c   **** //date:			2006.04.13
  35:drive/cpu.c   **** //created:		 
  36:drive/cpu.c   **** //*******************************************************************
  37:drive/cpu.c   **** void  TimerInit(void)
  38:drive/cpu.c   **** {
 167               	.LM1:
 168               	/* prologue: frame size=0 */
 169               	/* prologue end (size=0) */
  39:drive/cpu.c   ****   /*t0 initailize*/
  40:drive/cpu.c   ****   /*
  41:drive/cpu.c   ****   TCCR0  =  0x00; 									//stop
  42:drive/cpu.c   ****   //TCCR0 |= (1<<CS02)|(1<<CS00);                   //1024 div
  43:drive/cpu.c   ****   TCCR0  = (1<<CS02);                               //256 div
  44:drive/cpu.c   ****   TCNT0  = TIMER0_BGN_VAL; 
  45:drive/cpu.c   ****   TIMSK  |=(1<<TOIE0);  */                             //enable the t0 overflow intterrupt
  46:drive/cpu.c   **** 	
  47:drive/cpu.c   ****   /*t2 intialize*/
  48:drive/cpu.c   ****   /*  */
  49:drive/cpu.c   **** 
  50:drive/cpu.c   ****   TCCR2  =  0x00;  
 171               	.LM2:
 172 0000 15BC      		out 69-0x20,__zero_reg__
  51:drive/cpu.c   ****   TCCR2  = (1<<CS22)|(1<<CS21); // T2 256分频工作
 174               	.LM3:
 175 0002 86E0      		ldi r24,lo8(6)
 176 0004 85BD      		out 69-0x20,r24
  52:drive/cpu.c   ****   TIMSK  |= (1<<TOIE2);                    //enable the t0 overflow intterrupt
 178               	.LM4:
 179 0006 89B7      		in r24,89-0x20
 180 0008 8064      		ori r24,lo8(64)
 181 000a 89BF      		out 89-0x20,r24
  53:drive/cpu.c   ****   TCNT2   = TIMER2_BGN_VAL ;
 183               	.LM5:
 184 000c 80EE      		ldi r24,lo8(-32)
 185 000e 84BD      		out 68-0x20,r24
  54:drive/cpu.c   ****   
  55:drive/cpu.c   ****   /*t0 as an counter ,count the pulse on t0 pin*/
  56:drive/cpu.c   **** 
  57:drive/cpu.c   ****    TCCR0  =  0x00; 	
 187               	.LM6:
 188 0010 13BE      		out 83-0x20,__zero_reg__
  58:drive/cpu.c   ****    TCCR0  |= (1<<CS02)|(1<<CS01)|(1<<CS00);//外部上升边沿
 190               	.LM7:
 191 0012 83B7      		in r24,83-0x20
 192 0014 8760      		ori r24,lo8(7)
 193 0016 83BF      		out 83-0x20,r24
  59:drive/cpu.c   ****    TCNT0   = 0 ;  
 195               	.LM8:
 196 0018 12BE      		out 82-0x20,__zero_reg__
  60:drive/cpu.c   **** 
  61:drive/cpu.c   ****   /*TIMER1**/ 
  62:drive/cpu.c   ****   TCCR1B =0X00;
 198               	.LM9:
 199 001a 1EBC      		out 78-0x20,__zero_reg__
  63:drive/cpu.c   ****   TCCR1B =(1<<CS11);//8M8FENGPIN
 201               	.LM10:
 202 001c 82E0      		ldi r24,lo8(2)
 203 001e 8EBD      		out 78-0x20,r24
  64:drive/cpu.c   ****   TIMSK  |= (1<<TOIE1);                    //enable the t0 overflow intterrupt
 205               	.LM11:
 206 0020 89B7      		in r24,89-0x20
 207 0022 8460      		ori r24,lo8(4)
 208 0024 89BF      		out 89-0x20,r24
  65:drive/cpu.c   ****   TCNT1  =(65536-20000);//20MS 定时
 210               	.LM12:
 211 0026 80EE      		ldi r24,lo8(-20000)
 212 0028 91EB      		ldi r25,hi8(-20000)
 213 002a 9DBD      		out (76)+1-0x20,r25
 214 002c 8CBD      		out 76-0x20,r24
 215               	/* epilogue: frame size=0 */
 216 002e 0895      		ret
 217               	/* epilogue end (size=1) */
 218               	/* function TimerInit size 24 (23) */
 220               	.Lscope0:
 222               	.global	timer0_start
 224               	timer0_start:
  66:drive/cpu.c   **** 
  67:drive/cpu.c   **** 
  68:drive/cpu.c   **** }
  69:drive/cpu.c   **** 
  70:drive/cpu.c   **** 
  71:drive/cpu.c   **** void timer0_start(void)
  72:drive/cpu.c   **** {   
 226               	.LM13:
 227               	/* prologue: frame size=0 */
 228               	/* prologue end (size=0) */
  73:drive/cpu.c   ****    TCCR0  |= (1<<CS02)|(1<<CS01)|(1<<CS00);//外部上升边沿
 230               	.LM14:
 231 0030 83B7      		in r24,83-0x20
 232 0032 8760      		ori r24,lo8(7)
 233 0034 83BF      		out 83-0x20,r24
  74:drive/cpu.c   ****    TCNT0   = 0 ;   
 235               	.LM15:
 236 0036 12BE      		out 82-0x20,__zero_reg__
 237               	/* epilogue: frame size=0 */
 238 0038 0895      		ret
 239               	/* epilogue end (size=1) */
 240               	/* function timer0_start size 5 (4) */
 242               	.Lscope1:
 244               	.global	timer0_stop
 246               	timer0_stop:
  75:drive/cpu.c   **** }
  76:drive/cpu.c   **** void timer0_stop(void)
  77:drive/cpu.c   **** {
 248               	.LM16:
 249               	/* prologue: frame size=0 */
 250               	/* prologue end (size=0) */
  78:drive/cpu.c   ****    TCCR0  =0x00;
 252               	.LM17:
 253 003a 13BE      		out 83-0x20,__zero_reg__
 254               	/* epilogue: frame size=0 */
 255 003c 0895      		ret
 256               	/* epilogue end (size=1) */
 257               	/* function timer0_stop size 2 (1) */
 259               	.Lscope2:
 260               		.comm SYS_ch,1,1
 261               		.comm AlrmStatusT,1,1
 262               		.comm AlrmStatusH,1,1
 263               		.comm Humidity,1,1
 264               		.comm Temperature,2,1
 265               		.comm f_sensor_t,1,1
 266               		.comm f_sensor_h,1,1
 267               		.comm RelayBreak,1,1
 268               		.comm SystemStatus,1,1
 284               		.text
 286               	Letext:
 287               	/* File "drive/cpu.c": code   31 = 0x001f (  28), prologues   0, epilogues   3 */
DEFINED SYMBOLS
                            *ABS*:00000000 cpu.c
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:3      *ABS*:0000003f __SREG__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:4      *ABS*:0000003e __SP_H__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:5      *ABS*:0000003d __SP_L__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:6      *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:7      *ABS*:00000001 __zero_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:129    .bss:00000000 f_60s
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:135    .bss:00000001 f_5s
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:141    .bss:00000002 f_1s
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:147    .bss:00000003 f_500ms
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:153    .bss:00000004 f_15ms
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:159    .bss:00000005 SystemMode
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:165    .text:00000000 TimerInit
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:224    .text:00000030 timer0_start
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:246    .text:0000003a timer0_stop
                            *COM*:00000001 SYS_ch
                            *COM*:00000001 AlrmStatusT
                            *COM*:00000001 AlrmStatusH
                            *COM*:00000001 Humidity
                            *COM*:00000002 Temperature
                            *COM*:00000001 f_sensor_t
                            *COM*:00000001 f_sensor_h
                            *COM*:00000001 RelayBreak
                            *COM*:00000001 SystemStatus
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccsraaaa.s:286    .text:0000003e Letext

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss

⌨️ 快捷键说明

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