View previous topic :: View next topic |
Author |
Message |
Jody
Joined: 08 Sep 2006 Posts: 182
|
Not correct running without the ICD3 attached |
Posted: Tue Jun 07, 2016 2:49 am |
|
|
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
|
|
Posted: Tue Jun 07, 2016 6:46 am |
|
|
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
|
|
Posted: Tue Jun 07, 2016 11:55 am |
|
|
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: 19539
|
|
Posted: Wed Jun 08, 2016 12:55 am |
|
|
Other possibility. What is on the MCLR line?.
Could be floating. |
|
|
Jody
Joined: 08 Sep 2006 Posts: 182
|
|
Posted: Wed Jun 08, 2016 1:57 am |
|
|
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: 19539
|
|
Posted: Wed Jun 08, 2016 2:48 am |
|
|
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: 9243 Location: Greensville,Ontario
|
|
Posted: Wed Jun 08, 2016 5:18 am |
|
|
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 |
|
|
|