title: RFID MF522 13,56 MHz and LCD Keypad Shield Arduino Issue in Arduino Mega 2560
body: <p>I'm working a project using Arduino Mega 2560, <a href="http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_%28SKU%3a_DFR0009%29" rel="nofollow">LCD Keypad Shield</a>, and RFID 13,56 MHz MF522 module.</p>
  
  <p>The problem is that the LCD Keypad shield and RFID MF522 are using pin 5 together, so I changed RFID pin to the other digital pin (I'm using pin 31 now). But when I initialize the RFID and LCD shield, the LCD is not working. When I don't initialize the RFID, the LCD shield working well.</p>
  
  <p>I'm using the LiquidCrystal library for the LCD, and RFID library made by Miguel Balboa (circuitito.com) based on code by Dr.Leong (www.b2cqshop.com).</p>
  
  <p>Here's some simple code I've made :</p>
  
  <pre><code>LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
  RFID rfid(53,31); //when init RFID, pin 5 changed to 31
  
  void setup()
  {
  
   Serial.begin(9600);
   analogWrite(10, 50); // set brightness on pin 10 to 0-255
   lcd.begin(16, 2);              // start the library
   rfid.init();  //when RFID init, LCD not working
  }
  
  
  void loop()
  {
      lcd.setCursor(9,1);            // move cursor to second line "1" and 9 spaces over
      lcd.print(millis()/1000);      // display seconds elapsed since power-up
  
  }
  </code></pre>
  
  <p>Any suggestion to make the LCD shield work together with the RFID module? Or am I doing something wrong?</p>
  
  <p>Note :
  I've tried using just the RFID using pin 31 without init the LCD, and the RFID is working well.</p>