|
|
View previous topic :: View next topic |
Author |
Message |
newby
Joined: 26 Sep 2004 Posts: 32
|
18F2620 ICD-U reset/halt oscillator problem |
Posted: Fri Feb 25, 2005 12:10 pm |
|
|
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
|
Some things that I have learned the hard way! |
Posted: Fri Feb 25, 2005 3:11 pm |
|
|
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
|
|
Posted: Sat Feb 26, 2005 1:18 am |
|
|
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
|
It is the PUT fuse !!! |
Posted: Sun May 22, 2005 7:15 am |
|
|
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 |
|
|
Guest
|
Re: 18F2620 ICD-U reset/halt oscillator problem |
Posted: Tue Aug 02, 2005 3:13 am |
|
|
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 ?!? |
|
|
|
|
|
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
|