CE201_ADC_1MSPS

所属分类:单片机开发
开发工具:Asm
文件大小:126KB
下载次数:47
上传日期:2007-08-17 16:22:31
上 传 者joncy
说明:  PIC24单片机程序示例。 目前这方面的资料较少。自己先顶一下。
(PIC24 Singlechip sample procedures. At present, less information in this regard. Their first top-click.)

文件列表:
CE201_ADC_1MSPS (0, 2006-11-28)
CE201_ADC_1MSPS\ADC_1MSPS.mcp (1001, 2006-05-15)
CE201_ADC_1MSPS\ADC_1MSPS.mcw (30720, 2006-11-28)
CE201_ADC_1MSPS\h (0, 2006-11-28)
CE201_ADC_1MSPS\hex (0, 2006-11-28)
CE201_ADC_1MSPS\hex\ADC_1MSPS.cof (801461, 2006-11-28)
CE201_ADC_1MSPS\hex\ADC_1MSPS.hex (5936, 2006-11-28)
CE201_ADC_1MSPS\hex\ADC_1MSPS.map (125412, 2006-11-28)
CE201_ADC_1MSPS\hex\RIStreaming.bin (0, 2006-11-06)
CE201_ADC_1MSPS\h\adcDrv2.h (1958, 2006-05-15)
CE201_ADC_1MSPS\h\tglPin.h (1819, 2006-05-15)
CE201_ADC_1MSPS\src (0, 2006-11-28)
CE201_ADC_1MSPS\src\adcDrv2.c (5348, 2006-10-12)
CE201_ADC_1MSPS\src\main.c (3477, 2006-10-12)
CE201_ADC_1MSPS\src\obj (0, 2006-11-28)
CE201_ADC_1MSPS\src\tglPin.s (1992, 2006-11-28)
CE201_ADC_1MSPS\src\traps.c (4761, 2006-05-15)

Readme File for Code Example: CE201 - ADC Sampling at 1.1MSPS ---------------------------------------- This file contains the following sections: 1. Code Example Description 2. Folder Contents 3. Suggested Development Resources 4. Reconfiguring the project for a different PIC24H device 5. Revision History 1. Code Example Description: ---------------------------- In this example, ADC is set up to convert AIN0 using CH0 and CH1 sample/hold in 10-bit sequencial mode at 1.1MHz throughput rate. ADC clock is configured at 13.3Mhz or Tad=75ns ADC Conversion Time for 10-bit conversion is Tc=12*Tab = 900ns (1.1MHz). void initAdc1(void); ADC CH0 and CH1 S/H is set-up to covert AIN0 in 10-bit mode. ADC is configured to next sample data immediately after the conversion. So, ADC keeps convertion data throgh CH0/CH1 S/H alternatively. Effective conversion rate is 1.1Mhz void initDma0(void); DMA channel 0 is confiured in ping-pong mode to move the converted data from ADC to DMA RAM on every sample/convert sequence. It generates interrupt after every 16 sample transfer. void __attribute__((__interrupt__)) _DMA0Interrupt(void); DMA interrupt service routine, moves the data from DMA buffer to ADC signal buffer and collects 256 samples. 2. Folder Contents: ------------------- This folder contains the following sub-folders: a. C:\Program Files\Microchip\MPLAB C30\support\gld This folder will have the device GLD file, it is used for building the project. This file was provided with the MPLAB C30 v2.02 toolsuite. b. C:\Program Files\Microchip\MPLAB C30\support\h This folder contains C header files useful in building this project. Device register and bit definitions are provided in the *.h file that follows the device name. These files were provided with the MPLAB C30 v2.02 toolsuite. c. C:\Program Files\Microchip\MPLAB C30\lib This folder contains library archive files, which are a collection of precompiled object files. The file named "libpic30-coff.a" contains the C run-time start-up library. These file were provided with the MPLAB C30 v2.02 toolsuite. d. hex This folder contains three file types - coff, hex and map. These are files generated by the MPLAB C30 toolsuite on build operation performed within MPLAB IDE. The *.map file contains details on memory allocation for various variables, constants and dsPIC instructions specified in the source and library code. The *.hex file contains a binary file that may be programmed into the dsPIC device. The *.coff file contains a binary file that is used by MPLAB IDE for simulation. e. h This folder contains include files for the code example. f. src This folder contains all the C and Assembler source files (*.c, *.s) used in demonstrating the described example. This folder also contains a sub-folder named "obj" that stores compiled object files generated when the project is built. 3. Suggested Development Resources: ----------------------------------- a. MPLAB IDE v7.31.01 or later b. MPLAB C30 v2.02 or later c. MPLAB ICD 2 R23 or later e. Explorer 16 Demo board with PIC24HJ256GP610 controller 4. Reconfiguring the project for a different PIC24H device: ------------------------------------------------------------- The Project/Workspace can be easily reconfigured for any PIC24H device. Please use the following general guidelines: a. Change device selection within MPLAB IDE to a PIC24H device of your choice by using the following menu option: MPLAB IDE>>Configure>>Select Device b. Provide the correct device linker script and header file for your device. Device linker scripts and header files are available in your MPLAB C30 installation folder under: Device Linker Script- YourDrive:>Program Files\Microchip\MPLAB C30\support\gld Device C Header file- YourDrive:>Program Files\Microchip\MPLAB C30\support\h Device ASM Include file- YourDrive:>Program Files\Microchip\MPLAB C30\support\inc c. Provide the appropriate path to your MPLAB C30 support file locations using the menu option: MPLAB IDE>>Project>>Build Options>>Project d. Chose the development board applicable to your device. Some options are provided below: e. Re-build the MPLAB project using the menu option: MPLAB IDE>>Project>>Build All f. Download the hex file into the device and run. 5. Revision History : --------------------- 04/01/2006 - Initial Release of the Code Example

近期下载者

相关文件


收藏者