|
PIC24 Support Libraries
|
#include "pic24_clockfreq.h"Go to the source code of this file.
Functions | |
PIC24H configuration bits | |
| _FBS (BWRP_WRPROTECT_OFF) | |
| _FGS (GSS_OFF &GCP_OFF &GWRP_OFF) | |
| _FOSCSEL (FNOSC_FRC &IESO_OFF) | |
| _FOSC (FCKSM_CSECMD &IOL1WAY_OFF &OSCIOFNC_ON &POSCMD_SEL) | |
| _FWDT (FWDTEN_OFF &WINDIS_OFF &WDTPRE_PR128 &WDTPOST_PS512) | |
| _FPOR (FPWRT_PWR16 &ALTI2C_OFF) | |
| _FICD (JTAGEN_OFF &ICS_PGD1) | |
PIC24F configuration bits | |
| _CONFIG1 (JTAGEN_OFF &GCP_OFF &GWRP_OFF &BKBUG_OFF &COE_OFF &ICS_PGx1 &FWDTEN_OFF &WINDIS_OFF &FWPSA_PR128 &WDTPS_PS512) | |
| _CONFIG2 (IESO_OFF &FNOSC_FRC &FCKSM_CSECMD &OSCIOFNC_ON &IOL1WAY_OFF &POSCMD_SEL) | |
This file contains configuration bit settings. Important points on the syntax used:
p24HJ12GP201.h in C:\Program Files\Microchip\MPLAB C30\support\h, which contain macros (starting on line 2843) to ease setting configuration bits.GSS_OFF & GCP_OFF, NOT GSS_OFF | GCP_OFF.–> next to the setting.This file contains configuration settings for some of the PIC24 family of chips. To change or add support for a new chip, examine the include-file documentation and read the FRM documentation on config bits plus the chip-specific documentation on config bits.
Note on clock choice: The processor is configured to always start up with the FRC, rather than what it will use after clock configuration. This guarantees a working clock at power-up, which can then be changed by the bootloader / user code / etc.
Definition in file pic24_configbits.c.
| _CONFIG1 | ( | JTAGEN_OFF &GCP_OFF &GWRP_OFF &BKBUG_OFF &COE_OFF &ICS_PGx1 &FWDTEN_OFF &WINDIS_OFF &FWPSA_PR128 & | WDTPS_PS512) |
Register CONFIG1
| _CONFIG2 | ( | IESO_OFF &FNOSC_FRC &FCKSM_CSECMD &OSCIOFNC_ON &IOL1WAY_OFF & | POSCMD_SEL) |
Register CONFIG2
| _FBS | ( | BWRP_WRPROTECT_OFF | ) |
FBS: Boot Code Segment Configuration Register
| _FGS | ( | GSS_OFF &GCP_OFF & | GWRP_OFF) |
FGS: General Code Segment Configuration Register
| _FICD | ( | JTAGEN_OFF & | ICS_PGD1) |
FICD: the debugger configuration word.
| _FOSC | ( | FCKSM_CSECMD &IOL1WAY_OFF &OSCIOFNC_ON & | POSCMD_SEL) |
FOSC: Oscillator Configuration Register
| _FOSCSEL | ( | FNOSC_FRC & | IESO_OFF) |
FOSCSEL: Oscillator Source Selection Register
| _FPOR | ( | FPWRT_PWR16 & | ALTI2C_OFF) |
FPOR: POR Configuration Register
| _FWDT | ( | FWDTEN_OFF &WINDIS_OFF &WDTPRE_PR128 & | WDTPOST_PS512) |
FWDT: Watchdog Timer Configuration Register
1.8.4