I have a reader (HID Prox Point) and it sends data in wiegand format.I want to read this data from com port.Help me about this circuit.How can i do this type of circuit.
Thanx,
I have a reader (HID Prox Point) and it sends data in wiegand format.I want to read this data from com port.Help me about this circuit.How can i do this type of circuit.
Thanx,
It's quite simple. Device sends pulse on Data0 if it wants to signal that bit =0 and vide versa. There are 26 or sometimes 40 bits including parity in beginning and end.
Have wrote decoder with rs232 output for 12F629 and 16F628. I will post code, if interested.
Dear Felch,
I am interested in your work. Could you please post your Weigand code? Thank you.
Yuantu Huang
Hi!
You'll find the code at http://parsek.yf.ttu.ee/~felc/proximity.asm
It is a single chip proximity card reader decoder that outputs 6 char (ASCII) number of the card if pin PIC's named "enable" is at high level. Discards readers parity bits (i found that they make no errors anyway...so far). Output parameters: 4800,n,8,1, bit-banged I/O. Critical to correct reading of OSCCAL value of PIC12F629. Be sure not to spoil it when burning the chip!!!
Although comments are in estonian (my native tongue) , definitions should be understandable. Mail and ask if anything remains unclear.
Code not for commercial use !
Happy PIC-ing!
/Felch
Dear Felch,
Thank you very much for your code. I am now implementing 8 card readers (both Track2 and variable length Weigand) on a single 16F737 using PICbasic Pro. Currently I have a problem for PIC18F8720 to access 2MB EMI using PICbasic Pro.
I will let you know once I implement 8 card readers on a single PIC.
Best regards,
Yuantu Huang
Nice to hear that this piece of code is useful.
I was thinking about adding another proximity reader to the same PIC myself too but it was a little bit difficult. As you may have noticed, HID readers are critical: they give a very short pulse (about 40uS) but on the other hand their data "packet" lasts very long (about 70 mS!!).
Long packet is not a problem of course but it takes nearly 36uS for a PIC running @4MHz to branch form "everyday jobs" to card reading.
So if i have 2 readers active at the same PIC chip, it really puts it on the edge.
Yuantu,
I was very interested to hear about your plan to implement 8 card readers.
How did you get on?
I am keen to do the same thing, but figured it would be necesary to have a seperate PIC for each reader...
Allan
Originally Posted by Yuantu Huang
Hi sir/
I am using PIC16F877 to read weigand data from a HID card reader proxpoint. I am using 24 bits crad , 8 bits is site code and 16 bits card number. Also there is 2 extra bits added by the reader called parity bit, please could you tell me about the parity bits? DO they implement as logic 0 or logic 1?
also could you tell me about weigand protocol, the order of data in it? and I will be very thankul.
Best Regards
Sami Assaad
A copy of my reply to somebody who asked questions like yours. Hope it helps you .
--------------
Hi!
Wiegand timing is a difficult question. I found one doc ( http://parsek.yf.ttu.ee/~felc/Wiegand2.pdf ) but in reality it looks different and depends much on manufacturers ...ee...fantasy ? Anyway, working principle is always the same, like described in the pdf.
About code. Are the files, mentioned in my postings missing? There should be full Prox reader code for PIC12F629 and essential part for PIC16F628 reading 2 readers simultaneously. Heavily commented.
In assembly, of course
rgds,
/Felch
PS. If you still have questions, drop me a mail
PS. will copy the same contents to forum also, may-be somebody needs it.
------------------------
/Felch
found this one, ready, tested & cheap
http://www.etconcept.com/Security.htm
Hi Felch,
I think you have done a fantastic job and thanks for sharing. I am also new to this but it all makes sense and can't wait to get my hands on the microchip and start experimenting. While I'm still finding my feet please can I ask your help (which I am sure won't be too difficult)? I need to convert the 26bit Wiegand to RS485 for the sake of reading up to 1.2 Kms away. If its not to difficult do you think you could post modified code for me?
Many many thanks!
Richard.
Hi,
I'm a newbie working with PIC's, but I'm trying to develop a converter from a RS232 signal to a Wiegand 26 bit's.
Can somebody help me to know where can I start from? What PIC will I choose? Is the code shown on this thread to do the inverse conversion a good starting point?
Thanx in advance.
Francisco
Hi!Originally Posted by fdmourao
This piece of code sends contence of databuf to PIC's pins in pseudowiegand format. Hope it helps. (Comments translated to english, i do not expect you to understand estonian....)
http://parsek.yf.ttu.ee/~felc/wiegand.asm
Hi!
I'm trying to read RFID tags using an HID Corp reader (the OEM150), store the ID numbers of the RIFD tags that get read (up to 12 of them) on the microcontroller, transmit the ID numbers of the RFID tags in memory via 'one-way-RS232' to another device then reset the reader ready to scan more RFID tags. The device doesn't need to 'scan' and 'transmit' at the same time.
(its something to be used on a 'treasure hunt' of sorts and needs to communicate via RS232)
Would a PIC12F629 be able to do this? Could your code be adapted? I'm a mechanical engineer that knows enough about PICs to flash LEDs but that's about the limit at the moment!
Thanks,
Marko
Yes, i guess that the code could be adapted. You only have to write a routine for storing numbers in EEPROM. Only thing that might get disturbing is PIC's oscillator frequency deviation due to temperature. It might affect RS232. Test it before hunting real treasures .)
Good warning on the temperature variation - a larger pic and external xtal (or something like a 16F88 with internal crystal/more acpability than is needed?) might be required.
I don't suppose you could re-post the 12XXXX IC code could you (my email is mac65 <at> cam.ac.uk if you'd prefer to send it by mail) as the web-links above are broken.
Thanks,
--
Marko (working his way through the PIC instruction sets as bed-time reading!)
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.
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
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
Hi!
Understood you wrong.
Yes, proximity reader is a stand-alone device. Here's the complete project (MPLAB).
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
Bookmarks