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

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

?? example 2-20.asm

?? 《基于TI DSP的通用算法實現》程序代碼
?? ASM
?? 第 1 頁 / 共 2 頁
字號:

;Example 2 - 20. Creation of a Sine Modulated PWM Signal ASM Listing Based on TLU Using TMS320F240

;*******************************************************************
; File Name: pwm1.asm
; Originator: Digital Control systems Apps group - Houston
; Target System: 'C240 Evaluation Board
;
; Description: Pulse Width Modulator - Sets up the registers
; for an asymmetric PWM output. The output is a
; square wave with a sine wave modulated duty cycle.
; PWM Period is 0.05ms => 20kHz
;
; Entering the command
; wa *FREQSTEP,,u
; Allows one to change the step size to change
; the frequency in the debugger environment
;
; Last Updated: 20 June 1997
;
;*******************************************************************

	.include f240regs.h

;-------------------------------------------------------------------
; Vector address declarations
;-------------------------------------------------------------------

	.sect ".vectors"

RSVECT		B START 	; Reset Vector
INT1 		B PHANTOM 	; Interrupt Level 1
INT2 		B SINE 		; 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

;===================================================================
; MAIN CODE - 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

;-----------------------------------
; Set up PLL Module
;-----------------------------------

	LDP #00E0h

;The following line is necessary if a previous program set the PLL
;to a different ;setting than the settings which the application
;uses. By disabling the PLL, the CKCR1 register can be modified so
;that the PLL can run at the new settings when it is re-enabled.

	SPLK #0000000001000001b,CKCR0 	;CLKMD=PLL Disable
					;SYSCLK=CPUCLK/2
; 		5432109876543210
	SPLK #0000000010111011b,CKCR1
					;CLKIN(OSC)=10MHz,CPUCLK=20MHz

; CKCR1 - Clock Control Register 1
; 	Bits 7-4 (1011) CKINF(3)-CKINF(0) - Crystal or Clock-In
; 				Frequency
; 				Frequency = 10MHz
; 	Bit 3 (1) PLLDIV(2) - PLL divide by 2 bit
; 				Divide PLL input by 2
;	 Bits 2-0 (011) PLLFB(2)-PLLFB(0) - PLL multiplication ratio
; 				PLL Multiplication Ration = 4

; 		5432109876543210
	SPLK #0000000011000001b,CKCR0 	;CLKMD=PLL Enable
					;SYSCLK=CPUCLK/2

;CKCR0 - Clock Control Register 0
; 	Bits 7-6 (11) CLKMD(1),CLKMD(0) - Operational mode of
; 			Clock Module
; 			PLL Enabled; Run on CLKIN on exiting low
; 			power mode
; Bits 5-4 (00) PLLOCK(1),PLLOCK(0) - PLL Status.
; 			READ ONLY
; Bits 3-2 (00) PLLPM(1),PLLPM(0) - Low Power Mode
;			 LPM0
; Bit 1 (0) ACLKENA - 1MHz ACLK Enable
; 			ACLK Disabled
; Bit 0 (1) PLLPS - System Clock Prescale Value
; 			f(sysclk)=f(cpuclk)/2

; 		5432109876543210
	SPLK #0100000011000000b,SYSCR ;CLKOUT=CPUCLK

;SYSCR - System Control Register
; Bit 15-14 (01) RESET1,RESET0 - Software Reset Bits
; 		No Action
; Bits 13-8 (000000) Reserved
; Bit 7-6 (11) CLKSRC1,CLKSRC0 - CLKOUT-Pin Source
;	 	Select
; 		CPUCLK: CPU clock output mode
; Bit 5-0 (000000)Reserved


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

;-----------------------------------
; Set up Digital I/O Port
;-----------------------------------

	LDP #225 		;DP=225, Data Page to Configure OCRA
; 		5432109876543210
	SPLK #0011100000000000b,OCRA

;OCRA - Output Control Register A
; Bit 15 (0) CRA.15 - IOPB7
; Bit 14 (0) CRA.14 - IOPB6
; Bit 13 (1) CRA.13 - T3PWM/T3CMP
; Bit 12 (1) CRA.12 - T2PWM/T2CMP
; Bit 11 (1) CRA.11 - T1PWM/T1CMP
; Bit 10 (0) CRA.10 - IOPB2
; Bit 9  (0) CRA.9 - IOPB1
; Bit 8  (0) CRA.8 - IOPB0
; Bits 7-4 (0000) Reserved
; Bit 3 (0) CRA.3 - IOPA3
; Bit 2 (0) CRA.2 - IOPA2
; Bit 1 (0) CRA.1 - IOPA1
; Bit 0 (0) CRA.0 - IOPA0


;*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
;- Event Manager Module Reset
;*
SPRA411
16 Creating a Sine Modulated PWM Signal Using the TMS320F240 EVM
;- This section resets all of the Event Manager Module Registers.
;* This is necessary for silicon revision 1.1; however, for
;- silicon revisions 2.0 and later, this is not necessary
;*
;-
;*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

	LDP 	#232		;DP=232 Data Page for the Event Manager
	SPLK 	#0000h,GPTCON 	;Clear General Purpose Timer Control
	SPLK 	#0000h,T1CON 	;Clear GP Timer 1 Control
	SPLK 	#0000h,T2CON 	;Clear GP Timer 2 Control
	SPLK 	#0000h,T3CON 	;Clear GP Timer 3 Control
	SPLK 	#0000h,COMCON 	;Clear Compare Control
	SPLK 	#0000h,ACTR
			;Clear Full Compare Action Control Register
	SPLK 	#0000h,SACTR
			;Clear Simple Compare Action Control Register
	SPLK 	#0000h,DBTCON
			;Clear Dead-Band Timer Control Register

	SPLK #0000h,CAPCON 	;Clear Capture Control

	SPLK #0FFFFh,EVIFRA	;Clear Interrupt Flag Register A
	SPLK #0FFFFh,EVIFRB	;Clear Interrupt Flag Register B
	SPLK #0FFFFh,EVIFRC	;Clear Interrupt Flag Register C

	SPLK #0000h,EVIMRA 	;Clear Event Manager Mask Register A
	SPLK #0000h,EVIMRB 	;Clear Event Manager Mask Register B
	SPLK #0000h,EVIMRC 	;Clear Event Manager Mask Register C

;*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
;- End of RESET section for silicon revision 1.1 *
;*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

;-----------------------------------
; Set up Event Manager Module
;-----------------------------------

T1COMPARE 	.set 0 		; T1Compare Initialized to 0
T1PERIOD 	.set 1000 	; T1Period Initialized to
				;1000 = 20kHz value

	.text

	LDP #232 		;DP=232, Data Page for
				;Event Manager Addresses

	SPLK #T1COMPARE,T1CMPR;T1CMPR = 0

		; 2109876543210
	SPLK #0000001010101b,GPTCON

;GPTCON - GP Timer Control Register
; Bit 15 (0) T3STAT - GP Timer 3 Status. READ ONLY
; Bit 14 (0) T2STAT - GP Timer 2 Status. READ ONLY
; Bit 13 (0) T1STAT - GP Timer 1 Status. READ ONLY
; Bits 12-11 (00) T3TOADC - ADC start by event of GP Timer 3
; 	No event starts ADC
; Bits 10-9 (00) T2TOADC - ADC start by event of GP Timer 2
; 	No event starts ADC
; Bits 8-7 (00) T1TOADC - ADC start by event of GP Timer 1
; 	No event starts ADC
; Bit 6 (1) TCOMPOE - Compare output enable
; 	Enable all three GP timer compare outputs
; Bits 5-4 (01) T3PIN - Polarity of GP Timer 3 compare
; 	output
; 	Active Low
; Bits 3-2 (01) T2PIN - Polarity of GP Timer 2 compare
; 	output
; 	Active Low
; Bits 1-0 (01) T1PIN - Polarity of GP Timer 1 compare
; 	output
; 	Active Low

	SPLK #T1PERIOD,T1PR 	; T1PR = 1000
	SPLK #0000h,T1CNT 	; Initialize Timer 1
	SPLK #0000h,T2CNT 	; Initialize Timer 2
	SPLK #0000h,T3CNT 	; Initialize Timer 3

		; 5432109876543210
	SPLK #0001000000000110b,T1CON

;T1CON - GP Timer 1 Control Register
; Bits 15-14 (00) FREE,SOFT - Emulation Control Bits
; 	Stop immediately on emulation suspend
; Bits 13-11 (010) TMODE2-TMODE0 - Count Mode Selection
; 	Continuous-Up Count Mode
; Bits 10-8 (000) TPS2-TPS0 - Input Clock Prescaler
; 	Divide by 1
; Bit 7 (0) Reserved
; Bit 6 (0) TENABLE - Timer Enable
; 	Disable timer operations
; Bits 5-4 (00) TCLKS1,TCLKS0 - Clock Source Select
; 	Internal Clock Source
; Bits 3-2 (01) TCLD1,TCLD0 - Timer Compare Register
; 	Reload Condition
; 	When counter is 0 or equals period
; 	register value
; Bit 1 (1) TECMPR - Timer compare enable
; 	Enable timer compare operation
; Bit 0 (0) Reserved
	
; 		5432109876543210
	SPLK #0000000000000000b,T2CON ;Not used

;T2CON - GP Timer 2 Control Register
; Bits 15-14 (00) FREE,SOFT - Emulation Control Bits
; 	Stop immediately on emulation suspend
; Bits 13-11 (000) TMODE2-TMODE0 - Count Mode Selection
; 	Stop/Hold
; Bits 10-8 (000) TPS2-TPS0 - Input Clock Prescaler
; 	Divide by 1
; Bit 7 (0) TSWT1 - GP Timer 1 timer enable bit
; 	Use own TENABLE bit
; Bit 6 (0) TENABLE - Timer Enable
; 	Disable timer operations
; Bits 5-4 (00) TCLKS1,TCLKS0 - Clock Source Select
; 	Internal Clock Source
; Bits 3-2 (00) TCLD1,TCLD0 - Timer Compare Register
; 	Reload Condition When counter is 0
; Bit 1 (0) TECMPR - Timer compare enable
; 	Disable timer compare operation
; Bit 0 (0) SELT1PR - Period Register select
; 	Use own period register

; 		5432109876543210
	SPLK #0000000000000000b,T3CON ;Not Used

;T3CON - GP Timer 3 Control Register
; Bits 15-14 (00) FREE,SOFT - Emulation Control Bits
; 	Stop immediately on emulation suspend
; Bits 13-11 (000) TMODE2-TMODE0 - Count Mode Selection
; 	Stop/Hold
; Bits 10-8 (000) TPS2-TPS0 - Input Clock Prescaler
; 	Divide by 1
; Bit 7 (0) TSWT1 - GP Timer 1 timer enable bit
; 	Use own TENABLE bit
; Bit 6 (0) TENABLE - Timer Enable
; 	Disable timer operations
; Bits 5-4 (00) TCLKS1,TCLKS0 - Clock Source Select
; 	Internal Clock Source
; Bits 3-2 (00) TCLD1,TCLD0 - Timer Compare Register
; 	Reload Condition When counter is 0
; Bit 1 (0) TECMPR - Timer compare enable
; 	Disable timer compare operation
; Bit 0 (0) SELT1PR - Period Register select
; 	Use own period register

	SBIT1 T1CON,B6_MSK 	;Sets Bit 6 of T1CON

;T1CON - GP Timer 1 Control Register
; Bit 6 (1) TENABLE - Timer Enable
;	 Enable Timer Operations

	SPLK #0FFFFh,EVIFRA 	;Clear all pending interrupts
	SPLK #0080h,EVIMRA 	;Enable Timer 1 Period Interrupt

;-----------------------------------
; Generate Sine Wave Modulated PWM
;-----------------------------------

	.bss TABLE,1 		;Keeps address of the pointer in
				;the SINE Table
	.bss TOPTABLE,1 	;Keeps the reset value for the
				;pointer
	.bss COMPARET1,1 	;A register to do calculations
				;since the
				;T1CMPR register is double
				;buffered
	.bss FREQSTEP,1 	;Frequency modulation of the sine
				;wave
	.bss MODREG,1 		;Rolling Modulo Register

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品国产麻豆演员表| 国产日韩欧美综合一区| 久久人人爽人人爽| 一区二区三区中文字幕| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美高清在线精品一区| 亚洲精品伦理在线| 国产麻豆精品在线| 欧美性xxxxxx少妇| 中文字幕亚洲区| 国产高清久久久久| 欧美一区二区三区精品| 亚洲欧美色综合| 国产经典欧美精品| 欧美tickle裸体挠脚心vk| 亚洲午夜视频在线观看| 波多野结衣亚洲一区| 久久精品视频在线看| 久久国内精品自在自线400部| 欧美日韩国产首页| 亚洲国产一区在线观看| 91免费看片在线观看| 欧美国产精品劲爆| 国产a区久久久| 国产欧美日本一区视频| 精一区二区三区| 日韩欧美一区二区三区在线| 日韩精品亚洲一区| 在线91免费看| 美女久久久精品| 91精品久久久久久久91蜜桃| 亚洲第一二三四区| 欧美三级在线看| 亚洲va欧美va国产va天堂影院| 在线免费观看视频一区| 一区二区三区精品视频| 色噜噜夜夜夜综合网| 亚洲蜜臀av乱码久久精品| 91蝌蚪porny九色| 一区二区三区精品| 欧美巨大另类极品videosbest | 日韩国产一二三区| 欧美三级韩国三级日本三斤| 午夜a成v人精品| 日韩三级精品电影久久久| 美女视频一区二区| 国产亚洲欧美一级| 91麻豆免费观看| 亚洲成年人影院| 精品欧美久久久| 日本欧美久久久久免费播放网| 日韩欧美在线一区二区三区| 国产制服丝袜一区| 国产精品美女www爽爽爽| 91网上在线视频| 亚洲va在线va天堂| 欧美mv和日韩mv的网站| 国产成人av电影在线观看| 最新中文字幕一区二区三区| 欧美性受极品xxxx喷水| 久久精品国产999大香线蕉| 国产欧美一区二区在线| 99久久精品免费看| 亚洲成人免费视| 久久久久国产精品厨房| 色欧美乱欧美15图片| 美腿丝袜亚洲色图| 亚洲国产精品v| 7777精品伊人久久久大香线蕉经典版下载| 美国av一区二区| 亚洲欧美一区二区三区孕妇| 日韩一区二区免费高清| 成人午夜激情在线| 亚洲福利国产精品| 欧美国产一区二区在线观看| 欧美视频日韩视频| 国产91丝袜在线观看| 午夜视频在线观看一区| 国产精品素人一区二区| 91精品国产91综合久久蜜臀| 成人99免费视频| 奇米精品一区二区三区四区| 国产精品国产a| 精品久久久久香蕉网| 欧美综合久久久| 成人精品gif动图一区| 免费成人在线播放| 亚洲欧美激情插| 国产亚洲一区字幕| 91精品国产综合久久国产大片| 99免费精品在线观看| 国产原创一区二区三区| 亚洲成a人v欧美综合天堂| 亚洲手机成人高清视频| 国产亚洲欧美激情| 欧美一二三四在线| 欧美色爱综合网| 97se亚洲国产综合自在线观| 国产精品夜夜嗨| 国内精品久久久久影院色| 日本女优在线视频一区二区| 亚洲一区二区免费视频| 亚洲图片欧美激情| 欧美国产日本视频| 久久综合色8888| 欧美电影免费观看高清完整版| 欧美乱妇一区二区三区不卡视频| 欧洲一区在线电影| 91啦中文在线观看| av综合在线播放| 暴力调教一区二区三区| 国产盗摄一区二区| 国产成人在线电影| 国产黄色成人av| 国产成人精品亚洲777人妖| 国产精品1区2区3区| 国产成人综合在线观看| 国产精品亚洲专一区二区三区| 国产毛片一区二区| 国产精品一区二区久激情瑜伽 | 日本最新不卡在线| 亚洲国产一区在线观看| 天天操天天色综合| 日韩精品91亚洲二区在线观看| 奇米精品一区二区三区在线观看| 日韩激情视频网站| 免费成人av在线播放| 久久国产成人午夜av影院| 国产精品中文字幕日韩精品| 粉嫩aⅴ一区二区三区四区五区 | 亚洲欧美日韩在线| 亚洲综合免费观看高清在线观看| 亚洲午夜av在线| 美女国产一区二区三区| 国产高清亚洲一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 99久久99久久精品免费观看| 色久综合一二码| 欧美日韩国产在线观看| 欧美电视剧免费全集观看| 国产人久久人人人人爽| 亚洲精品精品亚洲| 免费成人美女在线观看| 国产不卡视频一区二区三区| 色婷婷精品大在线视频| 日韩一区二区在线看| 日本一区二区免费在线| 亚洲综合免费观看高清完整版 | 老司机午夜精品99久久| 丁香五精品蜜臀久久久久99网站| 99久久精品情趣| 日韩欧美中文一区| 亚洲欧洲一区二区在线播放| 日韩主播视频在线| 国产成人午夜99999| 91国模大尺度私拍在线视频| 日韩天堂在线观看| 亚洲欧美日韩在线| 久久99国产精品免费网站| 99这里只有精品| 91精品久久久久久久91蜜桃| 亚洲欧美在线另类| 日韩高清不卡一区| 91亚洲国产成人精品一区二区三| 91精品国产色综合久久不卡电影| 中文字幕在线不卡视频| 美女视频黄久久| 色94色欧美sute亚洲线路一ni | 午夜视频在线观看一区| 成人黄页毛片网站| 欧美成人a视频| 亚洲国产综合色| 成人h版在线观看| 欧美一级免费大片| 一区二区理论电影在线观看| 国产激情一区二区三区桃花岛亚洲 | 欧美mv日韩mv| 水蜜桃久久夜色精品一区的特点| 97精品国产露脸对白| 国产欧美日韩不卡免费| 经典一区二区三区| 欧美精品丝袜久久久中文字幕| 亚洲精品中文在线| 成人午夜在线免费| 樱桃视频在线观看一区| 国产日韩欧美不卡| 夜夜精品浪潮av一区二区三区| 国产成人自拍在线| 日韩一卡二卡三卡国产欧美| 亚洲线精品一区二区三区| 成人av网站免费观看| 国产亚洲精品久| 极品少妇一区二区| 日韩女同互慰一区二区| 美脚の诱脚舐め脚责91| 日韩欧美色综合| 久久99精品视频| 久久综合九色综合97_久久久| 蜜桃久久精品一区二区| 日韩视频一区二区在线观看|