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 CCS Technical Support

Programming with ICD2

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



Joined: 02 Dec 2003
Posts: 3

View user's profile Send private message

Programming with ICD2
PostPosted: Thu Feb 26, 2004 7:06 pm     Reply with quote

HI All
I am trying to use ICD2 as a programmer (and not a debugger) with PIC16F877. I have chosen the programmer option in MPLab IDE v6.40 and it seems like I can connect and program just fine. However, when I turn on the programmed device, the program doesn't seem to be running at all. Any idea what I am doing wrong? I should mention that everything was working fine when I was debugging with ICD2.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 26, 2004 7:27 pm     Reply with quote

Things you need to do:

1. Go the the Project / Build Options menu, and make sure
that the box for "Compile for use with ICD debugger"
is un-checked. In the Build Options menu, there may
two dialogs available - one for "Project" and the other
for your main file. Each one of these will have a "Compile
for use with ICD debugger". The dialog for "Project"
will not be immediately visible when you click on it.
You first have to click on the "CCS compiler tab" at
the top of the dialog. I really don't know why they
have this setting in two places. I just know that
whenever I make a standalone program, I un-check
both those boxes, just to be absolutely sure. Maybe
at some future date, I'll learn why they have it in
two places.

2. Re-compile the program AFTER you do item #1 above.

3. Go to the Programmer menu and click on Connect.
Then click on Program. It should give a lot of progress
reports in the output window. There should be no text
in Red, which would indicate an error.

4. Turn off the power to your board.

5. Unplug the ICD2 connector from your board.

6. Turn on the power to your board. It should work.
SteveS



Joined: 27 Oct 2003
Posts: 126

View user's profile Send private message

PostPosted: Fri Feb 27, 2004 8:21 am     Reply with quote

To add a bit:

If you keep the ICD2 plugged into the target, you need to set up the debugger (Debugger - Select Tool - MPLAB ICD 2) to be able to run the target (RUN button) - even if you aren't going to be debugging.

If the ICD2 is unplugged, then, as stated by PCM Programmer, it should run on power up. Be sure reset (VPP) is going high - The ICD2 takes care of that when it's plugged in, so maybe you have a circuit error.

In general, if I have a dead board I look at:

- do I have power and at the right voltage (it does happen!)
- is the chip hot?! (plugged in backwards, circuit error)
- is the oscillator running?
- is reset correct?
- can it do some simple thing? (toggling an I/O line, etc)

Good luck,

SteveS
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