View previous topic :: View next topic |
Author |
Message |
garyzheng
Joined: 22 Jul 2004 Posts: 25
|
Why Program can work under ICD2 programmer mode? |
Posted: Tue Jan 04, 2005 11:08 am |
|
|
I am debugging the program for wireless chip(CC1000) +PIC16F876. Everything go right under the ICD2's debugger mode. BUt when I use ICD2 as the programmer and wanna burn the hex file into PIC16F876, it can not work alone. It should need the cable connection with ICD2 and use the "Release From Reset" command on the programmer list. Someone could explain that to me? Thank u |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jan 04, 2005 1:37 pm |
|
|
Quote: | BUt when I use ICD2 as the programmer and wanna burn the hex
file into PIC16F876, it can not work alone |
1. If your program has this next line, then comment it out:
#device ICD=TRUE
2. Go into the Project/Build Options menu in MPLAB and "un-check"
the box that says "Compile for use with ICD Debugger".
(This setting is in the "CCS compiler" tab of the Build Options).
3. Go to the Project menu and select "Build All".
This will compile your program.
4. Then go to the Programmer menu in MPLAB and pick the
"Select Programmer" item. Select "MPLAB ICD2".
5. Make sure the ICD2 connector is plugged into your board.
Also make sure the power is turned on for your board.
Then go to the Programmer menu and select "Connect".
You should now see several lines of messages in the
output window of MPLAB. The last five lines should be
something like this: (Note: my board has a 18F458
but you have a 16F876, so you will get a message for the
16F876 instead).
Target Device PIC18F458 found, revision = 0x4
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
6. Now go to the Programmer menu and select "Erase Part".
This may not be strictly necessary, but just do it anyway
the first time, to be extra safe.
7. Then, in the Programmer menu, select "Program".
The PIC should be programmed OK.
8. When it's done, turn the power off on your board, remove
the ICD2 connector, and then turn the power back on.
Your program should now be running as a stand-alone program. |
|
|
AK
Joined: 20 Apr 2004 Posts: 33
|
|
Posted: Wed Jul 17, 2013 8:59 am |
|
|
I know this is an old post, but when I click Build All I get the BUILD SUCCEEDED message, but it does not create the hex file. |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Wed Jul 17, 2013 9:12 am |
|
|
Hi,
You are going to give us more details!
Chances are that the compiler is creating the .hex file, it's just putting it in a place that you don't expect, and you can't find it!
Are you running under Windows 7? If so, see if this thread is any help!
http://www.ccsinfo.com/forum/viewtopic.php?t=50717
John |
|
|
AK
Joined: 20 Apr 2004 Posts: 33
|
|
Posted: Wed Jul 17, 2013 9:24 am |
|
|
Thanks. I'm using Windows XP. My CCS compiler version 3.223 (PCB, PCM, PCH). I'm using MPLab 8.91.
I've been trying to program a chip in a SBC44B board. I've done this many times before, but it hasn't been working the past couple days and I have no idea why.
This is my post for the original problem that hasn't been solved:
http://www.ccsinfo.com/forum/viewtopic.php?t=50831
I've been trying to use MPLab to see if that would cure my problem, but I load my files (one .c file and one .h) and select Build All from within MPLab. I get a BUILD SUCCEEDED message, but no hex file is created.
Here is the message I get:
Clean: Deleting intermediary and output files.
Clean Warning: File "C:\Documents and Settings\KARSTESA\My Documents\Projects\Code\Ex.o" doesn't exist.
Clean: Done.
Executing: "C:\Program Files\PICC\Ccsc.exe" +FH "..\Ex.C" +LN +T +A +M -Z +Y=9 +EA #__18F458=TRUE
Loaded C:\Documents and Settings\KARSTESA\My Documents\Projects\Code\Ex.cof.
BUILD SUCCEEDED: Wed Jul 17 11:21:53 2013
I've noticed that it says EX.o doesn't exist, how do I change that? Thank you for the help. |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Wed Jul 17, 2013 10:03 am |
|
|
Hi,
What do you mean "no .hex file is created"? In your other post you say that you can load the .hex file but that your target requires you to keep the
programmer connected to run....??? Which is it?
In MPLAB, on the menu bar there is a pull-down menu with two selections "Release" and "Debug". You should select "Release".....
Can you use CCSLOAD or ICD, etc. to load a hex file to your target?
John |
|
|
AK
Joined: 20 Apr 2004 Posts: 33
|
|
Posted: Wed Jul 17, 2013 11:34 am |
|
|
In the other post I was using the CCS IDE and the ICD-U64. In this post I'm trying MPLab with the CCS plug-in and a MPLab ICD 2. I changed to the MPLab setup to try something new since I was unsuccessful with the ICD-U64 and I knew you could select Release (instead of debug) and I didn't know of a way to do that in the CCS IDE.
If I use the hex file from when I compile within the CCS IDE I am able to program the chip using either programmer and with both MPLab and CCSLoad. When I try and compile directly in MPLab with the same source files, I cannot create the hex file.
So I have two problems, but if I could figure out why it's seems to be stuck in debug mode, I would be super happy. |
|
|
|