亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testhz.asm

?? AVR頻率計
?? ASM
字號:
;測量脈沖頻率
;脈沖從PD5(T1)輸入,4位數(shù)碼管動態(tài)掃描顯示脈沖頻率,T/C1定于外計數(shù)方式,每上升沿計數(shù)1次; 
;定時器T/C0每隔1s求出T/C1的增加量即為脈沖頻率.

;PCB:AVR.DDB\testHz.sch
;CPU:ATmega8,fosc=8M

.include "m8def.inc"
.def	T0cnt   = r5

.def	temp  	= r16	  ;暫存器
.def	T0tmp  	= r17	;t0中斷暫存器

;-------------------------------------
	.org	0x0000 
	rjmp	reset

	.org	0x0009		;timer0中斷
	rjmp	time0
;================================================================
	.org	0x0020		;跳過中斷區(qū)
;-------------------------------------------------------------
;timer0溢出中斷子程序
;每隔1s計數(shù)一次,并將二次差值送0x61:0x60,應用寄存器:R10,R11,R12,R13
time0:	dec	T0cnt
	breq  	t0lp1		;采樣時長125*8ms=1s
	ldi	T0tmp,6		;重置T0初值
	out	TCNT0,T0tmp
	reti

t0lp1:	brts	t0lp2		;判斷計數(shù)次數(shù)標志位,1:末次,0:首次
	in	r10,TCNT1L	;讀TCNT1計數(shù)值到r11:r10
	in	r11,TCNT1H
	set
	ldi	T0tmp,125	;計數(shù)125次,125*8ms=1s
	mov	T0cnt,T0tmp	
	ldi	T0tmp,6		;重置T0初值
	out	TCNT0,T0tmp
	reti

t0lp2:	in	r12,TCNT1L	;讀TCNT1計數(shù)值到r13:r12
	in	r13,TCNT1H
	clt
	clc
	sub	r12,r10		;求2次T/C1計數(shù)差值
	sbc	r13,r11
	sts	0x60,r12	;將計數(shù)差值r13:r12轉存到0x61:0x60
	sts	0x61,r13
	rcall	sysint
	reti

;******************************************************	
reset:	ldi	temp,low(ramend)	;設置堆棧指針
	out	SPL,temp
	ldi	temp,high(ramend)
	out	SPH,temp
	
	ldi	temp,0xFF		;B,C口為輸出
	out	DDRB,temp
	out	DDRC,temp
	ldi	temp,0xDF		;PD5為輸入,其它為輸出
	out	DDRD,temp
	ldi	temp,0x00
	out	portb,temp		;B,C,D口初值為0
	out	portc,temp	
	out	portd,temp

	rcall	clrRAM	
	rcall	sysint
	sei
loop:	rcall	getNum
	rcall	scanLED
	rjmp	loop

;---------------------------------------------------------------------------					  
sysint:	clt		 		;初始化
	ldi	temp,0x01		;允許T0中斷
	out	TIMSK,temp
	ldi	temp,125		;計數(shù)125次,125*8ms=1s
	mov	T0cnt,temp	
	ldi	temp,6			;設T0定時初值,8ms,8M,256分頻
	out	TCNT0,temp	
	ldi	temp,0x04		;T/C0  256分頻
	out	TCCR0,temp

	ldi	temp,0x00
	out	TCNT1H,temp
	out	TCNT1L,temp
	ldi	temp,0x06		;啟動T1計數(shù)器,外部T1輸入,下降沿計數(shù)
	out	TCCR1B,temp
	ret

;-------------------------------------------------------
;RAM存儲區(qū)0x60—0x7F共32個字節(jié)清0
clrRAM:	ldi	temp,0x60
	mov	r26,temp
	ldi	temp,32
	mov	r1,temp	
clrlp:	clr	r0
	st	x+,r0
	dec	r1
	brne	clrlp
	ret		
;----------------------------------------------------------
;轉換數(shù)據(jù),將16進制數(shù)(60H—61H)分解成一位,存儲于70H—73H
getNum:	
	lds	temp,0x60
	andi	temp,0x0F	;取低8位
	sts	0x70,temp	;個位,數(shù)據(jù)送70H-73H	
	lds	temp,0x60
	swap	temp		;取高8位
	andi	temp,0x0F
	sts	0x71,temp	;十位

	lds	temp,0x61
	andi	temp,0x0F	;取低8位
	sts	0x72,temp	;百位	
	lds	temp,0x61
	swap	temp		;取高8位
	andi	temp,0x0F
	sts	0x73,temp	;千位
	ret
;---------------------------------------------------
;動態(tài)掃描4位共陽數(shù)碼管顯示(74LS138控制位碼)
;共陽數(shù)碼管,PB1—PB5,PC3—PC5口作段控,PC0—PC2作位控,每隔1ms顯示1位,
;待顯示的16進制數(shù)存儲在0x70-0x73中,
scanLED:
	lds	temp,0x70	;取個位數(shù)據(jù)
	rcall	findLED		;查段碼
	cbi	portc,0		;送個位位碼,低電平有效
	cbi	portc,1
	cbi	portc,2	
	rcall	t1ms		;延時1ms

	lds	temp,0x71
	rcall	findLED	
	sbi	portc,0		;送十位位線
	cbi	portc,1
	cbi	portc,2
	rcall	t1ms

	lds	temp,0x72
	rcall	findLED	
	cbi	portc,0		;送百位位線
	sbi	portc,1
	cbi	portc,2
	rcall	t1ms

	lds	temp,0x73
	rcall	findLED	
	sbi	portc,0		;送千位位線
	sbi	portc,1
	cbi	portc,2
	rcall	t1ms
	ret
;----------------------------
t1ms:				;8M,延時1ms
	ldi	r24,11
d21:	ldi	r25,242
d20:	dec	r25
	brne	d20
	dec	r24
	brne	d21
	ret
;---------------------------------------------------
LED0:	rjmp	code0
LED1:	rjmp	code1
LED2:	rjmp	code2
LED3:	rjmp	code3
LED4:	rjmp	code4
LED5:	rjmp	code5
LED6:	rjmp	code6
LED7:	rjmp	code7
LED8:	rjmp	code8
LED9:	rjmp	code9
LEDA:	rjmp	codeA
LEDB:	rjmp	codeB
LEDC:	rjmp	codeC
LEDD:	rjmp	codeD
LEDE:	rjmp	codeE
LEDF:	rjmp	codeF

findLED:
	cpi	temp,0		;多項選擇
	breq	LED0
	cpi	temp,1
	breq	LED1
	cpi	temp,2
	breq	LED2
	cpi	temp,3
	breq	LED3
	cpi	temp,4
	breq	LED4
	cpi	temp,5
	breq	LED5
	cpi	temp,6
	breq	LED6
	cpi	temp,7
	breq	LED7
	cpi	temp,8
	breq	LED8
	cpi	temp,9
	breq	LED9
	cpi	temp,10
	breq	LEDA
	cpi	temp,11
	breq	LEDB
	cpi	temp,12
	breq	LEDC
	cpi	temp,13
	breq	LEDD
	cpi	temp,14
	breq	LEDE
	cpi	temp,15
	breq	LEDF

;----------------------------------------
code0:	cbi	portb,1
	cbi	portb,2
	cbi	portb,3
	cbi	portb,4
	sbi	portb,5
	sbi	portc,3
	cbi	portc,4
	cbi	portc,5
	ret
code1:	cbi	portb,1
	sbi	portb,2
	sbi	portb,3
	sbi	portb,4
	sbi	portb,5
	sbi	portc,3
	cbi	portc,4
	sbi	portc,5
	ret
code2:	sbi	portb,1
	cbi	portb,2
	cbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	sbi	portc,5
	ret
code3:	cbi	portb,1
	cbi	portb,2
	cbi	portb,3
	sbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	sbi	portc,5
	ret

code4:	cbi	portb,1
	sbi	portb,2
	sbi	portb,3
	sbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	cbi	portc,5
	ret

code5:	cbi	portb,1
	cbi	portb,2
	cbi	portb,3
	sbi	portb,4
	cbi	portb,5
	sbi	portc,3
	sbi	portc,4
	cbi	portc,5
	ret

code6:	cbi	portb,1
	cbi	portb,2
	cbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	sbi	portc,4
	cbi	portc,5
	ret

code7:	cbi	portb,1
	sbi	portb,2
	cbi	portb,3
	sbi	portb,4
	sbi	portb,5
	sbi	portc,3
	cbi	portc,4
	sbi	portc,5
	ret

code8:	cbi	portb,1
	cbi	portb,2
	cbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	cbi	portc,5
	ret

code9:	cbi	portb,1
	cbi	portb,2
	cbi	portb,3
	sbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	cbi	portc,5
	ret

codeA:	cbi	portb,1
	sbi	portb,2
	cbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	cbi	portc,5
	ret

codeB:	cbi	portb,1
	cbi	portb,2
	sbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	sbi	portc,4
	cbi	portc,5
	ret

codeC:	sbi	portb,1
	cbi	portb,2
	cbi	portb,3
	cbi	portb,4
	sbi	portb,5
	sbi	portc,3
	sbi	portc,4
	cbi	portc,5
	ret

codeD:	cbi	portb,1
	cbi	portb,2
	sbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	cbi	portc,4
	sbi	portc,5
	ret

codeE:	sbi	portb,1
	cbi	portb,2
	cbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	sbi	portc,4
	cbi	portc,5
	ret

codeF:	sbi	portb,1
	sbi	portb,2
	cbi	portb,3
	cbi	portb,4
	cbi	portb,5
	sbi	portc,3
	sbi	portc,4
	cbi	portc,5
	ret



;----------------------------------------
dly10d:	ldi	r20,8
d54:	ldi	r21,31
d53:	ldi	r22,100
d52:	ldi	r23,255
d51:	ldi	r24,252
d50:	dec	r24
	brne	d50
	dec	r23
	brne	d51
	dec	r22
	brne	d52
	dec	r21
	brne	d53
	dec	r20
	brne	d54
	ret
	
dly1s:	ldi	r20,41
d32:	ldi	r21,255
d31:	ldi	r22,255
d30:	dec	r22
	brne	d30
	dec	r21
	brne	d31
	dec	r20
	brne	d32
	ret











?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区精华液| 亚洲自拍另类综合| 国内精品免费**视频| 日韩精品一区二区三区三区免费 | 精品日韩欧美在线| 捆绑调教美女网站视频一区| 精品国产一区二区三区忘忧草 | 亚洲精品视频观看| 欧美三级午夜理伦三级中视频| 亚洲成人资源在线| 日韩免费一区二区三区在线播放| 国产揄拍国内精品对白| 一区精品在线播放| 欧美乱妇23p| 国产一区二区三区不卡在线观看 | 26uuu亚洲综合色| 欧美大片国产精品| 精品入口麻豆88视频| 一区二区三区国产| 欧美一区二区三区啪啪| 国产精品中文有码| 亚洲最色的网站| 精品国产凹凸成av人导航| 99v久久综合狠狠综合久久| 亚洲一区在线观看视频| 亚洲精品一区二区精华| 91国偷自产一区二区使用方法| 丝袜亚洲另类丝袜在线| 国产精品视频一二三区| 欧美日韩视频专区在线播放| 国产一区二区三区最好精华液| 亚洲欧美日韩系列| 久久综合色综合88| 在线欧美一区二区| 国产乱码精品1区2区3区| 亚洲高清免费观看| 亚洲国产成人一区二区三区| 午夜私人影院久久久久| 99久久99久久综合| 欧美高清性hdvideosex| 中文字幕一区二区三区四区不卡| 欧日韩精品视频| 国产伦精品一区二区三区免费迷| 亚洲免费资源在线播放| 久久综合九色综合97婷婷女人 | 亚洲高清视频在线| 中文文精品字幕一区二区| 555夜色666亚洲国产免| 99久久综合99久久综合网站| 精品一区二区在线观看| 香蕉成人啪国产精品视频综合网| 国产精品久久国产精麻豆99网站| 日韩一区二区三区观看| 欧美在线一区二区| 99久久久无码国产精品| 国产一区二区不卡| 久久99久久精品欧美| 日韩福利视频网| 亚洲大片在线观看| 欧美日韩不卡视频| 国产在线精品一区二区| 欧美精品久久久久久久多人混战 | 亚洲精品国产第一综合99久久 | 久久久99精品免费观看不卡| 欧美日本韩国一区二区三区视频| 亚洲欧美日韩国产另类专区 | 亚洲私人黄色宅男| 精品国产一区二区亚洲人成毛片| 欧美乱妇23p| 欧美日韩中文一区| 在线观看欧美日本| 在线观看网站黄不卡| 色欧美片视频在线观看在线视频| 国产黑丝在线一区二区三区| 免费观看在线综合色| 美女在线观看视频一区二区| 亚洲综合一区二区| 午夜精品一区二区三区免费视频| 卡一卡二国产精品| 成人免费视频国产在线观看| 欧美性猛片xxxx免费看久爱| 精品国产91乱码一区二区三区| 国产精品久久久久三级| 日日噜噜夜夜狠狠视频欧美人| 国产一区二区三区四区在线观看| 色综合久久久久久久| 日韩精品中文字幕一区| 综合色中文字幕| 日韩激情av在线| 99久久综合精品| 欧美一区二区三区人| 亚洲欧美一区二区在线观看| 午夜影院久久久| 成人18视频日本| 日韩一级大片在线观看| 亚洲四区在线观看| 韩国女主播一区| 欧美日韩激情在线| 国产精品美女久久久久久久久 | 欧美变态tickling挠脚心| 国产精品国产三级国产专播品爱网| 91麻豆免费视频| 日韩精品一区二区三区中文精品| 亚洲男同性恋视频| 国产jizzjizz一区二区| 日韩一本二本av| 亚洲自拍偷拍麻豆| 99精品热视频| 久久人人97超碰com| 肉丝袜脚交视频一区二区| 99r国产精品| 欧美国产综合色视频| 美腿丝袜一区二区三区| 欧美日韩国产一区二区三区地区| 国产精品福利电影一区二区三区四区| 精品影院一区二区久久久| 欧美日本一道本在线视频| 一区2区3区在线看| 波多野结衣在线aⅴ中文字幕不卡| 日韩亚洲欧美成人一区| 日日夜夜一区二区| 欧美三级电影网| 亚洲三级在线免费观看| www.亚洲国产| 中文字幕第一区二区| 国产乱妇无码大片在线观看| 精品久久久久久久久久久院品网| 亚洲一区二区三区四区中文字幕| 色综合欧美在线| 蜜臀av一区二区三区| 亚洲一区影音先锋| 色乱码一区二区三区88| 综合久久给合久久狠狠狠97色| 成人深夜在线观看| 久久久99精品免费观看| 成人永久看片免费视频天堂| 国产拍揄自揄精品视频麻豆| 国产美女娇喘av呻吟久久| 26uuu亚洲婷婷狠狠天堂| 国产激情偷乱视频一区二区三区| 久久久久综合网| 粉嫩久久99精品久久久久久夜| 国产清纯美女被跳蛋高潮一区二区久久w| 久久国产精品无码网站| 精品入口麻豆88视频| 国产99久久久精品| 国产精品久久三区| 色哟哟日韩精品| 午夜av一区二区三区| 欧美一级专区免费大片| 久久99精品国产麻豆不卡| 国产日韩欧美制服另类| aaa欧美大片| 亚洲国产成人高清精品| 欧美一区国产二区| 狠狠久久亚洲欧美| 国产精品传媒视频| 91香蕉视频污在线| 欧美精品久久99久久在免费线| 成年人国产精品| 亚洲风情在线资源站| 亚洲国产wwwccc36天堂| 国产乱子伦一区二区三区国色天香| 国产精品第13页| 日韩av一区二区三区| 天堂成人国产精品一区| 亚洲欧美视频在线观看视频| 日韩国产欧美视频| 国产成人免费在线| 国产成人在线观看免费网站| eeuss国产一区二区三区| 国产精品一区二区不卡| 国产精品进线69影院| 日本乱人伦aⅴ精品| 日本午夜精品一区二区三区电影| 精品国产亚洲在线| 色94色欧美sute亚洲线路一久| 青青草精品视频| 国产精品丝袜黑色高跟| 欧美精品成人一区二区三区四区| 国产福利一区在线| 亚洲一区二区精品视频| 日韩欧美黄色影院| 日本亚洲三级在线| 色妹子一区二区| 久久99久久99精品免视看婷婷| 国产精品久久久久影院老司| 欧美日韩你懂的| 国产激情一区二区三区四区| 亚洲一级不卡视频| 亚洲国产成人一区二区三区| 7878成人国产在线观看| 一本色道亚洲精品aⅴ| 久久精品国产一区二区三区免费看| 亚洲丝袜制服诱惑| 久久久久国产精品厨房| 91精品国产入口| 91久久久免费一区二区| 国产69精品一区二区亚洲孕妇| 婷婷六月综合亚洲|