Which interface is used for transfering the data internal on Arduino Ethernet?

Im very new in the world of arduino so I don’t hope i make a fool of myself by asking this but:
I have an Arduino Ethernet and would like to know which interface is used for transfering the data between the Wiznet W5100 and Atmega328 chip when running a skecth? Is it SPI with MOSI and MISO or is it RS-232 with TX and RX or what is it?

The code im running on my Arduino Ethernet is:

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address, IP address and Portnumber for your Server below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress serverIP(192,168,1,45);
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(5190); //server port

// Initialize the Ethernet server library
// with the IP address and port you want to use
int led = 8;


void setup()
{
  pinMode(led, OUTPUT);
 // start the Ethernet connection and the server:
  Ethernet.begin(mac, serverIP, gateway, subnet);
  server.begin();
}

void loop()
{
  EthernetClient client = server.available();
  if (client) {
    char inBuffer[32];
    int inCount = 0;

    while (client.connected()) {
      while (client.available()) {
        char ch = client.read();
       if(inCount < 31 && ch != '\r' && ch != '\n') {
          inBuffer[inCount] = ch;
          inCount++;
          inBuffer[inCount] = 0;
        }
        
      }  


 if(strcmp(inBuffer,"on") == 0) 
 digitalWrite(led, HIGH), 
 client.println("The power is ON");
 else if(strcmp(inBuffer,"off") == 0) 
 digitalWrite(led, LOW), 
 client.println("The power is OFF");
 else client.println("Wrong Command");
    
      if(inCount > 0) {
        // send response to client here if you wish
        client.println("Closing connection");
        delay(2000);
        client.stop();
      
}
}
}
}

Hope someone can help and thanks in advance :slight_smile:

SPI, same as for the Ethernet Shield.

Your hint on line one of your code:

#include <SPI.h>

:wink:

johnwasser: SPI, same as for the Ethernet Shield.

And SPI is always using MOSI and MISO to transfer data or? Any of you got a source where i can read about it?

And SPI is always using MOSI and MISO to transfer data or?

One or both of MOSI or MISO (some devices are uni-directional) plus SCK (the data clock) and some pin for SlaveSelect so that the SPI interface can be shared.

Any of you got a source where i can read about it?

There's this website called Google...