The target device is not ready for debugging. Please check your configuration bits

Discussion in 'Embedded Systems and Microcontrollers' started by Guinness1759, Jan 17, 2011.

  1. Guinness1759

    Thread Starter Member

    Dec 10, 2010
    64
    0
    #include <pic.h> //HI-TECH C header file

    __CONFIG(WDTE_OFF & CPD_OFF & FOSC_ECM & LVP_OFF);
    /* Watch Dog Off, Code Protection Off, */


    //********************** CONSTANTS, VARIABLES ********************************
    #define _XTAL_FREQ 400000 /*Define the Chrystal frequency for the
    //Hi-TECH C __delay_ms() function in Hz used in the pause function below */


    //********************** MAIN FUNCTION **************************************
    int main()
    {

    // My code, it's blinking an LED
    }

    I've also tried setting the FOSC_XT instead, but that does not work. I have a 2 MHz crystal oscillator (ECS-20-20-1X) set between pins OSC1 and OSC2. I'm using a PIC16F1827.
     
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,019
    Assuming you want to debug:

    You need to first compile with debug, then program using the Debug menu.

    And this should be in the embedded forum.
     
    Guinness1759 likes this.
  3. Guinness1759

    Thread Starter Member

    Dec 10, 2010
    64
    0
    Thanks, now I'm getting past that error. I didn't realize that I had to program it in debug mode.
     
Loading...