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

Not correct running without the ICD3 attached

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

Not correct running without the ICD3 attached
PostPosted: Tue Jun 07, 2016 2:49 am     Reply with quote

Hello,
I have a strange problem..
I compile my code and when using debugging it works correct.
I switch to release mode and compile and program the chip 18F87j50 and that is going well.
Remove the ICD3 and the code is running.. USB is running I see that is is connected to the PC and when I send a command it goes berserk. Starting random things..

When I connect the ICD3 (no MPLAB or what ever running) the PIC is behaving like I want...
And sometimes it is also behaving itself without the debugger... but not always.

Anybody any clue??????

Regards,
Jody
kWoody_uk



Joined: 29 Jan 2015
Posts: 47
Location: United Kingdom

View user's profile Send private message

PostPosted: Tue Jun 07, 2016 6:46 am     Reply with quote

Could be anything: your circuit design/layout, power rails etc.

However.. sounds like it could be an uninitialised variable in your code. Very easy to miss.


Keith
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 07, 2016 11:55 am     Reply with quote

One possibility is grounding. The ICD3 could provide an adequate ground
when you have it attached, and when it's removed, that good ground
goes away.

Check the ground connections on your board. Possibly a cold solder joint ?
Ttelmah



Joined: 11 Mar 2010
Posts: 19338

View user's profile Send private message

PostPosted: Wed Jun 08, 2016 12:55 am     Reply with quote

Other possibility. What is on the MCLR line?.

Could be floating.
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

PostPosted: Wed Jun 08, 2016 1:57 am     Reply with quote

Okee I have checked the MCLR.. there is is a pull up to VDD 50k.
All the ground resoldered but were looking good.

What I did and seems to help: - Cleared the USB buffer after powering and not start using it right away.. so far it looks like it is working...
Maybe when I power up garbage is in the USB buffer?
I keep on testing... but thanks so far for the ideas!!!

Jody
Ttelmah



Joined: 11 Mar 2010
Posts: 19338

View user's profile Send private message

PostPosted: Wed Jun 08, 2016 2:48 am     Reply with quote

Most likely the time delay.

With the ICD attached, the processor does not start running your code as fast. It wakes in the debug executive code, and this talks to the debugger for a moment, before the processor is then seen to actually start.
temtronic



Joined: 01 Jul 2010
Posts: 9163
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jun 08, 2016 5:18 am     Reply with quote

Don't know about this but...
if the program still has 'use ICD...' in the code, maybe that 'overrides' the MPLAB build 'release mode' command ?
One of those 'whose in control' issues.

I got into the habit of using 'zero RAM' after some 'quirky' operations 2 decades ago. Maybe I'm just paranoid due to my age, but I like a 'clean slate'.

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion 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