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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? irserout.bas

?? A total solution for INFRARED based on PIC16F84 using PICBASIC compiler including source
?? BAS
字號:
' Title IRSerout.Bas
' @ L. Johnson  20th September 1999
'
' Send Asyncronous Serial Data over an Infra-Red Link
' At Various Baud Rates and Inverted Mode
' An Infra-Red LED should be Connected to PORTB.0
' If longer range is required and NPN transistor could be employed
' as an amplifier, as in the BASIC STAMP1 Application Notes

' Place  Include "Irserout.Bas"
' At the front of the Program to load the new subroutine in
'
' To Use the New Routine, Load the Variable:- 
' IR_ByteOut with the appropriate value (0-255)
' And Call the Subroutine:-
' Gosub IRSerout
'
' Three New Defines have been added:-
' IRSEROUT_PORT.....Selects the Port for sending (ie PORTB)
' IRSEROUT_PIN......Selects the Pin for sending (ie 1)
' IRSEROUT_BAUD.....Selects the Baud Rate (ie 300,600,1200,2400)

' IRSerout works with 4Mhz, 8Mhz, 10Mhz and 12Mhz Xtals

' *** The Subroutine is only 56 Bytes in length ***

' This routine is for the 16F84, but any 14bit core PIC could be used

' Define Variables
	Dlctr		Var	Byte		' Counter For Serial Delay Routines
	Bctr		Var	Byte		' Number Of Transmitted Bits
	Tr_B		Var	Byte		' Variable Used In Transmitter
	Ir_Byteout	Var	Byte		' Value To Be Send Out
	IR_Bit		Var	Bit		' Pulse ON or OFF 
	Dl_Temp		Var	Byte		' Counter2 For Serial Delay Routines
	ON_Delay	Var	DL_Temp
	Off_Delay	Var	DL_Temp

' ******************************
' ** Jump Over the Subroutine **
' ******************************
Goto	Over_IRSEROUT			

IRSerout:
Asm
#Define	IR_LED	IRSEROUT_PORT , IRSEROUT_PIN	;' Get the Port and Pin from the two new Defines

;' Set Defaults for IRSEROUT_PORT and IRSEROUT_PIN  to   PORTA BIT 0
	Ifndef IRSEROUT_PORT
IRSEROUT_PORT = PortA
	endif 
	Ifndef IRSEROUT_PIN
IRSEROUT_PIN = 0
	endif

;' Set Default to 1200 Baud Inverted
	Ifndef IRSEROUT_BAUD
IRSEROUT_BAUD = 1200
	endif

			
		Bcf IRSEROUT_PORT,IRSEROUT_PIN	;' Clear the appropriate pin
		Bsf Status,5			;' Set to Bank1
		Bcf IRSEROUT_PORT,IRSEROUT_PIN	;' Make the appropriate pin an Output
		Bcf Status,5			;' Back to Page 0		


;' Send out the Data serially at Various bauds, Inverted
		Mov w,_Ir_Byteout	;' Move the Value into the W register
		Clrwdt			;' Walk the Dog
		Movwf	_TR_B	
		Movlw	08
		Movwf	_Bctr		;' Eight Bits In A Byte!.
		Bsf	_IR_Bit
		Call	Send_Bit	;' Send the Start Bit at Approx 39Khz. 
SIRXmt		Rrf	_Tr_B		;' Rotate Right Moves the Data Bits Into the Carry
					;' Starting With Bit 0. 
   		Btfsc   Status,0	;' Test the Carry Flag
		Bcf	_IR_Bit		;' Send a Zero
    		Btfss   Status,0	;' Test the Carry Flag
		Bsf	_IR_Bit		;' Send A One
		Call	Send_Bit	;' Send the Data Bit at Approx 39 Khz. 
		Decfsz	_Bctr		;' Not Eight Bits Yet? Send the Next Data Bit
		Goto	SIRXmt
		Bcf	_IR_Bit		;' Set LO	
		Call	Send_Bit	;' Send the stop bit at Approx 39khz

;' Delay for X amount of time
		Clrwdt			;' Walk the Dog	
		Movlw	255					
		Movwf	_DlCtr
IRSInner	Clrwdt			;' Walk the Dog		
		Nop
		Nop
		Nop
		Nop
		Nop
		Nop
		Decfsz	_DlCtr		;' Do the Inner Loop		
		Goto	IRSInner
		Return

;' This Routine Sends a Pulse modulated at Approx 39Khz 
;' Out of the Appropriate pin within a Delay of 1 bit time

Send_Bit	
;' Assemble this code if the Baud rate is 300
	If (IRSEROUT_BAUD == 300)
		Movlw	128		;' Set the Delay Time for 300 Baud
	endif
;' Assemble this code if the Baud rate is 600
	If (IRSEROUT_BAUD == 600)
		Movlw	64		;' Set the Delay Time for 600 Baud
	endif
;' Assemble this code if the Baud rate is 1200
	If (IRSEROUT_BAUD == 1200)
		Movlw	32		;' Set the Delay Time for 1200 Baud
	endif
;' Assemble this code if the Baud rate is 2400
	If (IRSEROUT_BAUD == 2400)
		Movlw	16		;' Set the Delay Time for 2400 Baud
	endif

Pulse_Bit	Movwf	_Dlctr		;' Store it
Irlp1		Clrwdt			;' Walk The Dog
   		Btfsc   _Ir_Bit		;' If Ir_Bit=1 Then	
		Bsf	IR_LED		;' Turn the IR_Led On
    		Btfss   _Ir_Bit		;' If Ir_Bit=0 Then	
    		Bcf     IR_LED		;' Turn the IR_Led Off	

;' Assemble this code if the Xtal is 4Mhz
	if  (OSC == 4)
		Movlw	3
		Movwf	_On_Delay
Inner1		Decfsz	_On_Delay
		Goto Inner1
	endif

;' Assemble this code if the Xtal is 8Mhz
	if  (OSC == 8)
		Movlw	8
		Movwf	_On_Delay
Inner1		Decfsz	_On_Delay
		Goto Inner1
	endif

;' Assemble this code if the Xtal is 10Mhz
	if  (OSC == 10)
		Movlw	12			;' *****Not Sure Untested ***
		Movwf	_On_Delay
Inner1		Decfsz	_On_Delay
		Goto Inner1
	endif

;' Assemble this code if the Xtal is 12Mhz
	if  (OSC == 12)
		Movlw	17
		Movwf	_On_Delay
Inner1		Decfsz	_On_Delay
		Goto Inner1
	endif

		Bcf 	IR_LED		;' Turn the IR_LED Off

;' Assemble this code if the Xtal is 4Mhz
	if  (OSC == 4)
		Nop
		Nop
		Nop
		Nop
		Nop
		Nop
	endif
;' Assemble this code if the Xtal is 8Mhz
	if  (OSC == 8)
		Movlw	5
		Movwf	_Off_Delay
Inner2		Decfsz	_Off_Delay
		Goto Inner2
	endif

;' Assemble this code if the Xtal is 10Mhz
	if  (OSC == 10)
		Movlw	5
		Movwf	_Off_Delay
Inner2		Decfsz	_Off_Delay
		Goto Inner2
	endif

;' Assemble this code if the Xtal is 12Mhz
	if  (OSC == 12)
		Movlw	5
		Movwf	_Off_Delay
Inner2		Decfsz	_Off_Delay
		Goto Inner2
	endif

		Decfsz	_Dlctr
		Goto	Irlp1	
		Return

Endasm
Over_IRSEROUT:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777奇米成人网| 国产精品一二二区| 欧美午夜精品免费| 亚洲mv在线观看| 91精品蜜臀在线一区尤物| 日本午夜一本久久久综合| www亚洲一区| 97久久精品人人做人人爽50路 | 国产成人亚洲精品狼色在线| 久久久国产一区二区三区四区小说| 国产福利视频一区二区三区| 亚洲精品视频在线看| 69堂亚洲精品首页| 精品综合免费视频观看| 中文在线资源观看网站视频免费不卡 | 国产·精品毛片| 一区二区免费看| 精品欧美乱码久久久久久| 成人精品亚洲人成在线| 亚洲va欧美va人人爽| 久久久精品免费免费| 91激情五月电影| 国产精品白丝jk黑袜喷水| 亚洲精品视频一区| 精品国产一区二区三区av性色| 99这里只有久久精品视频| 视频一区欧美日韩| 国产精品久久久久国产精品日日| 欧美日本国产视频| 成人激情av网| 久久爱另类一区二区小说| 亚洲精品欧美二区三区中文字幕| 日韩三级在线观看| 在线观看区一区二| 成人晚上爱看视频| 伦理电影国产精品| 一区二区欧美国产| 国产欧美日韩精品a在线观看| 欧美日韩精品电影| 91视频91自| 国产精品自拍av| 麻豆精品精品国产自在97香蕉| 亚洲欧洲韩国日本视频| 欧美成人a在线| 欧美日本韩国一区二区三区视频 | 久久精品久久久精品美女| 亚洲免费伊人电影| 国产人久久人人人人爽| 国产欧美精品一区aⅴ影院| 日韩视频一区二区在线观看| 在线观看av一区| 一本大道综合伊人精品热热| 国产盗摄女厕一区二区三区| 日韩精品色哟哟| 亚洲午夜激情av| 亚洲少妇30p| 亚洲欧美偷拍三级| 中文字幕一区二区日韩精品绯色| 久久亚洲一区二区三区明星换脸 | 欧美日韩精品一区二区三区四区 | 国产视频一区在线观看| 日韩色在线观看| 欧美日本国产一区| 欧美日韩国产高清一区二区三区 | 欧美日韩国产区一| 在线观看免费亚洲| 欧美网站一区二区| 在线观看视频欧美| 欧美视频在线播放| 欧美日韩综合在线免费观看| 色999日韩国产欧美一区二区| 99久久综合99久久综合网站| 懂色av中文字幕一区二区三区| 国产综合久久久久影院| 精品亚洲国内自在自线福利| 久久电影网电视剧免费观看| 麻豆传媒一区二区三区| 久久99精品国产.久久久久| 久久成人综合网| 国产久卡久卡久卡久卡视频精品| 极品美女销魂一区二区三区免费| 久久99久久久欧美国产| 国产精品一二三四| av电影在线观看不卡| 在线观看中文字幕不卡| 欧美日韩国产综合一区二区| 日韩午夜激情av| 国产欧美一区二区精品婷婷| 亚洲色图色小说| 亚洲国产一区二区三区青草影视| 玉米视频成人免费看| 日韩一级高清毛片| 国产成人激情av| av网站一区二区三区| 色婷婷亚洲精品| 7878成人国产在线观看| 欧美videossexotv100| 久久久91精品国产一区二区三区| 国产日韩欧美综合在线| 亚洲精品久久久久久国产精华液| 亚洲福利一区二区| 国产综合色视频| 91在线视频18| 91精品一区二区三区在线观看| 久久你懂得1024| 亚洲人被黑人高潮完整版| 日本不卡一区二区三区高清视频| 国产一区二区导航在线播放| 91蝌蚪porny| 欧美第一区第二区| 一区二区三区四区中文字幕| 久久国产精品区| 日韩精品资源二区在线| 一本色道久久加勒比精品| 欧美高清www午色夜在线视频| 久久久亚洲欧洲日产国码αv| 中文字幕在线观看不卡视频| 亚洲chinese男男1069| 国产在线一区观看| 在线亚洲高清视频| 久久一夜天堂av一区二区三区| 99热在这里有精品免费| 五月综合激情婷婷六月色窝| 亚洲男同1069视频| 久久成人免费日本黄色| 国产亚洲成av人在线观看导航| 亚洲三级电影网站| 精品夜夜嗨av一区二区三区| 精品视频一区 二区 三区| 国产亚洲综合色| 免费一级片91| 欧美吞精做爰啪啪高潮| 中文字幕乱码一区二区免费| 免费看日韩精品| 在线国产亚洲欧美| 中文字幕一区在线观看视频| 久久国产精品第一页| 欧美日产在线观看| 亚洲欧美一区二区三区国产精品| 国产丶欧美丶日本不卡视频| 欧美日本一区二区| 亚洲第一搞黄网站| 一本一道综合狠狠老| 国产精品久久网站| 国产精品一区免费视频| 日韩精品中文字幕在线一区| 偷窥国产亚洲免费视频| 色婷婷精品大视频在线蜜桃视频| 欧美国产成人精品| 国产jizzjizz一区二区| 久久亚洲综合色一区二区三区| 蜜桃久久久久久| 欧美日韩中文字幕一区| 一区二区三区鲁丝不卡| 91麻豆福利精品推荐| 亚洲欧美一区二区不卡| 91在线免费看| 亚洲色图欧美偷拍| 色综合中文字幕国产| 亚洲欧美国产77777| 色综合久久88色综合天天| ...av二区三区久久精品| 成人97人人超碰人人99| 成人免费一区二区三区视频| 不卡视频在线看| 亚洲欧美日本在线| 欧美系列日韩一区| 波多野结衣91| 亚洲特黄一级片| 91国偷自产一区二区三区观看| 亚洲精品国产一区二区三区四区在线| 99久久精品国产观看| 亚洲靠逼com| 欧美日韩高清在线播放| 免费人成精品欧美精品 | 日韩视频在线你懂得| 久久精品国产网站| 久久免费午夜影院| 夫妻av一区二区| 一区二区三区四区国产精品| 精品视频一区 二区 三区| 日韩在线播放一区二区| 26uuu久久综合| 成人av电影在线观看| 亚洲一区在线观看视频| 欧美一区二区成人6969| 国产精品一区二区在线播放| 日韩伦理电影网| 欧美日韩高清一区二区不卡| 狠狠色丁香婷综合久久| 国产精品另类一区| 欧美日精品一区视频| 狠狠色丁香婷综合久久| 亚洲欧美日韩一区| 欧美一区二区观看视频| 国产sm精品调教视频网站| 一区二区三区四区中文字幕| 欧美本精品男人aⅴ天堂| 成人av资源站| 午夜国产精品一区|