ENC28J60 TCPIP working nice but LED?

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

Moderator: Benj

stefan.erni
Posts: 527
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 165 times
Been thanked: 152 times
Contact:

ENC28J60 TCPIP working nice but LED?

Postby stefan.erni » Thu Nov 14, 2019 10:39 am

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

}

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

Re: ENC28J60 TCPIP working nice but LED?

Postby Benj » Thu Nov 14, 2019 10:53 am

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.

stefan.erni
Posts: 527
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 165 times
Been thanked: 152 times
Contact:

Re: ENC28J60 TCPIP working nice but LED?

Postby stefan.erni » Thu Nov 14, 2019 12:36 pm

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.78 KiB) Viewed 143 times
Attachments
FC8-Leddriver_prototype1_PicMX_1 -lan.fcfx
(112.93 KiB) Downloaded 7 times