Blame | Last modification | View Log | Download | RSS feed
/* ------------------------------------------------------------ *//* PIC32 Configuration Settings *//* ------------------------------------------------------------ *//* Oscillator Settings */#pragma config FNOSC = PRIPLL // Oscillator Selection Bits#pragma config POSCMOD = EC // Primary Oscillator Configuration#pragma config FPLLIDIV = DIV_2 // PLL Input Divider#pragma config FPLLMUL = MUL_20 // PLL Multiplier#pragma config FPLLODIV = DIV_1 // PLL Output Divider#pragma config FPBDIV = DIV_8 // Peripheral Clock Divisor (timers/UART/SPI/I2C)#pragma config FSOSCEN = OFF // Secondary Oscillator Enable/* Clock Control Settings */#pragma config IESO = OFF // Internal/External Clock Switch Over#pragma config FCKSM = CSDCMD // Clock Switching and Monitor Selection#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin/* USB Settings */#pragma config UPLLEN = ON // USB PLL Enable#pragma config UPLLIDIV = DIV_2 // USB PLL Input Divider#pragma config FVBUSONIO = OFF // USB VBUS ON Selection#pragma config FUSBIDIO = OFF // USB USID Selection/* Other Peripheral Device Settings */#pragma config FWDTEN = OFF // Watchdog Timer Enable#pragma config WDTPS = PS1024 // Watchdog Timer Postscaler#pragma config FSRSSEL = PRIORITY_7 // SRS Interrupt Priority#pragma config FCANIO = OFF // CAN I/O Pin Select (default/alternate)#pragma config FETHIO = ON // Ethernet I/O Pin Select (default/alternate)#pragma config FMIIEN = OFF // Ethernet MII/RMII select (OFF=RMII)/* Code Protection Settings */#pragma config CP = OFF // Code Protect#pragma config BWP = OFF // Boot Flash Write Protect#pragma config PWP = OFF // Program Flash Write Protect/* Debug Settings */#pragma config ICESEL = ICS_PGx1 // ICE/ICD Comm Channel Select (on-board debugger)/* ------------------------------------------------------------ */#include <xc.h>#include <plib.h>#include "defines.h"int main() {/* Configure the target for maximum performance at 80 MHz. */SYSTEMConfigPerformance(80000000UL);INTConfigureSystem(INT_SYSTEM_CONFIG_MULT_VECTOR);LED1_TRIS = 0;LED2_TRIS = 0;LED3_TRIS = 0;LED4_TRIS = 0;LED1_PORT = 1;LED2_PORT = 1;LED3_PORT = 1;LED4_PORT = 1;while(1) {}}