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

Debugger 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
Mancio
Guest







Debugger Problem
PostPosted: Wed Aug 30, 2006 10:23 am     Reply with quote

Hallo everybody.
I've got some troubles with PIC18F4620.
When I try to enter in the debug mode, the system comiples the program but gives me this error:
"Could not start target: the target was not halted after reset. Check the target oscillator and MCLR"

Oscillator is internal and MCLR is not programmed to be used as MCLR.

The .h header is this:

#include <18F4620.h>

#device *=8
#device ICD=TRUE
Could not start target: the target was not halted after reset. Check the target oscillator and MCLR

#device adc=8

#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
//#FUSES HS //High speed Osc (> 4mhz)
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOPROTECT //Code not protected from reading
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES BROWNOUT_SW //Brownout controlled by configuration bit in special file register
#FUSES BORV28 //Brownout reset at 2.8V
#FUSES PUT //Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES DEBUG //Debug mode for use with ICD
#FUSES LVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOCPB //No Boot Block code protection
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES PBADEN //PORTB pins are configured as analog input channels on RESET
#FUSES LPT1OSC //Timer1 configured for low-power operation
//#FUSES MCLR //Master Clear pin enabled
#FUSES NOMCLR //Master Clear pin used for I/O

Any idea?
thanck you
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 30, 2006 12:03 pm     Reply with quote

The first thing to try is to change the PUT fuse to NOPUT.
http://www.ccsinfo.com/forum/viewtopic.php?t=25497&highlight=noput
Mancio
Guest







PostPosted: Wed Aug 30, 2006 12:22 pm     Reply with quote

Previously I've read that topic and I've made as they said.
Still doesn't work.
Even with the fuse NOPUT.

Any other helpful idea?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 30, 2006 1:27 pm     Reply with quote

Quote:
#FUSES LVP

Are you using Low Voltage programming mode ?
If not, you should change this fuse to NOLVP.
Leaving it as LVP can cause the PIC to lock up.
Guest








PostPosted: Wed Aug 30, 2006 1:53 pm     Reply with quote

PCM programmer wrote:
Quote:
#FUSES LVP

Are you using Low Voltage programming mode ?
If not, you should change this fuse to NOLVP.
Leaving it as LVP can cause the PIC to lock up.


Reading in the CCS info I've seen that I was setting the LVP fuses instead of the NOLVP fuses.
Even making that change the problem still remain.
I've just finished to solder a new crystal and new capacitors but the debugger won't work.
Now I'm curious to know if there is someone that is using the PIC18F4620 in debug mode.
Waiting for some answer.
Thank you
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 30, 2006 2:14 pm     Reply with quote

Quote:
Oscillator is internal and MCLR is not programmed to be used as MCLR.
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT

Quote:
I've just finished to solder a new crystal and new capacitors but the debugger wont work.

But in your first post, you said that the "oscillator is internal".
So soldering a new crystal and caps won't have any effect.
They're not used. Which mode are you really using ? INTRC_IO or HS ?


Also, the help file for the Microchip ICD2 (in MPLAB) says this, about
the 18Fxx20 chips:
Quote:
You must connect the AVDD and AVSS pins for the device to program.
Guest








PostPosted: Wed Aug 30, 2006 2:21 pm     Reply with quote

First of all, I've started working with external clock.
With that advice, I switch to the internal clock just to be sure that everything was ok in the clock.
But the finally target is to have external clock so now I'm working with an external clock, setting #FUSES HS.

About the 18Fxx20 I will take a look on that.
Thank you for the help.
I will tell if everything was ok with AVDD and AVSS.
Stay tuned!!!
Guest








PostPosted: Wed Aug 30, 2006 2:25 pm     Reply with quote

AVDD and AVSS are the pins for the power supply of the pic.
Unfortunately I've got them connected. And supplied when on programming.
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