PIC 18F24K20 MPLAB X läuft nur im Debug Modus

Gast #3151526
Lesenswert?

Hallo,

sitze hier schon eine ganze Weile vor einem Problem und ich hoffe Ihr 
könnt mir helfen.

wenn ich den 18F24K20 programmiere tut sich gar nichts, hab schon alle 
möglichen und unmöglichen Konfigurationen versucht.

Allerdings: im Debug modus - kein Problem, die LED blinkt - das gleiche 
auch in der alten IDE MPLAB 8.56 - funzt nur im Debug Mode

Ich bin mit meinem Latein am Ende - denn google hilft mir auch nicht 
sehr weiter.

hier der Sourcecode:

#include <stdio.h>
#include <stdlib.h>
#include <p18F24K20.h>
#include <delays.h>

#pragma config FOSC = INTIO67   // Oscillator Selection bits (Internal 
oscillator block, port function on RA6 and RA7)
#pragma config PWRT = ON        // Power-up Timer Enable bit (PWRT 
enabled)
#pragma config WDTEN = OFF      // Watchdog Timer Enable bit (WDT is 
controlled by SWDTEN bit of the WDTCON register)
#pragma config LVP = OFF        // Single-Supply ICSP Enable bit 
(Single-Supply ICSP disabled)

void main(void) {
  OSCCON = 0x77;  //intern 16Mhz
  ANSELH=0x00;    //RB als digital Port
  TRISB=0x00;
  while(1){
    LATB=0xFF;
    Delay10KTCYx(100);
    LATB=0x00;
    Delay10KTCYx(100);
  }
}

Vielen Dank

Klaus

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren