|
|
View previous topic :: View next topic |
Author |
Message |
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
18F8722 ICD2 debug problem with H4 (pll) |
Posted: Sun Nov 27, 2005 10:57 am |
|
|
When i use this bit configuration: No probleme
Code: | #include "18F8722.h"
#use delay (clock=10000000)
#Fuses hs,NOPROTECT//,H4 //hs
#Fuses NOBROWNOUT
#Fuses NOWDT
#Fuses NOCPD,NOSTVREN,DEBUG,NOLVP,NOWRT
#Fuses NOCPB,NOEBTRB,NOEBTR,CCP2C1,NOWRTD
#Fuses NOWRTB,NOFCMEN,NOPUT
#Fuses NOLPT1OSC,MCLR //NOMCLR
#Fuses NOXINST,MCU//,CPU,CPU_BB,EMCU,WAIT,NOWAIT,BW16
//#Fuses BW8,ABW8,ABW12,ABW16,ABW20,ECCPE,ECCPH |
When i use this bit configuration: Problem
Code: | #include "18F8722.h"
#use delay (clock=40000000)
#Fuses hs,NOPROTECT,H4 //hs
#Fuses NOBROWNOUT
#Fuses NOWDT
#Fuses NOCPD,NOSTVREN,DEBUG,NOLVP,NOWRT
#Fuses NOCPB,NOEBTRB,NOEBTR,CCP2C1,NOWRTD
#Fuses NOWRTB,NOFCMEN,NOPUT
#Fuses NOLPT1OSC,MCLR //NOMCLR
#Fuses NOXINST,MCU//,CPU,CPU_BB,EMCU,WAIT,NOWAIT,BW16
//#Fuses BW8,ABW8,ABW12,ABW16,ABW20,ECCPE,ECCPH |
No compilation error but when programming :
MPLAB ICD 2 Ready
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x3C7F)
...Loading DebugExecutive
...Programming DebugExecutive
...Programming Debug Vector
...Programming RSBUG
Verifying...
...Program Memory
...Debug Executive
...Debug Vector
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
Connecting to debug executive
ICD0083: Target not in debug mode, unable to perform operation
MPLAB ICD 2 Ready
Help me please |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Nov 27, 2005 2:44 pm |
|
|
From the MPLAB ICD2 Help:
Quote: | Care should be taken when programming the PLL.
The PLL only changes when power is first applied to the chip. If you
are programming the PLL for the first time, remove power from the
PIC18 part after programming and reapply for the PLL to be enabled.
If you are reprogramming the device from PLL mode to another mode,
first reprogram with PLL off, then remove power and reapply. |
From the MPLAB ICD2 Help FAQ:
Quote: | Q: Why do I have problems when configuring the PLL Oscillator?
MPLAB ICD 2 gets "hung up."
A: This is a requirement of the actual PICmicro. After programming the
configuration bits for the PLL Oscillator, power needs to be removed
then re-applied to the target. If this is not done, the target PICmicro
MCU will not have a clock. With no clock, debug mode will not
function. Also, if power is not removed and reconnected when
switching to PLL mode, the device may run, but without the PLL multiplier. |
Quote: | #Fuses hs,NOPROTECT,H4 //hs
Help me please
|
You have both the HS and the H4 fuses enabled in the line above.
You should only have one of them. Don't use lower case for the
fuses. It's easier to see the settings if you use upper case. |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Mon Nov 28, 2005 12:14 am |
|
|
Thanks PCM
I testing but that not work. I program, disconnect all power and icd cable but after reconnect and reprogram the same message appear:
Quote: | ICD0083: Target not in debug mode, unable to perform operation |
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Nov 28, 2005 1:13 am |
|
|
What's your version of MPLAB ? Some people are reporting problems
with Debug mode with the latest versions of MPLAB, over on the
Microchip forum. See the link below:
Link to articles on ICD0083 error on the MPLAB forum
Last edited by PCM programmer on Mon Nov 28, 2005 1:19 am; edited 1 time in total |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Mon Nov 28, 2005 1:19 am |
|
|
7.22 so the latest ...
i searching on microchip forum ... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Nov 28, 2005 1:21 am |
|
|
Click on the link I posted in my message above. It takes you to all
the articles on ICD0083 errors (that also mention the H4 fuse) in the
MPLAB forum. |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Mon Nov 28, 2005 8:54 am |
|
|
I've gotten that error in the past even if i wasn't using PLLx4.
I've corrected it by going to (in MPLAB):
Project --> Build Options --> Project --> CCS C Compiler -->
and then unchecking the box "Compile for use with ICD Debugger". If that failed i even went to "Debug" - NONE. However, i have it working with COFF format at the moment (not sure if the COFF vs. NONE checkmark has anything to do with it) |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Mon Nov 28, 2005 12:14 pm |
|
|
i have tested with or without :"Compile for use with ICD Debugger" or COFF vs. NONE. ( Powered Off and on after each changes)
not working |
|
|
drolleman Guest
|
|
Posted: Mon Nov 28, 2005 12:35 pm |
|
|
when you are running in h4 mode the power consumtion is higher, check the wave form from the crystal if it is still the same ampitude, also placing hf caps next to the power pins also helps |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Mon Nov 28, 2005 11:15 pm |
|
|
PCM programmer wrote: | Quote: | #Fuses hs,NOPROTECT,H4 //hs |
You have both the HS and the H4 fuses enabled in the line above.
You should only have one of them. |
4x PLL is not link with HS but can be link with internal oscillator. It's true ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Nov 28, 2005 11:48 pm |
|
|
The compiler uses the last oscillator fuse setting that it sees in the line.
It scans the line from left to right. So in this line it will use the H4
setting:
#Fuses hs,NOPROTECT,H4 //hs
The reason I mentioned it is because if you have both settings
in one line, it looks messy. It's cleaner to have only the setting
that you intend to use. |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Sun Dec 04, 2005 12:35 pm |
|
|
That does not work yet.
Somebody can indicate the fuse for the internal oscillator + PLL ?? |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Sat Dec 10, 2005 2:53 am |
|
|
That working now !!! Thank's for all !!
in fuses configuation if i write:
HS,H4 : Not work
H4,HS : Work |
|
|
tophe59
Joined: 13 Oct 2005 Posts: 32 Location: France
|
|
Posted: Mon Dec 12, 2005 2:04 am |
|
|
bad news. It run at 10Mhz |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Mon Dec 12, 2005 3:18 am |
|
|
As mentioned previously in this thread, the fuses HS and H4 are mutually exclusive.
If using H4 then you MUST power cycle the PIC the first time the fuse is set as the H4 PLL fuse is only acted on at power up. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|
|
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
|