Gast
#4865000
Hey Leute, Ich habe ein Problem mit meiner Software. Ich glaube auf jeden Fall das die Verbindung zum PIC32EMZ1024EFK064 passt, da ich eine Verbindung über den ICD3 habe. Ich habe noch nie PIC programmiert und würde gerne die LED auf der Abbildung zum Leuten bringen. Ich programmiere mit MPLAB v3.50. Mein derzeitige Source Code mit Configutation Bits lautet: <c> //#define _32MZ1024EFK064_ #include <stdio.h> #include <stdlib.h> #include <xc.h> // DEVCP0 #pragma config CP = OFF // Code Protect /*** DEVCFG0 ***/ // The below configuration bits are generated by harmony // Below confugurations should provide a system clock frequency of 80MHz #pragma config DEBUG = ON //FF // Background Debugger #pragma config JTAGEN = OFF //ON // JTAG Port #pragma config ICESEL = ICS_PGx1 // ICE/ICD Communication Channel #pragma config TRCEN = OFF //ON // Trace feature in CPU #pragma config BOOTISA = MIPS32 // MIPS32 or MICROMIPS #pragma config FECCCON = OFF_UNLOCKED // Dynamic Flash ECC #pragma config FSLEEP = OFF // Flash Sleep Mode #pragma config DBGPER = PG_ALL // Allow CPU access to all permission regions #pragma config EJTAGBEN = NORMAL // Normal EJTAG functionality /*** DEVCFG1 ***/ #pragma config FNOSC = POSC//SPLL // Oscillator Selection Bits #pragma config DMTINTV = WIN_127_128 // DMT Count Window Interval (Window/Interval value is 127/128 counter value) #pragma config FSOSCEN = OFF //ON // Secondary Oscillator Enable (Disable SOSC) #pragma config IESO = OFF //ON // Internal/External Switch Over (Disabled) #pragma config POSCMOD = HS//EC //OFF // Primary Oscillator Configuration (Primary osc disabled) #pragma config OSCIOFNC = OFF //ON // CLKO Output Signal Active on the OSCO Pin (Enabled) #pragma config FCKSM = CSECME //CSDCMD //// Clock Switching and Monitor Selection (Clock Switch Disabled, FSCM Disabled) #pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler #pragma config WDTSPGM = STOP // Watchdog Timer Stop During Flash Programming #pragma config WINDIS = NORMAL // Watchdog Timer Window Mode (Watchdog Timer is in non-Window mode) #pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Disabled) #pragma config FWDTWINSZ = WINSZ_25 // Watchdog Timer Window Size (Window size is 25%) #pragma config DMTCNT = DMT31 #pragma config FDMTEN = OFF // Deadman Timer Enable (Deadman Timer is disabled) /*** DEVCFG2 ***/ #pragma config FPLLIDIV = DIV_4 //DIV_1 // System PLL Input Divider (1x Divider) #pragma config FPLLRNG = RANGE_13_26_MHZ // System PLL Input Range (5-10 MHz Input) //#pragma config FPLLICLK = PLL_POSC //PLL_FRC // System PLL Input Clock Selection (POSC is input to the System PLL) //#pragma config FPLLMULT = MUL_50 //MUL_80 // System PLL Multiplier (PLL Multiply by 50) //#pragma config FPLLODIV = DIV_2 //DIV_8 //#pragma config UPLLFSEL = FREQ_24MHZ // USB PLL Input Frequency Selection //#pragma config UPLLEN = ON // USB PLL Enable /*** DEVCFG3 ***/ #pragma config USERID = 0x1234u #pragma config FMIIEN = OFF // Ethernet RMII/MII Enable (MII Enabled) #pragma config FETHIO = OFF // Ethernet I/O Pin Select (Default Ethernet I/O) #pragma config PGL1WAY = ON // Permission Group Lock One Way Configuration (Allow only one reconfiguration) #pragma config PMDL1WAY = ON // Peripheral Module Disable Configuration (Allow only one reconfiguration) #pragma config IOL1WAY = ON // Peripheral Pin Select Configuration (Allow only one reconfiguration) #pragma config FUSBIDIO = ON // USB USBID Selection (Controlled by Port Function) /*** BF1SEQ0 ***/ #pragma config TSEQ = 0xffff #pragma config CSEQ = 0xffff #define FOSC 19200000L #define SYSFREQ 19200000L #define PBCLK2 (SYSFREQ/4) /* * */ int main(int argc, char** argv) { TRISBbits.TRISB8 = 0; LATBbits.LATB8 = 1; /* writing 1 to this PINB0 */ //GerneralDelay(0xFFFFF); while(1){ } return (EXIT_SUCCESS); } </c> Danke Leute für eure Hilfe. LG David

