Shop OBEX P1 Docs P2 Docs Learn Events
RFId Read/write module DEAD...???? — Parallax Forums

RFId Read/write module DEAD...????

alexkuletalexkulet Posts: 9
edited 2012-02-26 03:42 in Accessories
hi everyone... i got my new PARALLAX RFID READ/WRITE module and try to interface with arduino... i tried my code from the net...and sad to say nothing works...seems the reader didn't response to the tag and failed to transmit data....i wondering if my rfid is dead... does anyone knows how to test if the rfid is working well.... thanks in advance... buy the way....i tried codes from this website... http://arduino.cc/playground/Learning/ParallaxRFIDreadwritemodule...do i need to replace my rfid... help please/..

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-02-25 13:04
    Could you attach your code and your connections? That will help. Have you asked on the Arduino forums?
  • alexkuletalexkulet Posts: 9
    edited 2012-02-26 03:42
    yeah im sorry,..i forgot....here is the code that i used and i search that in the arduino forum....
    the following connection are....
    5 volts dc to VCC
    Pin 6 to SIN
    Pin 8 to SOUT
    0 volts to GROUND


    Here is the sample code.....
    #include <NewSoftSerial.h>
    #define RFID_WRITE 0x02
    #define txPin 6
    #define rxPin 8


    #define whichSpace 4


    #define first 1
    #define second 26
    #define third 3
    #define fourth 27


    NewSoftSerial mySerial(rxPin, txPin);


    void setup()
    {
    Serial.begin(9600);
    Serial.println("RFID Write Test");
    mySerial.begin(9600);
    pinMode(txPin, OUTPUT);
    pinMode(rxPin, INPUT);
    }





    void loop()
    {
    int val;

    mySerial.print("!RW");
    mySerial.print(RFID_WRITE, BYTE);
    mySerial.print(whichSpace, BYTE);
    mySerial.print(first, BYTE);
    mySerial.print(second, BYTE);
    mySerial.print(third, BYTE);
    mySerial.print(fourth, BYTE);


    if(mySerial.available() > 0) {
    val = mySerial.read();
    if (val == 1) //If data was written successfully
    { Serial.println("Data written succesfully!");

    }
    else Serial.println("Error Code: ");
    //If an error occured during writing, discard all data recieved from the RFID writer
    }
    delay(250);
    }


    ///////////////////////////////////////////////////////////////////////////////////////////////////////////

    the following code generates and output of
    Erro Code: 2
    Erro Code: 2
    Erro Code: 2
    Erro Code: 2
    Erro Code: 2

    //////////////////////////////////////////////////////////////////////////////////////////////////////////
    and according to the datasheet of the parallax 28440
    Error Checking


    Value Name Description
    0x01 ERR_OK No Errors
    0x02 ERR_LIW Could not find a Listen Window (LIW) from the tag
    0x03 ERR_NAK Received a No Acknowledge (NAK), possible communication error or
    invalid command/data
    0x04 ERR_NAK_OLDPW Received a No Acknowledge (NAK) sending the current password during
    the RFID SetPass command, possible incorrect password
    0x05 ERR_NAK_NEWPW Received a No Acknowledge (NAK) sending the new password during the
    RFID SetPass command
    0x06 ERR_LIW_NEWPW Could not find a Listen Window (LIW) from the tag after setting the new
    password during the RFID SetPass command
    0x07 ERR_PARITY Parity error when reading data from the tag



    ///////////////////////////////////////////////////////////////////////////////
    the error above correspond to the error 0x02 which is the ERR_LIW could not find a listen Window(LIW) from the tag...
    i don't know what is the meaning of this..can somebody give me an advice how to solved it.... thank you in advance.....

    ///////////////////////////////////////////////////////////////////////////////
Sign In or Register to comment.