Go Down

Topic: trouble with RDM6300 RFID reader (Read 3 times) previous topic - next topic

max3221

Hi,
I just acquired a RMD6300 RFID reader and some tags and i am trying to make it read the ID tags with my Mega 2560.

I followed the instructions from this website to run the code example 15.1
http://tronixstuff.wordpress.com/2010/08/18/moving-forward-with-arduino-chapter-15-rfid-introduction/
(i apologize if i'm not allowed to put links)

Did all the connection the same way, when uploading the code, after some moment i get these msg.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

I thought the RFID was faulty but its not, when i kept trying to make the RFID work, i found out that when i unplug ( or unpin) the RX connection that is pin 0 on the board when uploading, the upload is successful (Done uploading).

But the pin 0 (RX) on the board needs to be connected with the pin 1 (TX) on the RFID reader so that the serial monitor can display the ID of the tags being read. So i unplug the USB (switching Off the Mega 2560), i reconnect the the pin 0 (RX) on the board to the the pin 1 (TX) on the RFID reader then the plug in the USB cable (the Mega 2560 board is now On).

The code is already uploaded, so i just launch the Serial Monitor (Ctrl+Shift+M), The L LED on board lits up yellow the Serial Monitor do not read any tags (why? what does yellow L led mean?).

When i try to reupload the code with all the connection connected, the COM on which the board was connected with the USB, is gone, asking me to choose the COM again.

When i unpin the pin 0 on the board, reupload the code (Done uploading), with the board still connected with the USB, i connect the wire to the pin 0 ( can i do that? unpin or repin the wires while the board is still on?), When i launch the Serial Monitor, the RFID can then read the RFID tags, printing numbers on the monitor with the L LED blinking green.

Is this normal?
and
Since i am using a Mega 2560, i saw there are RX1, RX2 and RX3 on pin 19 and 17 and 15, how can i use one of the other RX instead of RX0 (pin0) to read the tags with the serial monitor?..


Thanks.. :)

Nick Gammon

Yes that is perfectly normal. When testing my RFID reader on a Uno I had to unplug it to upload sketches.

In your case, as you have a Mega, just choose RX1 and make life easy for yourself.
http://www.gammon.com.au/electronics

max3221

thanks for the reply..

I tried the same way for the RX1(PIN19), RX2(PIN17), and RX3(PIN15), it does not work like the RX(PIN0) but instead when i run the Serial Monitor, the L LED, on the board, lits up still yellow..

here is the code i used:
Code: [Select]
int data1 = 1;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  if (Serial.available() > 0) {
    // read the incoming number on serial RX
    data1 = Serial.read();
    // display incoming number
    Serial.print(" ");
    Serial.println(data1, DEC);
  }
}


i just the replaced the
Code: [Select]
int data1 = 1 with 19 and 17 and 15 for the other RX but after the upload, the L LED stays yellow and the Serial Monitor does not reads any ID tags.. does the code is missing something?..

Thanks..

Grumpy_Mike

You are missing the fact that if the serial data is comming in on different pins you have to use diffrent commands to read them. Look at the serial referance section for this.

Go Up