Slave Databuffer - RS-485 network


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382

    Default Slave Databuffer - RS-485 network

    I have a door entry device that reads magnetic cards and then allows access based on card number. Currently there is an onboard EEProm database with valid card numbers programmed into it. In addition this device can connect to an RS-485 network an communicate back to a central computer. I've opted to go the master and slave route to simplify communications. However, I'm hung up on how to solve one problem.

    When a card is swiped, I want to report that card number back to the central computer via the network. Since I'm polling each slave I'm afraid that I may "miss" a swipe from time to time. (if another swipe occurs prior to when I poll the slave) Should I be storing these swipes into a buffer variable and then send them when the master polls? How big should the buffer be, should I store multiple swipes in this buffer?

    Or am I being paranoid, store just one and be done with it?
    Thoughts?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Just store ONE swipe.

    If the punter swipes again prior to the buffer being read (which at worst should only be a couple of seconds away anyway), then the latest swipe simply replaces the previous one.

    Card readers usually have a status LED. Use this to differentiate between a 'WAIT - your swipe is being processed' or a 'FAILED/REJECTED swipe'.

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    I had kind of hoped that would be the response. Thank you...will do!

    BTW the combination of your magcard code and the $1 magreaders are working out well. (www.allelectronics.com)

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Second-hand or not, $1 for a reader isn't bad going.

    You know that code reads the Credit-Card info from the mag-strip?... So your Door Access automatically debits their card? Great idea! Gotta nail one to the Men's room door for a giggle...

    I was going to start a competition for a bottle of Champage... can anybody swipe a Card thru a reader so fast that my code couldn't catch it... but I drunk it instead...

  5. #5
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    The $1 unit is used however they do have a new $5 unit.

    I have been able to swipe to quickly but hey who is counting

Similar Threads

  1. RS 485 network
    By mychangl in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 25th November 2008, 09:35
  2. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  3. RS 485 wireless communication
    By Armadus in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 26th January 2006, 19:30
  4. RS485 - ibutton network
    By ccsparky in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th June 2005, 21:48
  5. RS 485 using 16F84A
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th May 2005, 14:46

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts