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

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

?? lfdac.asm

?? DSPLF2407的DA轉換程序
?? 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| 国内久久婷婷综合| 国产精品剧情在线亚洲| 91啪在线观看| 亚洲超丰满肉感bbw| 日韩欧美视频在线| 国产传媒欧美日韩成人| 亚洲丝袜精品丝袜在线| 欧美在线观看视频一区二区 | 欧美国产欧美综合| proumb性欧美在线观看| 一区二区免费看| 日韩亚洲欧美在线| 国产成人免费xxxxxxxx| 樱花影视一区二区| 日韩欧美亚洲另类制服综合在线| 国产麻豆91精品| 亚洲视频免费观看| 日韩精品专区在线影院重磅| 成人污视频在线观看| 亚洲一区二区三区免费视频| 欧美精品一区二区三区久久久| 成人黄色网址在线观看| 性欧美大战久久久久久久久| 欧美国产日韩一二三区| 欧美日韩三级视频| 成人小视频在线观看| 亚洲高清免费观看| 中文av字幕一区| 欧美人动与zoxxxx乱| 国产福利一区在线观看| 亚洲制服欧美中文字幕中文字幕| 欧美sm美女调教| 色94色欧美sute亚洲线路一ni| 精品一区二区三区免费毛片爱| 亚洲人成人一区二区在线观看| 日韩精品一区二区三区在线播放 | 韩国精品在线观看| 亚洲欧美日韩久久| 久久亚洲综合色一区二区三区| 欧美伊人久久大香线蕉综合69| 国产一区二区三区日韩| 亚洲超碰精品一区二区| 国产精品久久99| 久久亚洲精品国产精品紫薇| 欧美精品丝袜久久久中文字幕| 99久久777色| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 97久久久精品综合88久久| 精品一区二区三区在线观看| 偷拍日韩校园综合在线| 亚洲美女免费在线| 国产精品二三区| 国产日本欧洲亚洲| 欧美大片在线观看一区| 欧美精品一二三四| 欧美色综合久久| 日本高清无吗v一区| 99久久伊人网影院| 高清不卡一二三区| 国产成人综合自拍| 国产成人av影院| 国产精品一区二区x88av| 久久99久国产精品黄毛片色诱| 婷婷综合五月天| 亚洲va韩国va欧美va精品| 一区二区三区四区乱视频| 亚洲久本草在线中文字幕| 成人免费在线视频| 亚洲三级小视频| 自拍偷拍亚洲综合| 亚洲欧美日韩国产另类专区| 亚洲色图都市小说| 一区二区三区四区高清精品免费观看| 亚洲欧美日韩国产中文在线| 亚洲精品网站在线观看| 亚洲黄色在线视频| 亚洲成人一二三| 免费看欧美美女黄的网站| 琪琪一区二区三区| 加勒比av一区二区| 成人亚洲一区二区一| 99精品欧美一区二区三区综合在线| 成人激情图片网| 日本道色综合久久| 欧美日韩三级视频| 欧美大尺度电影在线| 久久久影院官网| 1024精品合集| 午夜欧美电影在线观看| 美女高潮久久久| 国产不卡视频一区| 在线精品亚洲一区二区不卡| 欧美日韩黄色一区二区| 欧美不卡一区二区三区四区| 国产日韩欧美高清| 亚洲欧美日韩国产综合| 日本欧美肥老太交大片| 国产成人精品亚洲日本在线桃色| 99视频在线精品| 欧美蜜桃一区二区三区| 精品播放一区二区| 亚洲色图欧洲色图婷婷| 偷拍日韩校园综合在线| 国产成人综合亚洲91猫咪| 色久优优欧美色久优优| 欧美www视频| 亚洲精品国产第一综合99久久| 五月婷婷欧美视频| 国产成人自拍网| 欧美日韩国产电影| 国产日韩精品一区二区三区 | 日韩一区二区三区免费看 | kk眼镜猥琐国模调教系列一区二区| 欧美在线观看一二区| 久久久久国产一区二区三区四区| 亚洲卡通动漫在线| 久久国产三级精品| 欧美又粗又大又爽| 国产女人18毛片水真多成人如厕| 亚洲一区二区三区四区中文字幕| 国产精品乡下勾搭老头1| 欧美日韩国产不卡| 国产精品免费看片| 韩国中文字幕2020精品| 欧美午夜精品一区| 国产精品久久夜| 久久国产精品色| 精品视频免费在线| 亚洲日本在线看| 国产成人av电影在线播放| 欧美精品亚洲一区二区在线播放| 中文字幕日韩欧美一区二区三区| 久久精品噜噜噜成人88aⅴ| 日本久久电影网| 国产精品午夜春色av| 另类欧美日韩国产在线| 欧美伦理视频网站| 依依成人精品视频| 成人免费高清在线| 久久亚洲一区二区三区明星换脸| 婷婷中文字幕一区三区| 在线观看日韩电影| 亚洲精品视频在线观看免费| 国产成人综合在线观看| 亚洲精品在线电影| 麻豆精品视频在线观看免费| 91麻豆精品国产91久久久使用方法 | 欧美日韩另类一区| 亚洲精品成a人| 色综合久久久久久久久久久| 中文字幕日韩欧美一区二区三区| 国产91清纯白嫩初高中在线观看 | 中文字幕亚洲综合久久菠萝蜜| 韩国精品免费视频| 精品日韩av一区二区| 美女在线观看视频一区二区| 91精品国产免费| 美女高潮久久久| 日韩欧美一级二级三级久久久| 日韩精品福利网| 欧美一二三区精品| 国产综合成人久久大片91| 精品国内片67194| 韩国欧美一区二区| 欧美韩国日本不卡| 99国产精品久久久久久久久久| 日韩毛片在线免费观看| 色av成人天堂桃色av| 亚洲福利视频一区| 欧美一区二区三区系列电影| 另类小说一区二区三区| 精品国产乱码久久久久久影片| 国产精品一级在线| 国产精品毛片a∨一区二区三区| 成人app在线| 亚洲欧美区自拍先锋| 日本韩国一区二区| 首页亚洲欧美制服丝腿| 日韩视频免费观看高清完整版| 激情综合色丁香一区二区| 国产欧美一区二区精品性色| av高清不卡在线| 香蕉成人啪国产精品视频综合网| 3d成人h动漫网站入口| 韩国在线一区二区| 中文字幕中文字幕一区二区| 在线观看av一区二区| 日韩国产一二三区| 国产色产综合产在线视频| 99天天综合性| 秋霞午夜鲁丝一区二区老狼| 中文字幕欧美国产| 欧美色综合影院| 国产精品一区免费在线观看| 一级女性全黄久久生活片免费|