RDM6300

From ElectroDragon
Jump to: navigation, search

Wiring

Pins are defined as follows:

  • P1 port : 1.TX 2.RX 3.reserve 4.GND 5.VCC
  • P2 port : Antenna coil
  • P3 port : 1.LED 2.VCC 3.GND

The arduino connection:

  • With module :TX to RX ; RX to TX; VCC to 5V; GND to GND
  • With LCD: RS => pin 12 RW => pin 11 EN => pin 10
  • D4, D5, D6, D7 => pins 5, 4, 3, 2

Demo Code for Arduino

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
unsigned char card[12];
void setup()
{
Serial.begin(9600);
lcd.print(“Card ID :);
}
 
void loop()
{
unsigned char i=0;
for(;;)
{
if (Serial.available()>0)
{
card[i]=Serial.read();
i++;
}
if (i>=11)
{
i=0;
decode();
}
}
}
void decode()
{
lcd.setCursor(0, 1);
unsigned char p;
for(p=3;p<11;p++)
{
lcd.print(card[p]);
}
}

Documents