Shop OBEX P1 Docs P2 Docs Learn Events
Two RFID Card Reader ONE at a TIME ........Cards 10 and 11 Shows.."Unauthorized - Page 2 — Parallax Forums

Two RFID Card Reader ONE at a TIME ........Cards 10 and 11 Shows.."Unauthorized

2»

Comments

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-04-10 19:59
    Chris

    I will get a hold of one in the next few days and see if
    I can’t come up with a sample code that reads either of two readers.

    If you could do this it would be a great when you have the time
    ·I would like to see what you come with

    Thank You All Of Your Help In this Project

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-10 21:37
    Sam,

    Okay, I have two readers now…I will see what I can put together…It is unclear which BASIC Stamp you’re using though since you still have the conditional compilation code in what you posted…

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-10 22:40
    Okay, the following program works with two RFID Readers (more could be added). The biggest problem is getting the readers far enough apart. I tried this on the PDB and it wasn’t working, but if I only enabled one unit it would work. Finally I realized that the two were canceling each other out. So you really need a couple of feet between the readers. All this code does is display the tag. If you hold a tag in front of both readers they will (pretty much) alternately display. Hopefully this will help you. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-04-11 02:03
    Chris

    Thank You for posting this routine i will try this maybe before the weeken

    and let you know how it gose......................................................smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-26 21:49
    Sam,

    How did the code work out for you?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-04-27 15:34
    Chris Savage

    I tried this on the bench and it seem to work ok I am still working on running the
    ·cables and boxs for the Basic Stamp and Card Readers and Power Board to run all
    of it maybe this weeken i will have it all hook up and see how well it works

    This Project has been alot of work and have had not much time for any thing else

    This is also part of the same Project

    http://forums.parallax.com/forums/default.aspx?f=15&m=187815

    Update i had time to hook up every thing and seem to work ok



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 4/30/2007 9:52:31 PM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-05-06 14:53
    Hi EveryOne

    The project that I have been working on works ok

    The problem that I have run in to is this

    The names come up in the·debug window with the name that gave each card but card # 10 and # 11 Say · "Unauthorized" with a string
    of numbers

    Can any one tell how i can fix this problem

    This is what i have tried

    ·

    tagNum········· VAR···· Nib···· I have change this to Byte and Word and i still get this



    I could be wrong but i think that i might have to something with this line but I am not sure what

    ·LOOKUP tagNum,
    ········ [noparse][[/noparse]Name0, Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Name10, Name11], idx··

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/6/2007 3:00:29 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-06 16:38
    Sam,

    My guess is that your idx variable is declared as a byte and from a quick glance it appears you have more than 255 bytes in your table. Because of this the idx variable will wrap causing problems. You may need to increase it to a word variable. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-06 16:39
    Confirmed...you have 289 bytes of data being indexed by a variable which can only handle 256.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-05-06 18:24
    Chris


    Thank You for your very FAST Reply.................smile.gif

    That was what was wrong



    ·hop.gif·...................... Now it work very well.........................jumpin.gif




    I did not think about the idx variable needing to be a·WORD


    I·knew that one of the variable need to be changed but which ONE

    Thank You For all of your help and all of your time in helping get this project working so well


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-05-07 01:50
    Hi EveryOne

    Is there an easy way to·count to see how many·bytes there are·in a variable that you are using

    I know this may be·a stupid question but i want to learn from this

    Thanks to anyone that can point me in the right way so i can learn some more............smile.gif



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-07 04:08
    Sam,

    I don’t understand your question. There is 1 byte in a byte variable and 2 bytes in a Word variable. Is this what you mean? There is also 1/2 byte in a nibble and 1/8 byte in a bit. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-05-07 11:37
    Chris

    What I asking is is there an easy way to see how much variable space you are using for one variable

    Or how do you count the bits for a variable that you are using spaces count as one bit and letters
    as one· bit count·and numbers· as one bit count··

    ·Do I have this right

    Do you have count the variable space by hand or can you use memory map to see how much variable
    space for one variable




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-05-07 13:02
    Chris

    Please help me understand this

    ··
    ...............There is 1 byte in a byte variable and 2 bytes in a Word variable.
    There is also 1/2 byte in a nibble and 1/8 byte in a bit.


    ·Is this what you mean? How did you get this count ?.............
    ·
    .......·you have 289 bytes of data being indexed by a variable


    Is this to mean that all the DATA that is in the data for the " card #" and the "Tag Names"
    are count as Bytes in the· indexed variable

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-07 14:11
    Sam,

    It should be pretty straight forward in that each variable uses only the space declared for it. If you declare a variable as a Word it uses 2 bytes. Declare it as a Byte and it uses one byte. You can check the memory map to see how much variable space you’ve used overall. The memory map is how I calculated how many bytes were in your DATA statements.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-05-07 17:08
    Chris

    Now I see how you got the count·of byte,s in the Memory Map Page

    Because i got the same 290 byte,s count

    I am sorry that some time it· takes awhile for something to sink in this old·head of· mine


    Chris

    ·Thank You helping understand what i doing· and taking the to help me get there.........smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.