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

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

?? lfdac.asm

?? 一些DSP2407源程序
?? ASM
?? 第 1 頁 / 共 3 頁
字號:
;*********************************************************************
; File Name:	 lfdac.asm
; Target System: C240x Evaluation Board
;
; Description:	 Outputs 4 Sine Waves on the EVM DAC - DAC0,DAC1,DAC2,DAC3
;                Sine waves generated through a look up table and
;                interpolation.  
;
;                Manipulating the following variables allows one to control
;                the sine wave
;                    FREQSTEPx - modifies the frequency
;                    MODREGx - modifies the starting angle
;                    MAGx - modifies the peak to peak voltage
;                where x is 0,1,2,3
;
;
; Revision:      1.00
;
;*********************************************************************
		.include	240x.h
;---------------------------------------------------------------------
; I/O Mapped EVM Registers
;---------------------------------------------------------------------
DAC0     	.set    0000h		;DAC Channel 0 Register
DAC1     	.set    0001h		;DAC Channel 1 Register
DAC2     	.set    0002h		;DAC Channel 2 Register
DAC3     	.set    0003h		;DAC Channel 3 Register
DAC_UPDATE  .set    0004h		;DAC Update Register
SWITCHES	.set    0008h		;DIP Switch Register
LEDS      	.set    000Ch		;LEDs Register
temp		.set    8000h

;---------------------------------------------------------------------
; Variables Declartion for B2
;---------------------------------------------------------------------
		.bss	GPR0,1	;General Purpose Register
		.bss	DAC0VAL,1	;DAC0 Channel Value
		.bss	DAC1VAL,1	;DAC1 Channel Value
		.bss	DAC2VAL,1	;DAC2 Channel Value
		.bss	DAC3VAL,1	;DAC3 Channel Value

;===========================================================================================
; V E C T O R    T A B L E    ( including RT monitor traps )
;===========================================================================================
 
        	.copy		"vector.h" 
 
;==========================================================================================
; M A I N   C O D E  - starts here
;==========================================================================================
			.text
START:  LDP		#0h
		SETC	INTM			;Disable interrupts
		SETC	CNF
		SPLK	#0h, IMR		;Mask all Ints
		LACC	IFR				;Read Interrupt flags
		SACL	IFR				;Clear all interrupt flags

		CLRC	SXM			;Clear Sign Extension Mode
		CLRC	OVM			;Reset Overflow Mode
		CLRC	CNF			;Config Block B0 to Data mem.   
		 
		LDP		#00E0h 
        SPLK	#0285h, SCSR1	; x2 PLL, ADC en, EV1 en, clr Ill Addr flg		

		SPLK	#006Fh, WDCR 	;Disable WD if VCCP=5V
		KICK_DOG

		SPLK	#0h, GPR0	;Set 1 wait states for I/O space
		OUT		GPR0, WSGR

;The DAC module requires that wait states be generated for proper operation.

		LDP		#0000h			;DP for address 0000h-007Fh, B2
		SPLK	#4h,GPR0			;Set Wait State Generator for
		OUT		GPR0,WSGR			;Program Space, 0 wait states
							;Data Space, 0 wait states
							;I/O Space, 1 wait state


;==================================================================================
; The following section creates sine waves for each channel
;==================================================================================

		.bss	TABLE,1			;Keeps address of the pointer in the SINE Table
		.bss	TOPTABLE,1			;Keeps the reset value for the pointer

		.bss	REMAINDER,1			;Remainder of the MODREGx values
		.bss	VALUE,1			;SINE Table Value 
		.bss	NEXTVALUE,1 		;Next entry in the SINE Table
		.bss	DIFFERENCE,1		;Difference between Entries
		
		.bss 	FREQSTEP0,1			;Frequency modulation of the 1st sine wave
		.bss	MODREG0,1			;Rolling Modulo Register for 1st sine wave
		.bss	MAG0,1			;Magnitude of the frequency for 1st sine wave

		.bss	FREQSTEP1,1			;Frequency modulation of the 2nd sine wave
		.bss	MODREG1,1			;Rolling Modulo Register for 2nd sine wave 
		.bss	MAG1,1			;Magnitude of the frequency for 2nd sine wave

		.bss 	FREQSTEP2,1			;Frequency modulation of the 3rd sine wave
		.bss	MODREG2,1			;Rolling Modulo Register for 3rd sine wave
		.bss	MAG2,1			;Magnitude of the frequency for 3rd sine wave

		.bss	FREQSTEP3,1			;Frequency modulation of the 4th sine wave
		.bss	MODREG3,1			;Rolling Modulo Register for 4th sine wave 
		.bss	MAG3,1			;Magnitude of the frequency for 4th sine wave


		.text
		SPLK	#0000h,TABLE
		SPLK	#STABLE,TOPTABLE

		SPLK	#1000,FREQSTEP0		;Controls the frequency for DAC0
		SPLK	#0C000h,MODREG0		;Sets the starting point
		SPLK	#7FFFh,MAG0			;Maximum value, Q15

		SPLK	#1000,FREQSTEP1		;Controls the frequency for DAC1
		SPLK	#0000h,MODREG1		;Sets the starting point
		SPLK	#7FFFh,MAG1			;Maximum value, Q15

		SPLK	#1000,FREQSTEP2		;Controls the frequency for DAC2
		SPLK	#4000h,MODREG2		;Sets the starting point
		SPLK	#7FFFh,MAG2			;Maximum value, Q15

		SPLK	#1000,FREQSTEP3		;Controls the frequency for DAC3
		SPLK	#08000h,MODREG3		;Sets the starting point
		SPLK	#7FFFh,MAG3			;Maximum value, Q15

;The following section performs the necessary calculations for the first sine wave

SINE	LDP		#0			
		LACC	MODREG0		;ACC loaded with the counting register
		ADD		FREQSTEP0		;Counting Register increased by specific step
		SACL	MODREG0		;Store the updated the counter value
		LACC	MODREG0,8		;Reload the new counter value but shift left by 8 bits
		SACH	TABLE			;Store the high bit into the TABLE as pointer to lookup table
		SFR				;Shift the value to the right convert to Q15
		AND		#07FFFh		;Make sure the Q15 value is positive
		SACL 	REMAINDER		;Store the fractional value of the counting register

		LACC	TABLE			;Load the accumulator with the proper index value
		ADD		TOPTABLE		;Displace the ACC with the starting address
		TBLR	VALUE			;Read the value from the table and store into VALUE
		ADD		#1			;Increment the ACC to the next address
		TBLR	NEXTVALUE		;Read the next value from the table and store into NEXTVALUE

		LACC	NEXTVALUE		;Load the ACC with NEXTVALUE
		SUB		VALUE			;Subtract the previous value
		SACL	DIFFERENCE		;Store the difference between the values into DIFFERENCE	
		
		LT		DIFFERENCE		;Load the TREG with DIFFERENCE
		MPY		REMAINDER		;Multiply the DIFFERENCE with REMAINDER
		PAC				;Move the product to the ACC

		SACH	REMAINDER,1		;Store the upper byte to REMAINER and shift left by 1, Q15
		LACC	REMAINDER		;Load ACC with new REMAINDER
		ADD		VALUE			;Add VALUE to get the new interpolated value
		SACL	VALUE			;Store the interpolated value into VALUE

		LT		VALUE			;Load the TREG with the new interpolated VALUE
		MPY		MAG0			;Multiply VALUE by a magnitude 
		PAC				;Move the product to ACC
		SACH	DAC0VAL,1		;Store the new value to DAC0VAL to output, shift to get Q15

;The following section performs the necessary calculations for the second sine wave

		LACC	MODREG1		;ACC loaded with the counting register
		ADD		FREQSTEP1		;Counting Register increased by specific step
		SACL	MODREG1		;Store the updated the counter value
		LACC	MODREG1,8		;Reload the new counter value but shift left by 8 bits
		SACH	TABLE			;Store the high bit into the TABLE as pointer to lookup table
		SFR				;Shift the value to the right convert to Q15
		AND		#07FFFh		;Make sure the Q15 value is positive
		SACL 	REMAINDER		;Store the fractional value of the counting register

		LACC	TABLE			;Load the accumulator with the proper index value
		ADD		TOPTABLE		;Displace the ACC with the starting address
		TBLR	VALUE			;Read the value from the table and store into VALUE
		ADD		#1			;Increment the ACC to the next address
		TBLR	NEXTVALUE		;Read the next value from the table and store into NEXTVALUE

		LACC	NEXTVALUE		;Load the ACC with NEXTVALUE
		SUB		VALUE			;Subtract the previous value
		SACL	DIFFERENCE		;Store the difference between the values into DIFFERENCE
		
		LT		DIFFERENCE		;Load the TREG with DIFFERENCE
		MPY		REMAINDER		;Multiply the DIFFERENCE with REMAINDER
		PAC				;Move the product to the ACC
		SACH	REMAINDER,1		;Store the upper byte to REMAINER and shift left by 1, Q15

		LACC	REMAINDER		;Load ACC with new REMAINDER
		ADD		VALUE			;Add VALUE to get the new interpolated value
		SACL	VALUE			;Store the interpolated value into VALUE

		LT		VALUE			;Load the TREG with the new interpolated VALUE
		MPY		MAG1			;Multiply VALUE by a magnitude 
		PAC				;Move the product to ACC

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品人人做人人综合| 欧美一区二区三区系列电影| 久久电影网站中文字幕| 亚洲激情在线播放| 亚洲人精品一区| 亚洲视频精选在线| 亚洲日本护士毛茸茸| 中文字幕制服丝袜成人av| 中文字幕av在线一区二区三区| 26uuu久久天堂性欧美| 精品毛片乱码1区2区3区| 精品国产乱码久久久久久免费 | 欧美乱妇20p| 欧美吻胸吃奶大尺度电影| 欧美日韩精品一区二区天天拍小说 | 亚洲综合小说图片| 亚洲国产一区二区视频| 天天综合网 天天综合色| 偷拍与自拍一区| 另类调教123区| 国产不卡视频在线播放| av在线综合网| 欧美亚日韩国产aⅴ精品中极品| 制服丝袜国产精品| 久久久国际精品| 亚洲女厕所小便bbb| 天堂一区二区在线免费观看| 久久99国产乱子伦精品免费| 99热精品国产| 欧美日韩国产综合久久| 欧美videos大乳护士334| 中文字幕视频一区二区三区久| 亚洲精品乱码久久久久久日本蜜臀| 无码av免费一区二区三区试看| 久久国产尿小便嘘嘘尿| 波多野结衣中文字幕一区 | 蜜臀久久久99精品久久久久久| 精品亚洲欧美一区| 日本伦理一区二区| 精品少妇一区二区三区| 亚洲色图19p| 蜜桃视频第一区免费观看| 成人免费视频一区| 日韩一二在线观看| 亚洲乱码国产乱码精品精的特点| 日韩高清在线电影| 91小视频在线免费看| 欧美成人一级视频| 一片黄亚洲嫩模| 国产98色在线|日韩| 欧美顶级少妇做爰| 亚洲素人一区二区| 国产精品亚洲午夜一区二区三区 | 美女网站在线免费欧美精品| 99久久久无码国产精品| 久久综合999| 日韩精品1区2区3区| 色综合色综合色综合色综合色综合| 日韩视频免费观看高清在线视频| 亚洲黄色在线视频| 岛国av在线一区| 久久免费视频色| 久久精品99久久久| 欧美一区午夜视频在线观看| 亚洲老妇xxxxxx| av成人动漫在线观看| 欧美经典一区二区三区| 国产老女人精品毛片久久| 欧美另类高清zo欧美| 亚洲尤物在线视频观看| 99久久99精品久久久久久| 中文字幕精品一区| 成人精品高清在线| 中文字幕一区二| www.爱久久.com| 亚洲欧洲成人精品av97| 成人免费高清在线| 中文字幕一区在线观看| 成人91在线观看| 伊人开心综合网| 91黄色在线观看| 亚洲一二三区视频在线观看| 色噜噜狠狠色综合欧洲selulu| 中文字幕在线一区| 色综合久久综合网欧美综合网| 亚洲三级电影全部在线观看高清| 91在线一区二区| 一区二区三区精密机械公司| 在线精品国精品国产尤物884a| 亚洲一区二区精品视频| 4438x亚洲最大成人网| 青青草视频一区| 日韩精品一区二区三区中文不卡| 精品一区二区三区欧美| 久久久美女艺术照精彩视频福利播放| 国产在线视频一区二区| 国产女人aaa级久久久级 | 激情综合色播激情啊| 久久久久综合网| 成人av网站在线| 亚洲二区视频在线| 日韩欧美一级片| 国产成人av在线影院| 成人免费在线观看入口| 欧美日韩国产欧美日美国产精品| 麻豆成人av在线| 国产精品福利一区| 欧美日韩精品是欧美日韩精品| 精品一区二区三区欧美| 亚洲欧洲精品成人久久奇米网| 88在线观看91蜜桃国自产| 极品少妇一区二区三区精品视频| 国产精品私人影院| 在线不卡中文字幕播放| 国产高清久久久| 日韩极品在线观看| 国产精品狼人久久影院观看方式| 欧美日韩精品一区二区三区四区| 国产一区二区精品在线观看| 一区二区三区欧美亚洲| 国产亚洲婷婷免费| 欧美体内she精高潮| 国产高清视频一区| 日韩电影在线免费看| 亚洲女女做受ⅹxx高潮| 国产视频在线观看一区二区三区 | 日韩一级大片在线观看| 91老师片黄在线观看| 狠狠色丁香久久婷婷综合丁香| 亚洲一二三区视频在线观看| 国产精品免费视频观看| 日韩视频中午一区| 欧美性做爰猛烈叫床潮| 95精品视频在线| 丁香网亚洲国际| 国产乱子伦视频一区二区三区 | 久久精品国产精品亚洲精品| 亚洲人成小说网站色在线| 国产午夜亚洲精品午夜鲁丝片 | av午夜一区麻豆| 国产在线麻豆精品观看| 日本aⅴ免费视频一区二区三区| 亚洲码国产岛国毛片在线| 日本一区二区视频在线| 久久久综合视频| 精品国产乱子伦一区| 这里是久久伊人| 7878成人国产在线观看| 欧美日韩一区国产| 欧美性大战久久久久久久蜜臀| 99九九99九九九视频精品| 99久久99久久精品免费看蜜桃| 成人妖精视频yjsp地址| 国产成人超碰人人澡人人澡| 国产精品小仙女| 国产精品影视在线观看| 国产一区二区三区四区五区入口| 国内不卡的二区三区中文字幕| 久久99在线观看| 国产精品综合久久| 国产精品伊人色| 波多野结衣在线aⅴ中文字幕不卡| 国产成人夜色高潮福利影视| 国产传媒欧美日韩成人| 成人综合婷婷国产精品久久免费| 成人伦理片在线| 色综合欧美在线| 91麻豆精品国产91久久久久久久久 | 91精品国产综合久久福利| 日韩视频在线你懂得| 久久综合久久综合久久综合| 国产午夜亚洲精品理论片色戒| 欧美激情一区不卡| 洋洋av久久久久久久一区| 日韩中文字幕麻豆| 韩国视频一区二区| 成人激情视频网站| 欧美日韩国产免费| www国产成人免费观看视频 深夜成人网| www国产成人| 亚洲免费大片在线观看| 日本欧美肥老太交大片| 国产大陆精品国产| 精品婷婷伊人一区三区三| 精品美女被调教视频大全网站| 国产精品毛片久久久久久| 亚洲一区二区精品久久av| 捆绑变态av一区二区三区| 成人福利视频网站| 91精品啪在线观看国产60岁| 久久久精品国产99久久精品芒果| 亚洲蜜臀av乱码久久精品| 麻豆国产一区二区| 色美美综合视频| 精品91自产拍在线观看一区| 亚洲日本va午夜在线影院| 麻豆精品一区二区综合av| aaa国产一区| 久久久国产综合精品女国产盗摄| 亚洲国产欧美一区二区三区丁香婷|