Page 1 of 1

ENC28J60 TCPIP working nice but LED?

Posted: Thu Nov 14, 2019 10:39 am
by stefan.erni
Hi Ben


The ENC28J60 TCPIP is working very nice.
But I suspect that unintentionally pin will be changed. I use PIN F1 on my board for something else and if I connect the lan Cable it gives problems.

I'm not sure what this code does in the ENC28J60 and how can I remove it.

Code: Select all

/*=----------------------------------------------------------------------=*\
   Use :Turn the LED off.
\*=----------------------------------------------------------------------=*/
void FCD_03d99_led_base__TurnOn()
{

    #if (1)

        // pin = polarity
        SET_PORT_PIN(F, 1, 0);

    // #else

    //Code has been optimised out by the pre-processor
    #endif

}

/*=----------------------------------------------------------------------=*\
   Use :Turn the LED on.
\*=----------------------------------------------------------------------=*/
void FCD_03d99_led_base__TurnOff()
{

    #if (1)

        // pin = 1 - polarity
        SET_PORT_PIN(F, 1, 1 - 0);

    // #else

    //Code has been optimised out by the pre-processor
    #endif

}

Re: ENC28J60 TCPIP working nice but LED?

Posted: Thu Nov 14, 2019 10:53 am
by Benj
Hello Stefan,

I've just looked at the code generated by the ENC28J60 component and there is no LED or LED_base so it looks like it's another component that is generating this code, maybe a LED?

If you can send me the project file, public or private then I'll try and help you track down which component is generating the code.

Re: ENC28J60 TCPIP working nice but LED?

Posted: Thu Nov 14, 2019 12:36 pm
by stefan.erni
Hi Ben



It's like on the foto.

I used some Olimex part.

Some code are from a samplecode of FC.

There are comment and code I did not use and I can not understad what the code is meaning.
Maybe it's a side-effect.


WP_20191114_11_34_21_Pro2.jpg
WP_20191114_11_34_21_Pro2.jpg (216.77 KiB) Viewed 1643 times