參數(shù)資料
型號(hào): DSPIC30F2010
英文描述: dsPIC?Language Tools Getting Started
中文描述: dsPIC數(shù)字信號(hào)?語(yǔ)言工具入門
文件頁(yè)數(shù): 46/56頁(yè)
文件大?。?/td> 2612K
代理商: DSPIC30F2010
dsPIC Language Tools Getting Started
DS70094B-page 42
2003 Microchip Technology Inc.
EXAMPLE 4-1:
C SOURCE FILE
/**********************************************************************
* Filename: example3.c *
* Date: 04/16/2003 *
* File Version: 1.00 *
* Tools used: MPLAB -> 6.30 *
* Compiler -> 1.10 *
* Assembler -> 1.10 *
* Linker -> 1.10 *
* Linker File: p30f6014.gld *
***********************************************************************/
#include "p30f6014.h"
#include <stdio.h>
/* Length of output buffer (in words) */
#define PRODLEN 20
/* source arrays of 16-bit elements */
unsigned int array1[PRODLEN/2] __attribute__((__section__(".xbss"), aligned(32)));
unsigned int array2[PRODLEN/2] __attribute__((__section__(".ybss"), aligned(32)));
/* output array of 32-bit products defined here */
long array3[PRODLEN/2]; /* array3 is NOT a circular buffer */
/* Pointer for traversing array */
unsigned int array_index;
/* 'Point-by-point array multiplication' assembly function prototype */
extern void modulo( unsigned int *, unsigned int *, unsigned int *, unsigned int );
int main ( void )
{
/* Set up Modulo addressing for X AGU using W8 and for Y AGU using W10 */
/* Actual Modulo Mode will be turned on in the assembly language routine */
CORCON |= 0x0001; /* Enable integer arithmetic */
XMODSRT = (unsigned int)array1;
XMODEND = (unsigned int)array1 + PRODLEN - 1;
YMODSRT = (unsigned int)array2;
YMODEND = (unsigned int)array2 + PRODLEN - 1;
/* Initialize 10-element arrays, array1 and array2 */
/* to values 1, 2, ...., 10 */
while (1) /* just do this over and over */
{
for (array_index = 0; array_index < PRODLEN/2; array_index++)
{
array1[array_index] = array1[array_index] + array_index + 1;
array2[array_index] = array2[array_index] + (array_index+1) * 3;
}
/* Call assembly subroutine to do point-by-point multiply */
/* of array1 and array2, with 4 parameters: */
/* start addresses of array1, array2 and array3, and PRODLEN-1 */
/* in that order */
modulo( array1, array2, array3, PRODLEN-1 );
}
}
相關(guān)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
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
DSPIC30F2010 DEVELOPMENT BOARD KIT 功能描述:BOARD DEV FOR DSPIC30F2010 RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 通用嵌入式開發(fā)板和套件(MCU、DSP、FPGA、CPLD等) 系列:- 標(biāo)準(zhǔn)包裝:1 系列:PICDEM™ 類型:MCU 適用于相關(guān)產(chǎn)品:PIC10F206,PIC16F690,PIC16F819 所含物品:板,線纜,元件,CD,PICkit 編程器 產(chǎn)品目錄頁(yè)面:659 (CN2011-ZH PDF)
DSPIC30F2010 DEVELOPMENT KIT 功能描述:KIT DEV EMBEDDED C RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 通用嵌入式開發(fā)板和套件(MCU、DSP、FPGA、CPLD等) 系列:- 標(biāo)準(zhǔn)包裝:1 系列:PICDEM™ 類型:MCU 適用于相關(guān)產(chǎn)品:PIC10F206,PIC16F690,PIC16F819 所含物品:板,線纜,元件,CD,PICkit 編程器 產(chǎn)品目錄頁(yè)面: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ù)字信號(hào)處理器和控制器 - DSP, DSC 16B MCU DSP 28LD 30MIPS 12KB FLASH RoHS:否 制造商:Microchip Technology 核心:dsPIC 數(shù)據(jù)總線寬度:16 bit 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:2 KB 最大時(shí)鐘頻率:40 MHz 可編程輸入/輸出端數(shù)量:35 定時(shí)器數(shù)量:3 設(shè)備每秒兆指令數(shù):50 MIPs 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 封裝 / 箱體:TQFP-44 安裝風(fēng)格:SMD/SMT