Jump to content
dpat123

Pic18f2420 With Icd2 As Debug

Recommended Posts

i have compiled simple program for testing icd2 debug. i it compiling but not able to enter debug mode

 

for PIC18F2420

 

error : ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information.

 

Could you please let me know what could be possible problem

 

#pragma DATA _CONFIG4L, _LVP_OFF_4L & _DEBUG_ON_4L Debug bits are on .

 

 

 

#include <system.h>
#include <icd2.h>


//PIC18F2420   configuration bits 

 #pragma DATA	_CONFIG1H, _OSC_HS_1H
 #pragma DATA	_CONFIG2L, _PWRT_OFF_2L
 #pragma DATA	_CONFIG2H, _WDT_OFF_2H 
 #pragma DATA	_CONFIG4L, _LVP_OFF_4L & _DEBUG_ON_4L 
 #pragma DATA	_CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L   // for code protection  off 
 #pragma DATA	_CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L 
 #pragma DATA	_CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
 #pragma DATA	_CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L 
 #pragma DATA	_CONFIG7H, _EBTRB_OFF_7H




main()
{

trisb=0;

portb=1;
}

Share this post


Link to post
Share on other sites

When setting up the config bits, specify every bit either on or off and don't rely on any erased defaults after the compiler has finished playing with them. The compiler may set any unspicified bits to a '1' which may be the opposite to what you expected it to be.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites
When setting up the config bits, specify every bit either on or off and don't rely on any erased defaults after the compiler has finished playing with them. The compiler may set any unspicified bits to a '1' which may be the opposite to what you expected it to be.

 

Cheers

 

Reynard

 

 

thanks it is working now

Share this post


Link to post
Share on other sites
i have compiled simple program for testing icd2 debug. i it compiling but not able to enter debug mode

 

for PIC18F2420

 

error : ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information.

 

Could you please let me know what could be possible problem

 

#pragma DATA _CONFIG4L, _LVP_OFF_4L & _DEBUG_ON_4L Debug bits are on .

 

Don't turn the debug option on. The debug option is used with specialized chips that have additional debug pins. For normal production chips keep the debug option off.

 

Mike.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...