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

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

?? dac.asm

?? tm320lf2407測試程序
?? ASM
?? 第 1 頁 / 共 3 頁
字號:
;*********************************************************************
; File Name:	 dac.asm
; Target System: C24x 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	f240regs.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

;---------------------------------------------------------------------
; Vector address declarations
;---------------------------------------------------------------------
		.sect	".vectors"

RSVECT	B    START		; Reset Vector
INT1	  	B    PHANTOM	; Interrupt Level 1
INT2	  	B    PHANTOM	; Interrupt Level 2
INT3	  	B    PHANTOM	; Interrupt Level 3
INT4	  	B    PHANTOM	; Interrupt Level 4
INT5	  	B    PHANTOM	; Interrupt Level 5
INT6	  	B    PHANTOM	; Interrupt Level 6
RESERVED  	B    PHANTOM	; Reserved
SW_INT8   	B    PHANTOM	; User S/W Interrupt
SW_INT9   	B    PHANTOM	; User S/W Interrupt
SW_INT10  	B    PHANTOM	; User S/W Interrupt
SW_INT11  	B    PHANTOM	; User S/W Interrupt
SW_INT12  	B    PHANTOM	; User S/W Interrupt
SW_INT13  	B    PHANTOM	; User S/W Interrupt
SW_INT14  	B    PHANTOM	; User S/W Interrupt
SW_INT15  	B    PHANTOM	; User S/W Interrupt
SW_INT16  	B    PHANTOM	; User S/W Interrupt
TRAP	  	B    PHANTOM	; Trap vector
NMINT	  	B    PHANTOM	; Non-maskable Interrupt
EMU_TRAP  	B    PHANTOM	; Emulator Trap
SW_INT20  	B    PHANTOM	; User S/W Interrupt
SW_INT21  	B    PHANTOM	; User S/W Interrupt
SW_INT22  	B    PHANTOM	; User S/W Interrupt
SW_INT23  	B    PHANTOM	; User S/W Interrupt


;=====================================================================
; M A I N   C O D E  - starts here
;=====================================================================
		.text
		NOP
START:	SETC	INTM    			;Disable interrupts
		SPLK	#0002h,IMR			;Mask all core interrupts except INT2

		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			;DP for addresses 7000h-707Fh
		SPLK	#00BBh,CKCR1  		;CLKIN(OSC)=10MHz,CPUCLK=20MHz
		SPLK	#00C3h,CKCR0 		;CLKMD=PLL Enable,SYSCLK=CPUCLK/2
		SPLK	#40C0h,SYSCR 		;CLKOUT=CPUCLK		

		SPLK	#006Fh, WDCR		;Disable WD if VCCP=5V (JP5 in pos. 2-3)
		KICK_DOG				;Reset Watchdog


;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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品视频在线| 亚洲三级在线免费| 日韩西西人体444www| 欧美一级午夜免费电影| 久久综合视频网| 国产精品婷婷午夜在线观看| 国产精品亲子伦对白| 中文字幕中文乱码欧美一区二区| 国产精品欧美综合在线| 亚洲久本草在线中文字幕| 午夜国产不卡在线观看视频| 日本视频免费一区| 91丨porny丨首页| 欧美日韩精品系列| 精品国产免费人成电影在线观看四季 | 久久久久亚洲蜜桃| 午夜日韩在线电影| 成人久久视频在线观看| 3d成人h动漫网站入口| 国产精品乱人伦一区二区| 一区二区三区不卡视频| 国产精品一级黄| 欧美精品第1页| 亚洲黄色片在线观看| 国产精品一区二区久久不卡| 欧美日韩精品免费| 亚洲欧美国产三级| 国产精品一区二区男女羞羞无遮挡| 欧美日韩国产综合视频在线观看 | 蜜桃精品视频在线| 91黄色激情网站| 中文字幕日韩一区| 成人黄色在线网站| 国产精品传媒入口麻豆| 成人黄色综合网站| 国产精品三级在线观看| 国产福利电影一区二区三区| 欧美国产精品专区| 91在线免费播放| 亚洲色图一区二区三区| 在线视频观看一区| 亚洲成人av福利| 91精品国产综合久久福利软件 | 欧美日韩一区二区三区高清| 亚洲一区在线电影| 精品国产精品网麻豆系列| 国产一区日韩二区欧美三区| 久久精品亚洲精品国产欧美| 色婷婷综合五月| 男人的天堂亚洲一区| 国产欧美日韩麻豆91| 欧美图区在线视频| 老司机免费视频一区二区三区| 日韩欧美三级在线| 国产 欧美在线| 三级久久三级久久久| 久久精品欧美一区二区三区麻豆| 一本色道**综合亚洲精品蜜桃冫| 舔着乳尖日韩一区| 中文字幕 久热精品 视频在线| 欧美日韩久久一区二区| 国产不卡视频在线播放| 亚瑟在线精品视频| 亚洲欧美怡红院| 精品少妇一区二区三区在线视频 | 国产午夜精品在线观看| 欧美高清视频一二三区| av高清不卡在线| 国产在线看一区| 捆绑变态av一区二区三区| 亚洲乱码中文字幕综合| 久久久久99精品一区| 欧美刺激午夜性久久久久久久| 一道本成人在线| 色哟哟一区二区在线观看 | 欧美精品一区二区三区在线播放 | 午夜影院久久久| 亚洲精品欧美专区| 亚洲精品网站在线观看| 亚洲欧洲另类国产综合| 国产精品成人午夜| 国产女主播一区| 亚洲一级在线观看| 亚洲区小说区图片区qvod| 色天使久久综合网天天| 久久国产精品99精品国产| 麻豆免费精品视频| 成人性生交大片免费看视频在线| 国产成人综合在线观看| zzijzzij亚洲日本少妇熟睡| 色综合色综合色综合色综合色综合| av网站一区二区三区| 在线观看成人免费视频| 欧美一级二级在线观看| 久久色中文字幕| 亚洲裸体在线观看| 午夜精品国产更新| 国产一区二区三区| 91欧美一区二区| 日韩欧美精品在线视频| 亚洲欧美一区二区三区孕妇| 日本美女一区二区三区视频| 不卡av在线免费观看| 日韩一区二区电影在线| 中文字幕第一区二区| 五月婷婷激情综合网| www.亚洲人| 337p亚洲精品色噜噜噜| 日韩美女精品在线| 国产一区二区三区免费播放| 欧美性色aⅴ视频一区日韩精品| 2020国产精品久久精品美国| 亚洲成人资源网| 在线影视一区二区三区| 国产精品人成在线观看免费| 免费久久99精品国产| 欧美亚洲一区二区在线| 国产精品理论片在线观看| 国产精品主播直播| 久久综合九色综合欧美亚洲| 免费av网站大全久久| 精品视频资源站| 五月天中文字幕一区二区| 色狠狠av一区二区三区| 亚洲男人的天堂在线观看| 91麻豆免费观看| 亚洲激情av在线| 在线视频亚洲一区| 视频一区视频二区中文| 精品视频1区2区| 日韩有码一区二区三区| 欧美美女一区二区在线观看| 午夜精品免费在线| 精品久久人人做人人爱| 国产98色在线|日韩| 中文字幕一区二区不卡| 欧美自拍偷拍一区| 久久99国产精品麻豆| 久久这里只有精品视频网| 成人国产精品免费观看动漫 | 亚洲高清免费观看高清完整版在线观看 | 紧缚奴在线一区二区三区| 国产性色一区二区| 91福利在线导航| 国产乱人伦精品一区二区在线观看| 欧美精品一区二区久久婷婷| 岛国av在线一区| 美女任你摸久久| 国产精品久久久久久久久图文区| 精品视频一区二区不卡| 国产suv精品一区二区883| 亚洲一区中文日韩| 国产精品久久国产精麻豆99网站 | 亚洲一区二区精品3399| 精品国产亚洲在线| 欧美色图在线观看| 国产不卡视频在线观看| 日本不卡在线视频| 性做久久久久久久免费看| 国产精品福利影院| 中文文精品字幕一区二区| 日韩一区二区三区免费看| 欧美视频精品在线观看| 日本高清不卡视频| 国产**成人网毛片九色| 高清在线不卡av| 国产美女在线观看一区| 五月天一区二区| 久久精品国产成人一区二区三区| 亚洲激情综合网| 亚洲最大成人综合| 樱桃视频在线观看一区| 又紧又大又爽精品一区二区| 亚洲天堂a在线| 亚洲伊人色欲综合网| 国产一区二区主播在线| 国产乱淫av一区二区三区| 成人动漫av在线| 日本道色综合久久| 欧美色图在线观看| www国产成人免费观看视频 深夜成人网| 欧美高清激情brazzers| 日韩一区二区免费视频| 日本一区二区三区国色天香 | jlzzjlzz亚洲日本少妇| 日本韩国一区二区三区视频| 欧美日韩国产中文| 久久久不卡网国产精品二区| 自拍偷拍国产精品| 日韩高清不卡一区二区| 高清成人免费视频| 欧美日产在线观看| 国产欧美日韩一区二区三区在线观看| 亚洲黄一区二区三区| 国产一区二区0| 欧美色视频在线观看| 国产精品网站在线播放| 青青草91视频| 欧美日本国产视频| 国产色产综合色产在线视频|