RFID Reader USB (#28340) retrieving data from debug terminal (UNSOLVED)

jpontingjponting Posts: 7
edited 2019-03-15 - 18:12:28 in General Discussion
Hello,

I purchased the RFID Reader USB and I'm having difficulties retrieving data from the reader and writing a code to my BASIC Stamp board. When I set it up it spits out data, but making the link between the RFID Reader > PC > BASIC Stamp board is causing me problems. I want to light the LEDs when I use each card. In the research I did there is no code on the (#28340).

https://parallax.com/sites/default/files/downloads/28140-28340-RFID-Reader-Documentation-v2.4.pdf


Thank you for your help.
1157 x 692 - 44K
4032 x 3024 - 3M

Comments

  • Well, for sure you cannot connect a USB device directly to a Basic Stamp. As I see it, you can try one of three approaches:

    1. Find a way to have the PC turn the RFID string around and send it intact to the Stamp which is waiting in a DEBUGIN command. Then once you have the string, you can decode it and do whatever is needful.
    2. You can have the PC decode the string and just send an encoded command to the Stamp (which, again, is waiting in a DEBUGIN).
    3. Get the serial version the RFID reader and connect it directly to the stamp.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • Thank you for the reply. I am interested in either doing option 1. or 2. but my coding background is very limited. When I run a code in the BASIC Stamp Editor it will run it to my BASIC Stamp board, instead of running it to the RFID reader. Is there anyway to collect the data from the RFID reader and run a code to my BASIC Stamp board simultaneously?
  • What Basic Stamp model are you using?
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • I am using the BASIC Stamp Homework Board USB
  • jponting wrote: »
    I am using the BASIC Stamp Homework Board USB

    It does not look like there is a simple way to connect the RFID reader directly to the Stamp so you may have to go with Tom's option 1 or bypass the FT232 chip on your board so you can connect it directly to an I/O pin on the Stamp.

    I have some spare serial RFID boards from an earlier project, and I would be willing to swap one for your USB RFID board if you want to do that.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Thank you for the offer. However, I want to see this through and will have to go with option 1. The RFID reader outputs what I believe to be a 10 digit hexadecimal value. If i'm correct I won't be able to to use the DEBUGIN command because it's limitations are set to 4 digits. Would I be able to do this via a SERIN command?
  • When the RFID Card Reader is active and a valid RFID transponder tag is placed within range of the activated reader, the tag’s unique ID will be transmitted as a 12-byte printable ASCII string serially to the host in the following format (and they show the format)

    You can use the STR formatter with DEBUGIN, puts all 12 ascii characters in an array.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • jpontingjponting Posts: 7
    edited 2019-03-14 - 00:16:47
    Could you provide an example of what this code will look like? How would I differentiate 4 different RFID Cards?
  • You need to define a buffer to contain the string
    Buff    VAR   Byte(12)
    
    Now read the tag into the buffer
    DEBUGIN  Str Buff  \12
    

    I would check for sanity in the string by checking the header and footer (examine the description of the string in the doc)

    Then compare the ten ascii characters Buff(1) to Buff(10) to pre-stored patterns (see DATA command). When you get a match, turn on the corresponding Led.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • When I run a program to my BASIC Stamp board the RFID reader turns off. Is there a way to take data from one debug terminal and display it in another?
  • Yeah, that's the rub.
    You'll recall my option 1 included "Find a way...".
    Short answer is, I don't know how to do that.
    Sorry if I led you into a dead end.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • jpontingjponting Posts: 7
    edited 2019-03-15 - 18:13:36
    Thank you for the help Tom, I appreciate you taking the time to assist me.
Sign In or Register to comment.