ENC28J60 lock ups

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Roy Johnston
Flowcode V4 User
Posts: 220
Joined: Mon Aug 24, 2009 8:38 am
Has thanked: 2 times
Been thanked: 34 times
Contact:

ENC28J60 lock ups

Post by Roy Johnston »

I have a problem with this component,
it randomly locks up. I have proved it not to be the microchip (18F4550) a flashing series of leds has done this for me.
not even a watchdog time out sorts out the problem. I have to literally remove and apply the power.
can somebody help me to force a reset on this component, I have tried pulling down the reset pin this does not help.
is there any C instructions that I can send to the component to reset it.
any help will be appreciated.
Attachments
tanks.fcfx
(44.27 KiB) Downloaded 297 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ENC28J60 lock ups

Post by Benj »

Hi Roy,

Pulling the ENC28J60's reset pin low should be performing a hardware reset. If this is not working then it sounds like something else is going wrong.

Could the voltage be dipping causing a brown out? The ENC module requires a fair bit of current to function. The datasheet should state exactly how much is needed for reliable operation. Extra capacitance on the power rails may also help to supply the module when current usage is high.

As the hardware reset is not working it's unlikely you can do anything in software as a work around.

Could it maybe be an issue with a specific ENC module or have you replicated this problem on multiple modules?

Roy Johnston
Flowcode V4 User
Posts: 220
Joined: Mon Aug 24, 2009 8:38 am
Has thanked: 2 times
Been thanked: 34 times
Contact:

Re: ENC28J60 lock ups

Post by Roy Johnston »

Evening Ben,
I managed to sort it out.
the pcb board is my own design, it incorporates the Hanrun board onto my own pcb.
the PCB boards are mounted at boreholes up to 6 Km away from the PC, it uses outdoor Wi-Fi access points.
and here is the problem if comms is interrupted whilst sending or receiving data it locks up, this is a good possibility due to the circumstances.
to solve the problem I activated the watchdog, and the very first thing I do before initializing the component force the reset to low for 3 seconds then raise it high and finaly I initialize it. this worked to reset the component. however winsock had also locked up, so all I do is send a command instruction to clear the ARP table."netsh interface ip delete arpcache"

the above has resolved all my problems
I have attached a working copy of my MS Access VBA project as well as flowcode, in case any body else wants to learn how I did it.
Attachments
Water_Managment.zip
(1.52 MiB) Downloaded 291 times
tanks.fcfx
(48.96 KiB) Downloaded 307 times
IMG_3451.JPG
IMG_3451.JPG (42.7 KiB) Viewed 4276 times

Roy Johnston
Flowcode V4 User
Posts: 220
Joined: Mon Aug 24, 2009 8:38 am
Has thanked: 2 times
Been thanked: 34 times
Contact:

Re: ENC28J60 lock ups

Post by Roy Johnston »

Further feed back , I found the source of the lockups,
the whole system comprises of one PC, one switch, eight Nano power beams and 4 cards spread around a 1500 hectare farm.
the power beams are 100M , the pc is 1000M , the switch is auto, and the cads are 10m.
as soon as I slowed down the pc to 100M the lockups stopped.

Post Reply