Hi
I have some Problems with my SPI. As you can see in the picture from my logic analyzer below, the slave-select pin pulls low in the middle of a transmission. Does anyone know how things like that can happen? The wird thing is: Only happens when i use Microchip studios to upload the code to arduino, when i use the arudino ide to upload the exact same code, it works flawless.
this is my code
Would mean a lot to me if someone could help me
#include <SPI.h>
#include <Ethernet2.h>
#include <SD.h>
//Beginning of Auto generated function prototypes by Atmel Studio
//End of Auto generated function prototypes by Atmel Studio
// size of buffer used to capture HTTP requests
#define REQ_BUF_SZ 60
// MAC address from Ethernet shield sticker under board
byte mac[] = { 0xA8, 0x61, 0x0A, 0xAE, 0x6D, 0xBF };
IPAddress ip(129, 129, 88, 87);
IPAddress gateway(129, 129, 88, 1);
IPAddress subnet(255, 255, 255, 0);
EthernetServer server(80); // create a server at port 80
char HTTP_req[REQ_BUF_SZ] = {0}; // buffered HTTP request stored as null terminated string
char req_index = 0; // index into HTTP_req buffer
void setup()
{
Serial.begin(9600);
// start the Ethernet connection:
Serial.println("Versuche IP Adresse zu reservieren");
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// initialize the ethernet device not using DHCP:
Ethernet.begin(mac, ip, gateway, subnet);
}
// print your local IP address:
Serial.print("Meine IP Adresse: ");
ip = Ethernet.localIP();
for (byte thisByte = 0; thisByte < 4; thisByte++) {
// print the value of each byte of the IP address:
Serial.print(ip[thisByte], DEC);
Serial.print(".");
}
Serial.println(" ");
Ethernet.begin(mac, ip); // initialize Ethernet device
server.begin(); // start to listen for clients
}
void loop(){}