ENC28J60 TCPIP working nice but LED?

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

Moderator: Benj

Post Reply
stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

ENC28J60 TCPIP working nice but LED?

Post 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

}

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 TCPIP working nice but LED?

Post 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.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: ENC28J60 TCPIP working nice but LED?

Post 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 1644 times
Attachments
FC8-Leddriver_prototype1_PicMX_1 -lan.fcfx
(112.93 KiB) Downloaded 163 times

Post Reply