CE212_SLEEP_Wakeup_14aug09

所属分类:单片机开发
开发工具:C/C++
文件大小:13KB
下载次数:49
上传日期:2011-11-08 16:03:46
上 传 者yaotiger
说明:  PIC单片机休眠以及唤醒功能C代码驱动,经测试可以使。
(PIC microcontroller C code sleep and wake-up drive, the test can make.)

文件列表:
CE212_SLEEP_Wakeup\Fast_Wake_Up_Fro_SLEEP_Mode.mcp (1173, 2009-08-13)
CE212_SLEEP_Wakeup\Fast_Wake_Up_Fro_SLEEP_Mode.mcw (35840, 2009-08-13)
CE212_SLEEP_Wakeup\h (0, 2009-08-14)
CE212_SLEEP_Wakeup\h\clkSwitch.h (1982, 2007-08-02)
CE212_SLEEP_Wakeup\src (0, 2009-08-14)
CE212_SLEEP_Wakeup\src\fast_wake_up_from_SLEEP_mode.c (6705, 2007-09-12)
CE212_SLEEP_Wakeup\src\traps.c (5708, 2007-09-11)
CE212_SLEEP_Wakeup (0, 2009-08-14)

Readme File for Code Example: CE212 - Fast wake-up from SLEEP mode ------------------------------------ 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: ---------------------------- Microchip's 16-bit dsPIC Digital Signal Controllers are capable of resuming regular operation after waking up from a low-power mode, for example, SLEEP mode, within 10 microseconds. Additionally, within 30 microseconds of waking up from SLEEP mode, the device can operate at its highest speed of operation.To wake up from SLEEP in 10 microseconds or less, the device should be made to operate off the Fast RC (FRC) Oscillator prior to entering SLEEP mode. To wake up from SLEEP and operate at maximum speed in 30 microseconds or lesser, the device should be made to operate off the Fast RC (FRC) Oscillator with the PLL enabled, prior to entering SLEEP mode. This is possible because the PLL locks in 20 microseconds and the FRC oscillator, unlike a crystal oscillator has no start-up time. The POR circuit in the device inserts a small delay of 10 microseconds to ensure all bias circuits have stabilized on a power-up event. The attached code example demonstrates this capability using external interrupt pin, INT1. Using this example, the user can measure the time elapsed between a falling edge on the INT1 pin and a rising edge on any pin on Port D. The time measured will be the time to wake up from SLEEP using an FRC oscillator plus the time taken by the PLL to lock plus the 5*Tcy consistent interrupt service routine entry time.The attached code example will configure the PLLFBD register which provides a factor ‘M’, by which the input to the VCO is multiplied. For devices that do not feature the FRCxPLL option, the FOSC configuration register will be set up to use the FRC oscillator on power-up. The benefit offered by PIC24H devices to low-power applications is not only a low-power SLEEP mode option but also the option to wake-up from SLEEP in a short amount of time and execute code at the highest speed possible. 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 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 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 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. 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

近期下载者

相关文件


收藏者