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 CCS Technical Support

PIC restarting when connected with ENC28J60
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PIC restarting when connected with ENC28J60
PostPosted: Tue Jan 20, 2009 11:44 am     Reply with quote

Hi,
I am still stuck with the PIC18F4620+ENC28J60 TCPIP project, again. I have discover a problem:
1. When I programmed CCS TCPIP stack, example 10b, which have the ICMP function into 18F4620, without any power supply (power supply is source from PIC's 5v to 3.3v voltage regulator) to ENC28J60, the PIC seems working and display the message "CCS TCPIP STACK EXAMPLE10B...". But when i supply the power to ENC28J60, the PIC begins to reset and reset and stay in the loop. I have check pin 1 at PIC, the voltage is 5v and ENC is running at 3.3v. I have tried disconnect all the connection between PIC and ENC, but when I supply the power to ENC, the PIC begin turned reset like in a loop.

Does anyone have any idea??? I am building the CCS TCPIP development board without the LCD and EEPROM model.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 20, 2009 2:47 pm     Reply with quote

Quote:
I have tried disconnect all the connection between PIC and ENC, but
when I supply the power to ENC, the PIC begin turned reset like in a loop.

Look at the power supply voltage on the Vdd pins of the PIC.
The Vdd level is probably being pulled down below the BROWNOUT
voltage setting, and the PIC then resets.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: PIC restarting when connected with ENC28J60
PostPosted: Tue Jan 20, 2009 3:48 pm     Reply with quote

leejok2003 wrote:
Hi,
I am still stuck with the PIC18F4620+ENC28J60 TCPIP project, again. I have discover a problem:
1. When I programmed CCS TCPIP stack, example 10b, which have the ICMP function into 18F4620, without any power supply (power supply is source from PIC's 5v to 3.3v voltage regulator) to ENC28J60, the PIC seems working and display the message "CCS TCPIP STACK EXAMPLE10B...". But when i supply the power to ENC28J60, the PIC begins to reset and reset and stay in the loop. I have check pin 1 at PIC, the voltage is 5v and ENC is running at 3.3v. I have tried disconnect all the connection between PIC and ENC, but when I supply the power to ENC, the PIC begin turned reset like in a loop.

Does anyone have any idea??? I am building the CCS TCPIP development board without the LCD and EEPROM model.


Is your on-board power supply capable of delivering 200mA at 3.3 volts to the ENC28J60?

Do you have large power supply filter capacitors before and after the 3.3 volt regulator to supply the large transient currents produced by the ENC28J60?
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Wed Jan 21, 2009 2:12 am     Reply with quote

PCM programmer wrote:
Quote:
I have tried disconnect all the connection between PIC and ENC, but
when I supply the power to ENC, the PIC begin turned reset like in a loop.

Look at the power supply voltage on the Vdd pins of the PIC.
The Vdd level is probably being pulled down below the BROWNOUT
voltage setting, and the PIC then resets.


How to check the BROWNOUT setting?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jan 21, 2009 2:26 am     Reply with quote

Look at your #fuses statement. Do you have any of these settings in it ?
Code:
BROWNOUT, BORV21, BORV28, BORV43, BORV46

Also look at the end of the .LST file for your project. It shows the Config
bits generated by the compiler. You can see what the settings are for
Brownout.

Also, tell us about your power supply circuit, as asmallri suggests.
Post the part numbers of the voltage regulator ICs used on your board.
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Wed Jan 21, 2009 2:50 am     Reply with quote

Hi,
i have found something on my board when testing it:
If i would have connect a LED to the SO pin of the ENC28J60 chip, it can be ping sucessfully but with losses. It can stop the PIC restarting, but the communication is unstable. Any ideas?
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Wed Jan 21, 2009 3:12 am     Reply with quote

PCM programmer wrote:
Look at your #fuses statement. Do you have any of these settings in it ?
Code:
BROWNOUT, BORV21, BORV28, BORV43, BORV46

Also look at the end of the .LST file for your project. It shows the Config
bits generated by the compiler. You can see what the settings are for
Brownout.

Also, tell us about your power supply circuit, as asmallri suggests.
Post the part numbers of the voltage regulator ICs used on your board.


i did't have those fuse in the source code. The voltage regulator IC i am using is LM3940 from NS, which outputs 1A.
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

Re: PIC restarting when connected with ENC28J60
PostPosted: Wed Jan 21, 2009 4:24 am     Reply with quote

asmallri wrote:
leejok2003 wrote:
Hi,
I am still stuck with the PIC18F4620+ENC28J60 TCPIP project, again. I have discover a problem:
1. When I programmed CCS TCPIP stack, example 10b, which have the ICMP function into 18F4620, without any power supply (power supply is source from PIC's 5v to 3.3v voltage regulator) to ENC28J60, the PIC seems working and display the message "CCS TCPIP STACK EXAMPLE10B...". But when i supply the power to ENC28J60, the PIC begins to reset and reset and stay in the loop. I have check pin 1 at PIC, the voltage is 5v and ENC is running at 3.3v. I have tried disconnect all the connection between PIC and ENC, but when I supply the power to ENC, the PIC begin turned reset like in a loop.

Does anyone have any idea??? I am building the CCS TCPIP development board without the LCD and EEPROM model.


Is your on-board power supply capable of delivering 200mA at 3.3 volts to the ENC28J60?

Do you have large power supply filter capacitors before and after the 3.3 volt regulator to supply the large transient currents produced by the ENC28J60?



I have one with 0.47uF for input voltage and 22uF for output voltage
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Jan 21, 2009 7:05 am     Reply with quote

leejok2003 wrote:
Hi,
i have found something on my board when testing it:
If i would have connect a LED to the SO pin of the ENC28J60 chip, it can be ping sucessfully but with losses. It can stop the PIC restarting, but the communication is unstable. Any ideas?


This implies there may be something wrong with your SPI bus implementation - the LED appears to be functioning as a pull-up resistor.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Wed Jan 21, 2009 7:37 am     Reply with quote

Hi asmallri,
If the situation is like that, how to fix it? Can you give me some idea of it? Thanks...
So sad that i only have 1 PIC working with the PING and i have forgot the configuration of it!!! Now trying back to bring back the solution so that i can go futher...hopefully Crying or Very sad
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Jan 21, 2009 8:06 am     Reply with quote

leejok2003 wrote:
Hi asmallri,
If the situation is like that, how to fix it? Can you give me some idea of it? Thanks...
So sad that i only have 1 PIC working with the PING and i have forgot the configuration of it!!! Now trying back to bring back the solution so that i can go futher...hopefully Crying or Very sad


If you have copied the circuit from elsewhere then I would check to see if you have copied it correctly. If it is your own circuit then post the schematic.

HOWEVER the most important piece of this is still your power supply circuitry including the type of power source, regulator circuit, power supply filter capacitors and decoupling capacitors. ANY of these can cause the problems you are describing.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Wed Jan 21, 2009 8:29 am     Reply with quote

The circuit bellow is which i am working on it:
1. The connection to RJ45 is not shown.
2.The power supply for ENC28J60 is shown which uses 5v input from 5v regulator.
3.The capacitor value is as shown.
4. The WOL' pin is not shown in the circuit.
[img]http://www.freeimagehosting.net/image.php?6d64b9c464.jpg[/img]
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Jan 21, 2009 9:00 am     Reply with quote

leejok2003 wrote:
The circuit bellow is which i am working on it:
3.The capacitor value is as shown.


Hopefully you have an additional 100uF or similar capacitor on the input of the regulator which is not shown.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Sun Jan 25, 2009 7:16 am     Reply with quote

The ENC28J60 is supposed to have ceramic 0.1uF caps on all the VDD/VSS pairs, including the OSC, RX, TX, and PLL pairs (total five pairs). I can't see a 0.1uF bypass cap for your PIC, either.

Also, you should read the errata for the ENC28J60, there are some issues relating to the SPI bus speeds. I forget the details (I've misplaced my errata files), but I've always used one of the recommended workarounds which is to use the ENC CLKOUT to clock the PIC.
_________________
Andrew
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Jan 25, 2009 7:41 am     Reply with quote

andrewg wrote:
The ENC28J60 is supposed to have ceramic 0.1uF caps on all the VDD/VSS pairs, including the OSC, RX, TX, and PLL pairs (total five pairs). I can't see a 0.1uF bypass cap for your PIC, either.

Also, you should read the errata for the ENC28J60, there are some issues relating to the SPI bus speeds. I forget the details (I've misplaced my errata files), but I've always used one of the recommended workarounds which is to use the ENC CLKOUT to clock the PIC.


For early rev ENC28J60s you had to have the SPI speed at 8MHz or above.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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