參數(shù)資料
型號: DSPIC30F2010
英文描述: dsPIC?Language Tools Getting Started
中文描述: dsPIC數(shù)字信號?語言工具入門
文件頁數(shù): 47/56頁
文件大?。?/td> 2612K
代理商: DSPIC30F2010
Tutorial 3 - Mixed C and Assembly Files
2003 Microchip Technology Inc.
DS70094B-page 43
EXAMPLE 4-2:
MODULO.S ASM SOURCE FILE
/**********************************************************************
* Filename: modulo.s *
* Date: 04/27/2003 *
* File Version: 1.00 *
* *
* Tools used: MPLAB -> 6.30 *
* Compiler -> 1.10 *
* Assembler -> 1.10 *
* Linker -> 1.10 *
* *
* Linker File: p30f6014.gld *
* Description: Assembly routine used in example3.C *
**********************************************************************/
.text
.global _modulo
_modulo:
; If any of the registers W8 - W15 are used, they should be saved
; W0 - W7 may be used without saving
PUSH W8
PUSH W10
; turn on modulo addressing
MOV #0xC0A8, W8
MOV W8, MODCON
; The 3 pointers were passed in W0, W1 and W2 when function was called
; Transfer pointers to appropriate registers for MPY
MOV W0, W8 ; Initializing X pointer
MOV W1, W10 ; Initializing Y pointer
; Clear Accumulator and prefetch 1st pair of numbers
CLR A, [W8]+=2, W4, [W10]+=2, W7
LSR W3, W3
RCALL array_loop ; do multiply set
INC2 W8, W8 ; Change alignment of X pointer
RCALL array_loop ; second multiply set
POP W10
POP W8
RETURN
; Return to main C program
array_loop:
; Set up DO loop with count 'PRODLEN - 1' (passed in W3)
DO W3, here
; Do a point-by-point multiply
MPY W4*W7, A, [W8]+=2, W4, [W10]+=2, W7
; Store result in a 32-bit array pointed by W2
MOV ACCAL, W5
MOV W5, [W2++]
MOV ACCAH, W5
here: MOV W5, [W2++]
; turn off modulo addressing
CLR MODCON
RETURN
.end
相關PDF資料
PDF描述
DSR180-12-14 Single output 30W~180W
DSR180-48-24 Single output 30W~180W
DSR30-12-24 Single output 30W~180W
DSR30-12-48 Single output 30W~180W
DSR30-15-24 Single output 30W~180W
相關代理商/技術參數(shù)
參數(shù)描述
DSPIC30F2010 DEVELOPMENT BOARD KIT 功能描述:BOARD DEV FOR DSPIC30F2010 RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 通用嵌入式開發(fā)板和套件(MCU、DSP、FPGA、CPLD等) 系列:- 標準包裝:1 系列:PICDEM™ 類型:MCU 適用于相關產品:PIC10F206,PIC16F690,PIC16F819 所含物品:板,線纜,元件,CD,PICkit 編程器 產品目錄頁面:659 (CN2011-ZH PDF)
DSPIC30F2010 DEVELOPMENT KIT 功能描述:KIT DEV EMBEDDED C RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 通用嵌入式開發(fā)板和套件(MCU、DSP、FPGA、CPLD等) 系列:- 標準包裝:1 系列:PICDEM™ 類型:MCU 適用于相關產品:PIC10F206,PIC16F690,PIC16F819 所含物品:板,線纜,元件,CD,PICkit 編程器 產品目錄頁面:659 (CN2011-ZH PDF)
DSPIC30F2010_08 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:High-Performance, 16-bit Digital Signal Controllers
DSPIC30F2010_11 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:16-bit Digital Signal Controllers
dsPIC30F2010-20E/MM 功能描述:數(shù)字信號處理器和控制器 - DSP, DSC 16B MCU DSP 28LD 30MIPS 12KB FLASH RoHS:否 制造商:Microchip Technology 核心:dsPIC 數(shù)據(jù)總線寬度:16 bit 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:2 KB 最大時鐘頻率:40 MHz 可編程輸入/輸出端數(shù)量:35 定時器數(shù)量:3 設備每秒兆指令數(shù):50 MIPs 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 封裝 / 箱體:TQFP-44 安裝風格:SMD/SMT