View previous topic :: View next topic |
Author |
Message |
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
PIC18F4620 reset |
Posted: Wed Feb 10, 2010 9:47 am |
|
|
Hi,
I have a pic web olimex board with PIC18F4620 + enc28j60.
The PIC keeps resetting all the time but there is no watchdog etc.
It just runs for 2-3 seconds and then resets.
Sometimes when I put my hand near the board it also resets.
It is not a hardware problem because I have 2 same boards.
The original PIC on this board was 18F452 but I replaced it with 4620 for higher program capacity.
These are my fuses:
#include <18F4620.h>
#DEVICE ADC=10
#use delay(clock=40000000)
#fuses H4, NOWDT, NOLVP, NODEBUG
Any ideas? |
|
|
Ttelmah Guest
|
|
Posted: Wed Feb 10, 2010 10:18 am |
|
|
It almost certainly _is_ a hardware problem.
Do you mean it does the same on two board, or do you mean that the other identical board doesn't do it?. If the latter, look for dry joints on the one that is failing.
It sounds almost classic for a pin/pins floating, and RF pickup.
Other possibilities are things like brownout reset, if the supply has noise.
Best Wishes |
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Wed Feb 10, 2010 10:24 am |
|
|
The 2 boards have the same hardware and the same problem.
Watchdog and brownout are disabled. The supply does not have noise. The hardware is a olimex pic-web. It was working fine with the PIC18F452 that it had but I changed it for higher capacity. I do not think it is a hardware problem.
When I let the PIC run a simple task like flashing a led it has no problem but when it runs the TCPIP task it resets. It must be something about this processor (PIC18F4620) and the tcp stack that I have not noticed.
There is definately something about the tciip stack that resets the 4620. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 10, 2010 12:11 pm |
|
|
Quote: |
It just runs for 2-3 seconds and then resets.
|
What's your compiler version ? |
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Wed Feb 10, 2010 1:02 pm |
|
|
compiler version:4.088
The problem is that some PORTA pins of the 18f4620 are multiplexed with the main oscillator and the trisa register is changed in the hardware.h of the stack.
Anyway, I turned these pins to outputs and the problem is solved.
This problem did not happen with the 18f242.
Unfortunately the tcpip stack is a big piece of code and there is no way to know exactly what it is doing.
Another question, how can I find out what all the fuses in the include file mean? Of course we all know the basics but NOSTVREN,EBTR,PBADEN etc, these should be explained somewhere. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Wed Feb 10, 2010 1:13 pm |
|
|
Thanks! |
|
|
|