Problems setting up the Ethernet module

Post Reply
BAM
Posts: 6
Joined: Wed Jul 29, 2020 9:22 am

Problems setting up the Ethernet module

Post by BAM » Mon Aug 10, 2020 7:52 am

Hello,

I am trying to set up the W5100 Ethernet module on a Controllino MAXI. I have tried uploading the examples that come with the Arduino IDE as Controllino doesn't offer such code. I tried the "ChatServer" and the "DhcpAddressPrinter" examples and both tell me that there is no hardware connected. I have seen on the internet that you have to set the hardware SS of the ATmega (pin 53) to OUTPUT and HIGH to make it work but according to the pinout of the MAXI this pin isn't connected to the W5100. I have also tried putting a delay in void setup() of the examples to give the W5100 some time to "boot". Didn't help either.
Furthermore, I had a look at the Macros defined for the MAXI and found this line:

Code: Select all

  #define CONTROLLINO_ETHERNET_CHIP_SELECT 70
So I tried to set pin 70 HIGH but that just turned on D8, R1, R3 and R7. Is that a bug or did I miss something?

Is the wiring of the Controllino for this part any different than the standard setup for an Ethernet shield or am I missing something in the code?

Regards,
BAM

EDIT: I plugged in an ethernet cable which is connected to the network. The orange LED on the Ethernet connector is glowing continously and the green led is flashing

User avatar
Lukas
Posts: 75
Joined: Tue Dec 18, 2018 3:44 pm

Re: Problems setting up the Ethernet module

Post by Lukas » Mon Aug 10, 2020 11:27 am

Hello,

we do not provide any Ethernet example sketches because with the latest BSP package it should be fully compatible with the standard Arduino Ethernet stuff. But, you have to select the Board properly!

Just to be sure that the chip select pin for the RTC is handled properly call
Controllino_RTC_init();
prior to the Ethernet library initialization.

Best regards,
Lukas

BAM
Posts: 6
Joined: Wed Jul 29, 2020 9:22 am

Re: Problems setting up the Ethernet module

Post by BAM » Mon Aug 10, 2020 11:52 am

Hi there,

It works! Reading the documentation properly solves most problems.
Although it feels very confusing to call something called "RTC_Init" for initiating an Ethernet Chip... Maybe consider calling it "SPI_Init" or something similar? I was looking through the code and searched for something that has Ethernet in the name. I found the "SPI_Init" function but didn't read it because I believed it was for the RTC only...
Anyway, thanks a lot!

Regards

User avatar
Lukas
Posts: 75
Joined: Tue Dec 18, 2018 3:44 pm

Re: Problems setting up the Ethernet module

Post by Lukas » Mon Aug 10, 2020 12:08 pm

Hi BAM,

thank you for your fast feedback! I am happy that it works now.

I see the point with the naming ... it is because of some historical reasons :roll:

We also mention it in our FAQs as FAQ 7.

Good luck!
Lukas

Post Reply