A very serious problem ethernet shield+ RC522

hi all,
actually I have a serious problem I connected arduino mega with ethernet shield and RC522 RFID both ethernet shield and RC522 works pretty well when they are used individually but when I connect them both the RC522 continues to work but ethernet shield stopped working
ps: I used different SS pins for the two SPI devices but the problem still occuring
please any help!

please any help!

Without seeing your code? No.

ok now I solved the problem both are working in the present of the other but till now there is no output from RC522 in the webserver when I use them both in the same program
here is the code

#include <SPI.h>
#include <Ethernet.h>
#include <MFRC522.h>
#include <String.h>
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// Enter the IP address for Arduino, as mentioned we will use 192.168.0.16
// Be careful to use , insetead of . when you enter the address here
IPAddress ip(192,168,1,115);

#define RST_PIN 5 //this is configurable and it stands for RST pin of the RFID tag
#define SS_PIN 53 //this is configurable and it stands forchip select pin of the RFID tag
String read_RFID;
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

// Initialize the Ethernet server library
EthernetServer server(80);

void setup() {

// Serial.begin starts the serial connection between computer and Arduino
Serial.begin(9600);
// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();
Serial.print("Arduino server IP address: ");
Serial.println(Ethernet.localIP());
while(!Serial); // Do nothing if no serial port is opened just wait
SPI.begin(); // Initialize SPI bus
mfrc522.PCD_Init(); //Initialize MFRC522
}
void dump_byte_array(byte buffer , byte buffer_size)
{
read_RFID = "";
for (byte i = 0 ; i < buffer_size ; i++)
{
read_RFID = read_RFID + String(buffer
,HEX); *

  • }*
    }
    void loop() {

  • //photocellReading = analogRead(photocellPin); // Fill the sensorReading with the information from sensor*

  • //pirReading = digitalRead(pirPin); // Fill the sensorReading with the information from sensor*

  • EthernetClient client = server.available(); // Listen for incoming clients*

  • if (client) {*

  • // When a client sends a request to a webserver, that request ends with a blank line*

  • boolean currentLineIsBlank = true;*

  • while (client.connected()) {*

  • if (client.available()) {*

  • char c = client.read();*

  • // This line is used to send communication information between Arduino and your browser over Serial Monitor*

  • Serial.write(c);*

  • // When the request has ended send the client a reply*

  • if (c == '\n' && currentLineIsBlank) {*

  • // We send the HTTP response code to the client so it knows that we will send him HTML data*

  • // and to refresh the webpage every 5 seconds*

  • client.println("HTTP/1.1 200 OK");*

  • client.println("Content-Type: text/html");*

  • client.println("Connection: close");*

  • client.println("Refresh: 5");*

  • client.println();*

  • // Here we write HTML data (for the page itself) which will be sent to the client.*

  • // The HTML includes Javascript which fills the data*

  • client.println("");*

  • client.println("");*

  • client.println("");*

  • client.println("Arduino sensor data");*

  • client.println("");*

  • client.println("");*

  • client.println("");*

  • client.println("*
    ");

  • client.println("

    tag read from the sensor is:

    ");*

  • client.println("

    ");*

  • client.println("");*

  • client.println("");*

  • break;*

  • }*

  • if (c == '\n') {*

  • // Check if a new line is started*

  • currentLineIsBlank = true;*

  • }*

  • else if (c != '\r') {*

  • // If a new line was not strated*

  • currentLineIsBlank = false;*

  • }*

  • }*

  • }*

  • // Give the client some time to recieve the data (1ms)*

  • delay(100);*

  • // In the end close the connection*

  • client.stop();*

  • }*
    }[/quote]

#define SS_PIN          53   //this is configurable and it stands forchip select pin of the RFID tag

What pin is the Ethernet shield using as the chip select pin?

Can you tell us the line numbers of the code that actually reads from the RFID hardware?

When a browser connects to the Arduino-as-server, can you right click, and choose to view the page source? Can you post that data here?

sorry sir for the late reply I have some internet connection problems , later on I will provide you with the complete information and circuitry
thank you very much;