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

18F2620 ICD-U reset/halt oscillator problem

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
newby



Joined: 26 Sep 2004
Posts: 32

View user's profile Send private message

18F2620 ICD-U reset/halt oscillator problem
PostPosted: Fri Feb 25, 2005 12:10 pm     Reply with quote

I use PCWH 3.215, ICD-U (v1.38) and a PIC 18F2620 and have been trying to get the debugger running for a whole day know :(

I created the following fuses using the Pic-Wizard:
#include <18F2620.h>
#device *=16,icd=true
#device adc=10
#use delay(clock=32000000)
#fuses NOWDT,WDT128, HS, NOPROTECT, BROWNOUT, BORV21, PUT, NOCPD, STVREN, DEBUG, NOLVP, NOWRT, NOWRTD, NOEBTR, NOCPB, NOEBTRB, NOWRTC, NOWRTB, FCMEN, XINST, NOPBADEN, NOLPT1OSC, MCLR

If i try to debug using the ICD-U, directly after the ICD-U has loaded the code to the pic the following message occurs:

"Could not start target: The target was not halted after reset Check the target oscillator and MCLR."

I checked the connection (using the "avanced options", all is connected directly without anything else to the ICD-U), MCLR and the oscillator - i checked all like described in the troubleshoot file - but it still doesnīt work.

What i found out is, that the configuration seems not to be written correctly. I use the "HS" fuses but if i read the configuration after programming, it shows "H4" ?!?

Because i did not find a way to get this right, i changed the delay from 8000000 to 32000000 and fuses "HS" to "H4" which should correct that. But it didnīt help...

If i start the program using the ICD-U control programm (v2.24) i can run and halt the PIC like i want - but the debugger doesnīt function...

I also tried "setup_oscillator(OSC_8MHZ, 0);" but that didnīt change anything.

Does anybody has an advice or me ?!?
Tom-H-PIC



Joined: 08 Sep 2003
Posts: 105
Location: New Castle, DE

View user's profile Send private message

Some things that I have learned the hard way!
PostPosted: Fri Feb 25, 2005 3:11 pm     Reply with quote

I have been using the 18F2620 and the 18F4620 for some time now.
The first thing that I see is that you need to put the ICD = True on its own line.
You can take out the “*=16” this is only for 14 bit parts.
Below are the first few lines of my program that I'm working.
I have also had the issues with the configuration words not programming.
In my system I can get around this by moving the oscillator fuse all the way to the end of the line.
Then for some reason it will program correctly.

Good luck and keep posting if I can I will help.


Code:

#include <18F4620SPI.h>
#device ICD=TRUE
#fuses H4,NOIESO,NOBROWNOUT,NOWDT,NOPUT,STVREN,NOLVP,NOFCMEN,NOXINST,NOPBADEN,MCLR
#use delay (clock=40000000)
newby



Joined: 26 Sep 2004
Posts: 32

View user's profile Send private message

PostPosted: Sat Feb 26, 2005 1:18 am     Reply with quote

Thanks a lot !!!

It would have taken me years to figure this out !
I put ICD=True in an own line and the delay to the end - and it works !!!!

You have saved me a lot of time, hope these postings will help others to !
johanan



Joined: 28 Nov 2003
Posts: 9

View user's profile Send private message

It is the PUT fuse !!!
PostPosted: Sun May 22, 2005 7:15 am     Reply with quote

I had the same problem with 18F4620, I tested it a lot, and found that if you set NOPUT, it works , set the fuse to PUT, it will not reset correctly.
Hope that helps Very Happy
Guest








Re: 18F2620 ICD-U reset/halt oscillator problem
PostPosted: Tue Aug 02, 2005 3:13 am     Reply with quote

newby wrote:
I use PCWH 3.215, ICD-U (v1.38) and a PIC 18F2620 and have been trying to get the debugger running for a whole day know :(

I created the following fuses using the Pic-Wizard:
#include <18F2620.h>
#device *=16,icd=true
#device adc=10
#use delay(clock=32000000)
#fuses NOWDT,WDT128, HS, NOPROTECT, BROWNOUT, BORV21, PUT, NOCPD, STVREN, DEBUG, NOLVP, NOWRT, NOWRTD, NOEBTR, NOCPB, NOEBTRB, NOWRTC, NOWRTB, FCMEN, XINST, NOPBADEN, NOLPT1OSC, MCLR

If i try to debug using the ICD-U, directly after the ICD-U has loaded the code to the pic the following message occurs:

"Could not start target: The target was not halted after reset Check the target oscillator and MCLR."

I checked the connection (using the "avanced options", all is connected directly without anything else to the ICD-U), MCLR and the oscillator - i checked all like described in the troubleshoot file - but it still doesnīt work.

What i found out is, that the configuration seems not to be written correctly. I use the "HS" fuses but if i read the configuration after programming, it shows "H4" ?!?

Because i did not find a way to get this right, i changed the delay from 8000000 to 32000000 and fuses "HS" to "H4" which should correct that. But it didnīt help...

If i start the program using the ICD-U control programm (v2.24) i can run and halt the PIC like i want - but the debugger doesnīt function...

I also tried "setup_oscillator(OSC_8MHZ, 0);" but that didnīt change anything.

Does anybody has an advice or me ?!?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go 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