Proximity Card Reader


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Posts
    95

    Default Proximity Card Reader

    Im trying to display the information stored on a proximity card using a clock an data HID proximity reader. I used the sense pin on the reader to start the programe off. The problem is the lcd displays the same information all the time even if the data line is disconnected from the reader. Im using a pic18f252 at 4mhz ,ive also tried changing the mode on the shift in command and still the same problem. Ive included my code below.

    Can anybody help on this one Sphere.


    '--------------------------------P18F252----------------------------------------
    @CONFIG_REQ
    @ __CONFIG _CONFIG7H, _EBTRB_OFF_7H
    @ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
    @ __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    @ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
    @ __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    @ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
    @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
    @ __CONFIG _CONFIG3H, _CCP2MX_OFF_3H
    @ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
    @ __CONFIG _CONFIG2L, _BOR_OFF_2L & _BORV_42_2L & _PWRT_ON_2L
    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
    '--------------------------------PROXIMITY READER TEST--------------------------
    DEFINE LCD_DREG PORTC 'LCD data port
    DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4
    DEFINE LCD_RSREG PORTC 'LCD register select port
    DEFINE LCD_RSBIT 4 'LCD register select bit
    DEFINE LCD_EREG PORTB 'LCD enable port
    DEFINE LCD_EBIT 3 'LCD enable bit
    DEFINE LCD_RWBIT 2 'LCD read/write bit
    DEFINE LCD_BITS 4 'LCD bus size 4 or 8
    DEFINE LCD_LINES 2 'Number lines on LCD

    B0 var BYTE

    lcdout $FE,$80,"READER "
    lcdout $FE,$C0,"TEST "
    PAUSE 2000

    START:
    IF PORTC.7 = 0 THEN GOSUB GETDATA 'TO SENSE OUTPUT ON READER
    GOTO START

    GETDATA:
    Shiftin PORTC.6,PORTC.5,0,[B0\10] 'CLOCK & DATA PINS ON READER
    PAUSE 1
    lcdout $FE,$80,#B0
    LOW PORTB.2 'READER LED
    PAUSE 3000
    HIGH PORTB.2'READER LED
    lcdout $FE,$80," "
    RETURN

  2. #2
    Join Date
    Aug 2005
    Location
    Denver
    Posts
    25


    Did you find this post helpful? Yes | No

    Default A couple of ideas...

    Sphere, Is your card reader communicating in RS232 or Wiegand? HID readers come in both flavors and some will do both. The other thing that stood out in your post was that you're running your PIC at 4 Mhz. A lot of card readers default to 9600 baud. Using the rule of clock rate divided by 400, that would seem to be a bit too "hairy edge" for my tastes. I'd go up to 8Mhz or even 20Mhz. Let us know how it works out.

  3. #3
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default Its not a weigand reader

    Just to let you know its not a weigand reader. With reguards to the crystal ive only got 4Mhz but ill try 20Mhz.

    Thanks for the reply Sphere.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Could you post the type of the reader? Or link for datasheet?

    Ioannis

  5. #5
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default

    Sorry dont no the model number of the reader the make is hid it has a clock, data, sense, red led, green led, buzzer, 5v ,0v. Its of an old site which was being demolished. The system was working before removal from the site.

    Sphere.

  6. #6
    Join Date
    Aug 2005
    Location
    Denver
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Another idea...

    You might want to go to http://www.hidcorp.com/products/readers.php and see if you can match your reader up with on of their models.

  7. #7
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default Does my code look ok

    Does my code look ok or im I missing something out. No joy on identifing the model but I tried it on a door controler an it works fine. The door controler is compatable with clock and data readers only acording to the spec sheet. Would I need pullup resistors on the clock and data lines.

    Thanks for the help Sphere

Similar Threads

  1. TTL magnetic card reader interface ith PC
    By attabros in forum Schematics
    Replies: 3
    Last Post: - 24th February 2016, 07:04
  2. Proximity Reader (Weigand) aka RFID
    By GoldStar in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 23rd May 2009, 05:41
  3. Mag Card Reader
    By Melanie in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th February 2006, 17:29
  4. gsm card reader using pic
    By ninebarmaximus in forum General
    Replies: 0
    Last Post: - 6th December 2005, 18:08
  5. Smart card reader with PIC16F84A
    By bangunprayogi in forum Serial
    Replies: 0
    Last Post: - 12th August 2005, 10:36

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