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

📄 7135.s

📁 基于AVR单片机的热电偶测量系统源码
💻 S
字号:
	.module _7135.c
	.area lit(rom, con, rel)
_arab_1:
	.byte 0,16
	.byte 16,248
	.byte 0,0
	.byte 0,0
	.byte 0,32
	.byte 32,63
	.byte 32,32
	.byte 0,0
	.dbfile D:\zhangyu\H2test\program/lcd.h
	.dbsym s arab_1 _arab_1 A[16:16]kc
_arab_2:
	.byte 0,'p
	.byte 8,8
	.byte 8,136
	.byte 'p,0
	.byte 0,48
	.byte 40,36
	.byte 34,33
	.byte 48,0
	.dbsym s arab_2 _arab_2 A[16:16]kc
_arab_3:
	.byte 0,48
	.byte 8,136
	.byte 136,'H
	.byte 48,0
	.byte 0,24
	.byte 32,32
	.byte 32,17
	.byte 14,0
	.dbsym s arab_3 _arab_3 A[16:16]kc
_arab_4:
	.byte 0,0
	.byte 192,32
	.byte 16,248
	.byte 0,0
	.byte 0,7
	.byte 4,36
	.byte 36,63
	.byte 36,0
	.dbsym s arab_4 _arab_4 A[16:16]kc
_arab_5:
	.byte 0,248
	.byte 8,136
	.byte 136,8
	.byte 8,0
	.byte 0,25
	.byte 33,32
	.byte 32,17
	.byte 14,0
	.dbsym s arab_5 _arab_5 A[16:16]kc
_arab_6:
	.byte 0,224
	.byte 16,136
	.byte 136,24
	.byte 0,0
	.byte 0,15
	.byte 17,32
	.byte 32,17
	.byte 14,0
	.dbsym s arab_6 _arab_6 A[16:16]kc
_arab_7:
	.byte 0,56
	.byte 8,8
	.byte 200,56
	.byte 8,0
	.byte 0,0
	.byte 0,63
	.byte 0,0
	.byte 0,0
	.dbsym s arab_7 _arab_7 A[16:16]kc
_arab_8:
	.byte 0,'p
	.byte 136,8
	.byte 8,136
	.byte 'p,0
	.byte 0,28
	.byte 34,33
	.byte 33,34
	.byte 28,0
	.dbsym s arab_8 _arab_8 A[16:16]kc
_arab_9:
	.byte 0,224
	.byte 16,8
	.byte 8,16
	.byte 224,0
	.byte 0,0
	.byte 49,34
	.byte 34,17
	.byte 15,0
	.dbsym s arab_9 _arab_9 A[16:16]kc
_arab_0:
	.byte 0,224
	.byte 16,8
	.byte 8,16
	.byte 224,0
	.byte 0,15
	.byte 16,32
	.byte 32,16
	.byte 15,0
	.dbsym s arab_0 _arab_0 A[16:16]kc
_T:
	.byte 24,8
	.byte 8,248
	.byte 8,8
	.byte 24,0
	.byte 0,0
	.byte 32,63
	.byte 32,0
	.byte 0,0
	.dbsym s T _T A[16:16]kc
_t:
	.byte 0,128
	.byte 128,224
	.byte 128,128
	.byte 0,0
	.byte 0,0
	.byte 0,31
	.byte 32,32
	.byte 0,0
	.dbsym s t _t A[16:16]kc
_maohao:
	.byte 0,0
	.byte 0,192
	.byte 192,0
	.byte 0,0
	.byte 0,0
	.byte 0,48
	.byte 48,0
	.byte 0,0
	.dbsym s maohao _maohao A[16:16]kc
_xiaoshudian:
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,48
	.byte 48,0
	.byte 0,0
	.byte 0,0
	.dbsym s xiaoshudian _xiaoshudian A[16:16]kc
_E:
	.byte 8,248
	.byte 136,136
	.byte 232,8
	.byte 16,0
	.byte 32,63
	.byte 32,32
	.byte 35,32
	.byte 24,0
	.dbsym s E _E A[16:16]kc
_l:
	.byte 0,8
	.byte 8,248
	.byte 0,0
	.byte 0,0
	.byte 0,32
	.byte 32,63
	.byte 32,32
	.byte 0,0
	.dbsym s l _l A[16:16]kc
_g:
	.byte 0,0
	.byte 128,128
	.byte 128,128
	.byte 128,0
	.byte 0,'k
	.byte 148,148
	.byte 148,147
	.byte 96,0
	.dbsym s g _g A[16:16]kc
_P:
	.byte 8,248
	.byte 8,8
	.byte 8,8
	.byte 240,0
	.byte 32,63
	.byte 33,1
	.byte 1,1
	.byte 0,0
	.dbsym s P _P A[16:16]kc
_H:
	.byte 0,126
	.byte 16,126
	.byte 0,'P
	.byte 'p,64
	.dbsym s H _H A[8:8]kc
_ll:
	.byte 0,0
	.byte 'B,126
	.byte 'B,0
	.byte 0,0
	.dbsym s ll _ll A[8:8]kc
_lll:
	.byte 0,0
	.byte 'B,126
	.byte 'B,126
	.byte 'B,0
	.dbsym s lll _lll A[8:8]kc
_zhenghao:
	.byte 0,0
	.byte 0,240
	.byte 0,0
	.byte 0,0
	.byte 1,1
	.byte 1,31
	.byte 1,1
	.byte 1,0
	.dbsym s zhenghao _zhenghao A[16:16]kc
_fuhao:
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,1
	.byte 1,1
	.byte 1,1
	.byte 1,1
	.dbsym s fuhao _fuhao A[16:16]kc
L2:
	.word 0
	.word 0
	.word 0
	.word 0
	.area text(rom, con, rel)
	.dbfile D:\zhangyu\H2test\program/lcd.h
	.dbfile D:\zhangyu\H2test\program\7135.c
	.dbfunc e display7135 _display7135 fV
;            adc -> R20,R21
;              m -> R22,R23
;              n -> R10,R11
;              E -> y+1
	.even
_display7135::
	xcall push_gset3
	sbiw R28,9
	.dbline -1
	.dbline 22
; /*-------------------------------------------------------------*-
; File name: 7135.c
; Description:本模块为电动势模块,其功能为获得原电池的电动势。
; Function List:
; 1.void timer1_capt_isr(void)   //中断函数,busy信号的下降沿产生中断信号
; 2.void display7135()  //读取并显示7135的数据
; 
; -----------------------------------------------------------------
; 电动势模块
; -*--------------------------------------------------------------*/
; #include <iom16v.h>
; #include <macros.h>
; #include "7135.h"
; #include "lcd.h"
; #include "main.h"
; #include "6675.h"
; 
; extern unsigned char endflag;
; extern unsigned int pulse;
; 
; void display7135(void)
; {       
	.dbline 23
;     unsigned int E[4]={0,0,0,0};
	ldi R24,<L2
	ldi R25,>L2
	movw R30,R28
	adiw R30,1
	ldi R16,8
	ldi R17,0
	st -y,R31
	st -y,R30
	st -y,R25
	st -y,R24
	xcall asgncblk
	.dbline 24
;     unsigned int n=0,m=0;
	clr R10
	clr R11
	.dbline 24
	clr R22
	clr R23
	.dbline 27
; 	unsigned int adc;
; 
; 	TCNT1=0;
	clr R2
	clr R3
	out 0x2d,R3
	out 0x2c,R2
	.dbline 28
; 	TCCR1A=0x00;
	out 0x2f,R2
	.dbline 29
; 	TCCR1B=0x43; 		 //上升沿捕获,64分频
	ldi R24,67
	out 0x2e,R24
	.dbline 30
; 	TIMSK=0x24;			//timer1溢出中断使能,捕获中断使能
	ldi R24,36
	out 0x39,R24
	.dbline 31
; 	SEI();
	sei
	.dbline 33
; 	
; 	Delay10ms(10);
	ldi R16,10
	xcall _Delay10ms
L3:
	.dbline 35
L4:
	.dbline 35
; 
;            	while(!endflag);
	lds R2,_endflag
	tst R2
	breq L3
	.dbline 36
;            	adc=(pulse>>1)-10001;	//此值即为电压值,共5位,小数点后有1位,前面4位,单位为MV
	lds R20,_pulse
	lds R21,_pulse+1
	lsr R21
	ror R20
	subi R20,17
	sbci R21,39
	.dbline 38
; 			
;        		m=adc*10;
	ldi R16,10
	ldi R17,0
	movw R18,R20
	xcall empy16s
	movw R22,R16
	.dbline 39
;        		E[0]=m/1000;
	ldi R18,1000
	ldi R19,3
	xcall div16u
	std y+2,R17
	std y+1,R16
	.dbline 40
;       		n=m-E[0]*1000;
	movw R18,R16
	ldi R16,1000
	ldi R17,3
	xcall empy16s
	movw R10,R22
	sub R10,R16
	sbc R11,R17
	.dbline 41
;       		E[1]=n/100;
	ldi R18,100
	ldi R19,0
	movw R16,R10
	xcall div16u
	std y+4,R17
	std y+3,R16
	.dbline 42
;        		n=n-E[1]*100;
	movw R18,R16
	ldi R16,100
	ldi R17,0
	xcall empy16s
	sub R10,R16
	sbc R11,R17
	.dbline 43
;        		E[2]=n/10;
	ldi R18,10
	ldi R19,0
	movw R16,R10
	xcall div16u
	std y+6,R17
	std y+5,R16
	.dbline 44
;        		n=n-E[2]*10;
	movw R18,R16
	ldi R16,10
	ldi R17,0
	xcall empy16s
	sub R10,R16
	sbc R11,R17
	.dbline 45
;        		E[3]=n/1;
	std y+8,R11
	std y+7,R10
	.dbline 47
;      
;        		Draw_NtoArab(0x02,0x50,E[0]);
	ldd R2,y+1
	ldd R3,y+2
	std y+0,R2
	ldi R18,80
	ldi R16,2
	xcall _Draw_NtoArab
	.dbline 48
;        		Draw_NtoArab(0x02,0x58,E[1]);
	ldd R2,y+3
	ldd R3,y+4
	std y+0,R2
	ldi R18,88
	ldi R16,2
	xcall _Draw_NtoArab
	.dbline 49
;        		Draw_NtoArab(0x02,0x60,E[2]);
	ldd R2,y+5
	ldd R3,y+6
	std y+0,R2
	ldi R18,96
	ldi R16,2
	xcall _Draw_NtoArab
	.dbline 50
;        		Draw_NtoArab(0x02,0x70,E[3]);
	ldd R2,y+7
	ldd R3,y+8
	std y+0,R2
	ldi R18,112
	ldi R16,2
	xcall _Draw_NtoArab
	.dbline -2
L1:
	adiw R28,9
	xcall pop_gset3
	.dbline 0 ; func end
	ret
	.dbsym r adc 20 i
	.dbsym r m 22 i
	.dbsym r n 10 i
	.dbsym l E 1 A[8:4]i
	.dbend

⌨️ 快捷键说明

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