CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

MPLAB ICD 2 in debug mode

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jameszum



Joined: 31 Jan 2012
Posts: 14

View user's profile Send private message

MPLAB ICD 2 in debug mode
PostPosted: Tue Jan 31, 2012 4:28 pm     Reply with quote

I am trying to use a MPLAB ICD 2 to debug code for a "24F16KA102" on a "16 bit XLP development board" I connect the MPLAB ICD 2 and launch the PCW program select debug it starts down loading then I get the Error Code 85DE0016.
Clicking diagnostics does nothing and the debugger reports that the "MPLAB ICD 2" is not ready.. There is only a green POWER light on the MPLAB ICD 2

Any help would be appreciated I am using PCWHD v4.129

Code:
#include <24F16KA102.h>
#Device ICD=2
#device ADC=10
//#fuses debug

#FUSEs NOBSS         //No boot segment
#FUSEs NOWRTB         // NO Boot Block write protect
#FUSES NOCKSFSM         // Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOBROWNOUT       // No brownout reset
#FUSES NOWDT         // No watch dog timer
#FUSES NOPROTECT      // code is not protected from reading
#FUSES NOBROWNOUT      // No brownout reset
#FUSES MCLR            // Master Clear pin enabled
#FUSES NOPUT         // No Power Up Timer
#FUSES NODSBOR         // BOR disabled in Deep Sleep
#FUSES NOWRT         // Program memory not write protected
#FUSES NOPROTECT      // Code not protected from reading
#FUSES NOCKSFSM         // Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NODSWDT         // Deep Sleep Watchdog Timer disabled
#FUSES NOIESO           // Internal External Switch Over mode disabled
#FUSES FRC            // Internal Fast RC Oscillator
#use delay(clock=8000000)

#include <new_test_004.h>
//#pragma use rs232(force_SW,invert, baud=115200, xmit=PIN_B0, rcv=PIN_B1, bits = 8, parity = N)
#use rs232(force_SW,invert, baud=115200, xmit=PIN_B0, rcv=PIN_B1, bits = 8, parity = N)
#define out15       PIN_B15 // the blinky bit

void main()
{   
   unsigned int16 value;
   setup_adc_ports(sAN12);
   setup_adc(ADC_CLOCK_internal);            // Built-in A/D setup function
   // TODO: USER CODE!!
   while(1)
   {
        value = 0;
         set_adc_channel(12);                 // Built-in A/D setup function
        delay_ms(100);
        value = read_adc(); // Built-in A/D read function
          printf( "this is a test1 %u \n\r",value);
          delay_ms(100);                      // Built-in delay function

     output_low(out15); // this works
          delay_ms(10);
      output_high(out15);
          delay_ms(10);     
    }

}
zagoaristides



Joined: 08 Jul 2007
Posts: 15
Location: Cordoba - Argentina

View user's profile Send private message Visit poster's website ICQ Number

Re: MPLAB ICD 2 in debug mode
PostPosted: Sun Nov 17, 2013 8:51 am     Reply with quote

jameszum wrote:
I am trying to use a MPLAB ICD 2 to debug code for a "24F16KA102" on a "16 bit XLP development board" I connect the MPLAB ICD 2 and launch the PCW program select debug it starts down loading then I get the Error Code 85DE0016.
Clicking diagnostics does nothing and the debugger reports that the "MPLAB ICD 2" is not ready.. There is only a green POWER light on the MPLAB ICD 2

Any help would be appreciated I am using PCWHD v4.129

Code:
#include <24F16KA102.h>
#Device ICD=2
#device ADC=10
//#fuses debug

#FUSEs NOBSS         //No boot segment
#FUSEs NOWRTB         // NO Boot Block write protect
#FUSES NOCKSFSM         // Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOBROWNOUT       // No brownout reset
#FUSES NOWDT         // No watch dog timer
#FUSES NOPROTECT      // code is not protected from reading
#FUSES NOBROWNOUT      // No brownout reset
#FUSES MCLR            // Master Clear pin enabled
#FUSES NOPUT         // No Power Up Timer
#FUSES NODSBOR         // BOR disabled in Deep Sleep
#FUSES NOWRT         // Program memory not write protected
#FUSES NOPROTECT      // Code not protected from reading
#FUSES NOCKSFSM         // Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NODSWDT         // Deep Sleep Watchdog Timer disabled
#FUSES NOIESO           // Internal External Switch Over mode disabled
#FUSES FRC            // Internal Fast RC Oscillator
#use delay(clock=8000000)

#include <new_test_004.h>
//#pragma use rs232(force_SW,invert, baud=115200, xmit=PIN_B0, rcv=PIN_B1, bits = 8, parity = N)
#use rs232(force_SW,invert, baud=115200, xmit=PIN_B0, rcv=PIN_B1, bits = 8, parity = N)
#define out15       PIN_B15 // the blinky bit

void main()
{   
   unsigned int16 value;
   setup_adc_ports(sAN12);
   setup_adc(ADC_CLOCK_internal);            // Built-in A/D setup function
   // TODO: USER CODE!!
   while(1)
   {
        value = 0;
         set_adc_channel(12);                 // Built-in A/D setup function
        delay_ms(100);
        value = read_adc(); // Built-in A/D read function
          printf( "this is a test1 %u \n\r",value);
          delay_ms(100);                      // Built-in delay function

     output_low(out15); // this works
          delay_ms(10);
      output_high(out15);
          delay_ms(10);     
    }

}


SAME ERROR!!! Any help?
Ttelmah



Joined: 11 Mar 2010
Posts: 19255

View user's profile Send private message

PostPosted: Sun Nov 17, 2013 11:35 am     Reply with quote

Your board uses the PGC/D3 pins not PGC/D2.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group