Wiegand data and com port


Closed Thread
Results 1 to 40 of 54

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Wiegand to RS232 interface

    Felch

    i have been reading this thread, and quite interest to build one, but the link you posted has been broken, can you post the proximity.asm again?

    can i have both asm and hex file for PIC12F629?

    Thanks!

    William
    Last edited by hkwkok; - 1st March 2007 at 07:22.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    For me the link is OK.

    Here it is:

    ;================================================= ==============================
    ;******************** xmit some bytes from buffer to PORTB pins6,7 *************
    ;================================================= ==============================
    Send_Coins_1: movlw Puhver
    movwf FSR
    movf INDF,W ; read timeout value sent by host
    movwf temp
    movlw 0xFF
    movwf T2CON
    send_c_0: clrf TMR2
    bcf PIR1,TMR2IF
    send_c_1: btfss Nupp ; are we allowed to transmit wiegand ?
    goto send_c_2 ; yep!
    btfss PIR1,TMR2IF ; no, wait until allowed or timeout
    goto send_c_1
    decfsz temp
    goto send_c_0
    bcf PIR1,TMR2IF
    bcf T2CON,TMR2ON
    goto send_c_fail ; taimaut: ****ing off...
    send_c_2: bsf pank
    bcf TRISB,6 ; permission granted, switch port pins to outputs
    bcf TRISB,7
    bcf pank
    bsf Dat0B ; pins also, not only direction
    bsf Dat1B
    call taimer ; take a break
    incf FSR,F
    movf INDF,W
    movwf count ; read nr. of bytes to be transmitted
    send_c_3: incf FSR,F
    movf INDF,W
    movwf tomp1
    call xmit_wieg ; read byte form "Puhver" and xmit
    decfsz count
    goto send_c_3 ; until bored
    bsf pank
    bsf TRISB,6 ; Wiegand port B as input again
    bsf TRISB,7
    bcf pank
    bsf Dat0B
    bsf Dat1B
    send_c_fail: movlw HIGH main_15
    movwf PCLATH
    goto main_15 ; return to housekeeping tasks, restore PCLATH
    ;================================================= ==============================
    ; ******************** xmiting junk in wiegand format ************
    ;================================================= ==============================
    xmit_wieg: movlw .8 ; 8 bits/byte
    movwf tomp
    xmit_wieg_1: rlf tomp1,F
    btfss CARRY ; form impulse to which pin ?
    goto xmit_wieg_2
    bcf Dat1B
    goto xmit_wieg_3
    xmit_wieg_2: bcf Dat0B
    xmit_wieg_3: call taimer50uS ; output LOW for about 50uS
    call taimer50uS
    bsf Dat0B ; lend of pulse, outputs HIGH
    bsf Dat1B
    call taimer3mS ; 3 mS pause
    decfsz tomp ; repeat it 8x
    goto xmit_wieg_1
    return
    taimer3mS: movlw 0x0F
    movwf T2CON
    clrf TMR2
    bcf PIR1,TMR2IF
    goto taimer_1
    taimer50uS: movlw 0x04
    movwf T2CON
    movlw 0x82
    movwf TMR2
    bcf PIR1,TMR2IF
    goto taimer_1
    taimer: clrf TMR2
    movlw 0xFF
    movwf T2CON
    bcf PIR1,TMR2IF
    taimer_1: btfss PIR1,TMR2IF
    goto taimer_1
    bcf PIR1,TMR2IF
    bcf T2CON,TMR2ON
    return

  3. #3
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hkwkok View Post
    Felch

    i have been reading this thread, and quite interest to build one, but the link you posted has been broken, can you post the proximity.asm again?
    Linkworks but may-be there are problems in some servers. Anyway here it is attached.
    I can't give hex file, this is not a complete project but only fragment of a larger one.
    About reading distance: i have used cables (CAT5) up to 20 meters without problems.
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Question wiegand

    Dear Felch,
    Sorry, i need the one is PROXIMITY.asm, which is you posted on 4th march 2005, and the link is http://parsek.yf.ttu.ee/~felc/proximity.asm still not working, is it complete project? if yes, can i have the hex file?
    By the way, how is James(jmaloway) done this project? I live in Canada too, can we share the experience?

    William

  5. #5
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Hi!
    Understood you wrong.
    Yes, proximity reader is a stand-alone device. Here's the complete project (MPLAB).
    Attached Files Attached Files

  6. #6
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Thumbs up wiegand to rs232 convertion

    Fekch,
    Thanks for your files, actually i using the HID ProxPoint Plus reader(wiegand format), i want to convert it to rs232 format, because i have a lot of used proxkey on hand, but can't see the card number, can i use the Windows' HyperTerminal to retrieve the number?

    And my last question is the pin connection of PIC12F629 as below?
    Pin 1: +5V DC
    Pin 2: Prox reader "Data 0"
    Pin 3: Prox reader "Data 1"
    Pin 4: No Connection
    Pin 5: No Connection
    Pin 6: No Connection / +5V
    Pin 7: RS-232 Data out
    Pin 8: Ground

    No crystal is needed as the oscillation is taken care of by the internal oscillator.


    Thanks Again! i hope the project above can be done my work.


    Wiliam

  7. #7
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Yes, this is correct pin-out. Pin 6 should be connected to +5 via some resistor (say, 1k). If grounded, output will be disabled.
    Note that this code only handles 26-bit wiegand format. As much as i am aware, HID readers output 36 bits. In this case data will be rejected
    I do have a combo lock project for 36-bit HID readers but try first this code. If it does not work, I'll publish the other one. Or- you have the source, you could modify it by yourself also. And estonian learn estonian via my comments Actually, it's good you probably do not understand it...bad style...

  8. #8
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Felch,
    I tested the code this afternoon, looks like that's not working, i use JDM PIC programmer with icpro105D to program the chip (PIC12f629). i put 1K resistor between pin 6 and +5V, also, measured the both input (data0, 1) and output (pin7) with oscilloscope, there are no signal from pin7 when i put the proxkey on HID reader (having beep sound from reader), i don't know is it the wiegand format problem?
    I have experience on writing code for ATC89c51 and some AVR, but not PIC, can you post your combo lock project or do the code modification for me?
    Thanx in advance.

    William

  9. #9
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Hi!
    No, this project uses wiegand but circuit was from another code, that read magnetic stripe format. Actually i think it is possible to make the code autodetecting but...never tried it. Yet...

  10. #10
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Yes, i found the asm file which indicated the GPIO5 connected to D0 and GPIO4 connected to D1, unfortunately, this project doesn't have the rs232 output to computer for card # display.

    Anyway, i will try to modify the proximity.asm for 36bit wiegand, hopefully, i can make it work, but i need a lot of study.

    Thanks,

    William

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