View Single Post
  #1   Spotlight this post!  
Unread 09-03-2005, 11:37
Justyn Justyn is offline
Registered User
#0759
 
Join Date: Jan 2005
Location: UK
Posts: 5
Justyn is an unknown quantity at this point
MPLAB C18 problem

Hi there,

This isn't related to the robot build but I need some help so if anyone's got some PIC18 series experience and is feeling generous...

I have a particularly annoying problem with a combination of the ICD2 (connected by USB), MPLAB 7.01 and the latest version of C18 running on XP Home. I'm writing a very simple program for the PIC18F2620. In even the simplest C, stepping through the code works ok, but running it almost always results in a reset either immediately or after a few instructions. This "reset" doesn't seem to affect MCLR, just takes the execution back to the first instruction. I'm not sure how the ICD2 is supposed to deal with MCLR, however. I've tried it in both internal and crystal oscillator configurations with no difference.

Can anyone tell me why this is happening? I'm in a huge rush to get a project done and I don't want to be forced to write it in assembler simply because MPLAB won't let me debug it properly with the ICD2. I've never had this problem with earlier versions of MPLAB when using C18. Worse, it doesn't seem to be a simple matter of installing the earlier version of MPLAB again because when uninstalling 7.01 a lot of the new drivers for the ICD2 are left behind.

I also ought to point out that the test code runs fine when just straight programming the device - but I need to be able to set break-points etc.

Hope someone can help. If not, have a nice day and get back to some proper robotics ;-)

Cheers,
Justyn