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

📄 main.s

📁 ICCAVR Rainguage counter program
💻 S
字号:
	.module main.c
	.area text(rom, con, rel)
	.dbfile C:\RGauge\main.c
	.dbfunc e main _main fV
	.even
_main::
	sbiw R28,2
	.dbline -1
	.dbline 30
; //ICC-AVR application builder : 14/3/2007 23:29:10
; // Target : M16
; // Crystal: 7.3728Mhz
; 
; #include <stdio.h>
; #include <STDLIB.h>
; #include "config.h"
; #include "predef.h"
; #include "lcd.h"
; 
; unsigned int rcount;
; unsigned char * lcdmsg1;
; unsigned char * umsg;
; char buffer [33];
; 
; //unsigned int count=0; //to count timer0
; 
; // INTERRUPT can be interrupted
; // SIGNAL can't be interrupted
; //for future use
; /*
; void SIGNAL (SIG_UART_RECV) { // USART RX interrupt
; 	unsigned char c;
; 	c = UDR;
; 	uart_putc(c);
; }
; */
; 
; void main(void)
; {
	.dbline 31
; init_devices();
	xcall _init_devices
	.dbline 34
; 
; //initialize the  counter 1 
; TCCR1B=0x00;
	clr R2
	out 0x2e,R2
	.dbline 35
; TCNT1H=0x00;
	out 0x2d,R2
	.dbline 36
; TCNT1L=0x00;
	out 0x2c,R2
	.dbline 37
; OCR1AH=0x00;
	out 0x2b,R2
	.dbline 38
; OCR1AL=0x00;
	out 0x2a,R2
	.dbline 39
; OCR1BH=0x00;
	out 0x29,R2
	.dbline 40
; OCR1BL=0x00;
	out 0x28,R2
	.dbline 41
; TCCR1A=0x00;
	out 0x2f,R2
	.dbline 42
; TCCR1B=0x06;
	ldi R24,6
	out 0x2e,R24
	.dbline 46
; 
; 
; //LCD DISPLAY 
;  LCD_IO_INIT (); 
	xcall _LCD_IO_INIT
	.dbline 47
;  LCD_INIT (); 
	xcall _LCD_INIT
	xjmp L3
L2:
	.dbline 50
	.dbline 52
	in R18,0x2d
	clr R19
	ldi R16,256
	ldi R17,1
	xcall empy16s
	movw R2,R16
	in R4,0x2c
	clr R5
	add R2,R4
	adc R3,R5
	sts _rcount+1,R3
	sts _rcount,R2
	.dbline 53
	ldi R24,10
	ldi R25,0
	std y+1,R25
	std y+0,R24
	movw R18,R2
	ldi R16,<_buffer
	ldi R17,>_buffer
	xcall _utoa
	.dbline 55
	ldi R16,1
	xcall _LCD_PutCmd
	.dbline 56
	ldi R16,244
	ldi R17,1
	ldi R18,0
	ldi R19,0
	xcall _LCD_Delay
	.dbline 57
	ldi R16,128
	xcall _LCD_PutCmd
	.dbline 58
	ldi R24,<L5
	ldi R25,>L5
	sts _lcdmsg1+1,R25
	sts _lcdmsg1,R24
	.dbline 59
	movw R16,R24
	xcall _LCD_PutString
	.dbline 60
	ldi R16,192
	xcall _LCD_PutCmd
	.dbline 61
	ldi R16,<_buffer
	ldi R17,>_buffer
	xcall _LCD_PutString
	.dbline 62
	ldi R16,196
	xcall _LCD_PutCmd
	.dbline 63
	ldi R16,<L6
	ldi R17,>L6
	xcall _LCD_PutString
	.dbline 65
	ldi R16,122
	xcall _SPI_MasterTransmit
	.dbline 74
	ldi R16,200
	ldi R17,0
	xcall _delay_ms
	.dbline 75
L3:
	.dbline 49
	xjmp L2
X0:
	.dbline -2
L1:
	adiw R28,2
	.dbline 0 ; func end
	ret
	.dbend
	.area bss(ram, con, rel)
	.dbfile C:\RGauge\main.c
_buffer::
	.blkb 33
	.dbsym e buffer _buffer A[33:33]c
_umsg::
	.blkb 2
	.dbsym e umsg _umsg pc
_lcdmsg1::
	.blkb 2
	.dbsym e lcdmsg1 _lcdmsg1 pc
_rcount::
	.blkb 2
	.dbsym e rcount _rcount i
	.area data(ram, con, rel)
	.dbfile C:\RGauge\main.c
L6:
	.blkb 7
	.area idata
	.byte 'c,'o,'u,'n,'t,'s,0
	.area data(ram, con, rel)
	.dbfile C:\RGauge\main.c
L5:
	.blkb 20
	.area idata
	.byte 'C,'u,'r,'r,'e,'n,'t,32,'D,'r,'o,'p,'c,'o,'u,'n
	.byte 't,'s,58,0
	.area data(ram, con, rel)
	.dbfile C:\RGauge\main.c

⌨️ 快捷键说明

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