亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品99久久不卡二区| 欧美精品久久一区| 久久免费的精品国产v∧| 精品在线一区二区三区| 国产女同性恋一区二区| 99久久99久久免费精品蜜臀| 亚洲国产日日夜夜| 欧美一区二区三区视频免费 | 国产成人在线免费| 亚洲欧美另类小说视频| 欧美一级国产精品| 色狠狠桃花综合| 极品少妇xxxx偷拍精品少妇| 偷窥少妇高潮呻吟av久久免费| 国产欧美一区二区三区在线老狼| 精品久久五月天| 欧美日韩精品高清| 91丝袜国产在线播放| 国产乱码精品1区2区3区| 国产福利不卡视频| 成人国产精品视频| 国产精品白丝jk黑袜喷水| 国产成人精品综合在线观看| 色8久久精品久久久久久蜜| 欧美人妖巨大在线| 久久久久久久久一| 亚洲已满18点击进入久久| 中文字幕日韩av资源站| 日本一区二区三区dvd视频在线| 国产精品久久福利| 中文字幕亚洲在| 亚洲va欧美va人人爽| 亚洲男女一区二区三区| 日韩中文字幕区一区有砖一区 | 亚洲国产精品久久久久婷婷884| 亚洲第四色夜色| 狠狠色丁香婷婷综合久久片| 日韩福利视频导航| 视频一区视频二区中文字幕| 加勒比av一区二区| 91首页免费视频| 日韩视频免费观看高清完整版 | 91精品国产综合久久久久久| 在线观看91精品国产入口| 色天天综合久久久久综合片| 色婷婷狠狠综合| 亚洲精品一区二区精华| 精品国产91亚洲一区二区三区婷婷 | 欧美日韩一区视频| 91国产成人在线| 精品精品欲导航| 亚洲欧美日韩人成在线播放| 精品一二三四区| 欧美日韩日本视频| 综合电影一区二区三区 | 亚洲一线二线三线久久久| 国产乱码精品一区二区三区av | 日韩三级伦理片妻子的秘密按摩| 一区二区三区欧美久久| 亚洲欧洲日韩在线| 精品一区二区三区在线观看国产| 欧洲色大大久久| 自拍偷拍亚洲激情| 成人高清在线视频| 国产网站一区二区| 一区二区三区日韩精品| 高清久久久久久| 欧美日韩国产精品成人| 日韩美女视频19| 国产精品影视网| 日韩精品一区二区在线| 久久先锋影音av鲁色资源网| 国产精品久久久久久久第一福利| 国产一区二区久久| 在线观看一区二区视频| 亚洲欧美日韩在线不卡| 91日韩一区二区三区| 国产精品久久久久久亚洲伦| 成人av网址在线| 久久爱另类一区二区小说| 国产福利一区二区| 久久精品日韩一区二区三区| 国产精品自拍av| 国产精品欧美极品| 蜜桃av噜噜一区二区三区小说| 成人av在线播放网址| 国产精品久久午夜| 99re这里都是精品| 一级特黄大欧美久久久| 欧美日韩国产123区| 日韩成人一区二区| 精品久久99ma| 成人av免费网站| 亚洲一区二区三区在线| 91精品国产aⅴ一区二区| 激情综合五月婷婷| 亚洲少妇中出一区| 欧美精品一卡二卡| 韩国女主播成人在线观看| 国产精品久久久久婷婷二区次| 94-欧美-setu| 日本不卡视频在线观看| 欧美三级欧美一级| 美女精品一区二区| 麻豆91免费观看| 国产免费成人在线视频| 欧美性大战久久久| 一区二区三区自拍| 欧美一区二区三区在| 国产69精品一区二区亚洲孕妇| 中文字幕日韩一区| 精品国免费一区二区三区| 成人av动漫在线| 日本欧洲一区二区| 最新中文字幕一区二区三区| 91精品免费在线观看| 成人蜜臀av电影| 亚洲国产精品黑人久久久| 国产美女娇喘av呻吟久久| 亚洲美女视频一区| 久久久欧美精品sm网站| 欧美三级电影网| 国产精品一区二区在线观看网站| 亚洲一区二区三区免费视频| 国产日韩综合av| 日韩欧美自拍偷拍| 欧美在线看片a免费观看| 国产精品一区免费视频| 日本不卡在线视频| 亚洲激情网站免费观看| 精品视频1区2区| 成人h动漫精品一区二区| 免费看欧美女人艹b| 亚洲观看高清完整版在线观看| 国产精品色噜噜| 2020国产精品自拍| 7777精品伊人久久久大香线蕉最新版| 东方aⅴ免费观看久久av| 久久99国产精品麻豆| 午夜视频在线观看一区二区三区| 中文字幕中文字幕一区| 国产亚洲成aⅴ人片在线观看| 日韩三级在线观看| 制服丝袜av成人在线看| 欧美日韩亚洲国产综合| 91行情网站电视在线观看高清版| 国产在线一区观看| 精品一区二区三区免费播放| 人人狠狠综合久久亚洲| 全部av―极品视觉盛宴亚洲| 亚洲国产精品一区二区久久恐怖片| 国产精品三级av在线播放| 欧美韩日一区二区三区四区| 久久精品一区二区| 欧美激情一区二区三区| 国产精品剧情在线亚洲| 国产精品久久久久影院亚瑟| 综合分类小说区另类春色亚洲小说欧美| 国产片一区二区三区| 中文字幕乱码日本亚洲一区二区| 久久久蜜桃精品| 18成人在线观看| 依依成人精品视频| 亚洲国产一二三| 日韩成人午夜电影| 久久99精品国产91久久来源| 国内久久精品视频| www.亚洲激情.com| 黄色成人免费在线| 国产精品996| av在线不卡网| 欧美日韩亚洲丝袜制服| 日韩精品专区在线影院观看| 久久午夜老司机| 亚洲日本电影在线| 午夜久久久久久久久久一区二区| 日本sm残虐另类| 国产成人8x视频一区二区| 91高清视频免费看| 日韩女优制服丝袜电影| 国产精品久久久久久久久免费相片| 国产精品久久久久久久裸模 | 免费在线看成人av| 国产·精品毛片| 色综合久久中文字幕综合网| 欧美一区二区成人| 中文字幕中文字幕一区二区| 日韩高清在线电影| 懂色av中文字幕一区二区三区 | 懂色av一区二区在线播放| 日本电影欧美片| 亚洲精品在线观看网站| 亚洲精选在线视频| 国产精品99久| 7777精品伊人久久久大香线蕉的 | 99久久久久免费精品国产| 精品视频一区三区九区| 国产欧美一区二区在线观看| 视频一区二区三区在线| av一本久道久久综合久久鬼色|