PDA

View Full Version : Wiegand data and com port



ARES
- 30th May 2004, 22:32
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,

Felch
- 19th September 2004, 20:33
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.

Yuantu Huang
- 3rd March 2005, 07:58
Dear Felch,

I am interested in your work. Could you please post your Weigand code? Thank you.

Felch
- 4th March 2005, 21:47
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

Yuantu Huang
- 6th March 2005, 01:13
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,

Felch
- 6th March 2005, 09:41
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.

alind
- 18th August 2005, 04:17
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



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,

Felch
- 18th August 2005, 07:40
Hi!
I have recalculated things and...actually it is not very difficult. I can now read 2 RFID-s simultaneously. I have PIC16F628 running at 11.0592MHz (comm's crystal). RFID's generate a port change interrupt and first thing the int routine does is saving readers port data.
This is one possible way to solve the problem. Probably there are others as well.
/Felch

PS. I use assembly language, Basic seems to bee too slow.

alind
- 19th August 2005, 02:26
Felch,
I'd be keen to see your latest code for that.
I guess you use the USART port for one of the inputs.
I also use assembler. Check out my work, recompliing and adding SMTP and RTC support to a TCP/IP stack (with web browser) on a 18F452. It wasn't easy though.
http://al.joho.com

I am thinking of adding your Wiegand reader support to the stack to make a door access control system.
Allan

Felch
- 19th August 2005, 18:38
Hi!
My code is also used in a networked access system... I DID have to cut out some parts of it since i am not allowed to distribute it. Nevertheless i hope it will help you. Comments are in Estonian but code in pure assembly ;)
I do not use UART for RFID-s but RB4...RB7 port's port change int.
Mail me if anything remains unclear or needs to be translated.

/Felch
PS. I am also working with radioactivity monitoring system. It will be something like a portable datalogger equipped with GPS. Data is stored on an MMS card. Presently busy with FAT code. How does your appartus look like?

EDIT: It crossed my mind that if you have your readers data-pins, say D0, wire-ored together to generate an RB0-int, then read (in the int routine) readers ports and save them for processing, one could service 8 or even more RFID-readers. May-be even simultaneously if PIC is fast enough. In the int routine one only needs to shift some bits, that's all!
This kind of approach seems to be used in commercial security systems.

EDIT: Mistake in circuit - BUZ and LED are actually B-readers datapins D0 and D1 .

Yuantu Huang
- 22nd August 2005, 10:16
Hi Allan,

I am using PIC16F737 internal clock 8MHz, Card 1 is connected to RA6 and RA7, Cards 2, 3, and 4 are connected to PORTC<0:2,5:7>, and Cards 5,6,7,and 8
are connected to PORTB. All 16 card pins 1K resistors pull up to 5V.

I use the following code to determine which card has presented.

MainLoop:
CurrCard = 0
' Card reader 1
CheckPortA:
TempVar = PORTA
if TempVar < $C0 then CurrCard = 1 : goto FoundCard

' Card readers 5, 6, 7, and 8
CheckPortB:
TempVar = PORTB
if TempVar < $FF then
if TempVar.0 = 0 then CurrCard = 5 : goto FoundCard
if TempVar.1 = 0 then CurrCard = 5 : goto FoundCard
if TempVar.2 = 0 then CurrCard = 6 : goto FoundCard
if TempVar.3 = 0 then CurrCard = 6 : goto FoundCard
if TempVar.4 = 0 then CurrCard = 7 : goto FoundCard
if TempVar.5 = 0 then CurrCard = 7 : gosub FoundCard
CurrCard = 8
goto FoundCard
endif

' Card readers 2, 3, and 4
CheckPortC:
TempVar = PORTC
TempVar = TempVar & %11100111
if TempVar < %11100111 then
if TempVar.0 = 0 then CurrCard = 2 : goto FoundCard
if TempVar.1 = 0 then CurrCard = 2 : goto FoundCard
if TempVar.2 = 0 then CurrCard = 3 : goto FoundCard
if TempVar.5 = 0 then CurrCard = 3 : goto FoundCard
CurrCard = 4
goto FoundCard
endif

goto Mainloop

FoundCard:
select case CurrCard
Case 1: ' scan card 1
...
end select
...
goto Mainloop

alind
- 23rd August 2005, 02:13
Thanks Felch and Yuantu, looks like I have plenty to get started with now!
Regards,
ALlan

jmaloway
- 27th October 2005, 04:54
Hey there,

Felch,

I have been reading this thread and am really interested in giving this project a try, the only problem is that I can't seem to sucessfully burn a PIC - I have tried almost every method possible and I was wondering - Could I buy a pre-programed PIC from you? I live in Canada and would of course pay for all shipping costs.

Thanks,

James.

Felch
- 27th October 2005, 08:50
Hi!
Sure i could send you preprogrammed chip but is this really what you want? It could cost a lot...
Wouldn't it be easier to fix your programmer? What device are you using and what errors does it generate?
Anyway, if you still prefer a preprogrammed chip, send me your address. I will charge the cost of chip and nothing more. I guess that it is possible to send it with "receiver pays" option?

rgds,
/Felch

jmaloway
- 27th October 2005, 15:38
Felch,

I don't know. I've never been good a programming - for any platform. I used to know a bit of Qbasic, but that's about it. Because I don't understand the language the code it written in, I have no idea where to look for errors. I didn't get any error messages when I burned your code onto a PIC, but it dosen't do anything when you power up the chip. I am a more electronically-minded person, I have no problems with the physical aspect such as wiring up the board, but software issues are simply beyond me. Below is what I did to burn the code onto a PIC16F628A using a JDM programmer:

1. Saved code from your website as .asm file
2. Opened "Pony Prog 2002" and opened the ASM file.
3. Clicked "Write to Chip"
4. Got the message "Write Sucessful"
5. Wired up the chip with specified crystal, 22pF caps, Miniprox reader and powered it from +5V from my USB port.
6. The reader powered up and completed the power-on self test.

That's as far as I've gotten. I have playing around with MPlab, but it is ridicusly overcomplicated for me.

Am I doing everything right? I have gone to all sorts of different websites and read tons of different beginner's guides to programming PICs but I still don't get it.

Let me know if I am doing something wrong, and If I'm not then I'll just buy a chip from you. Do you have paypal?

James.

Felch
- 27th October 2005, 16:00
Hi!
It must be a PIC12F629, not 16f628! That's first. Then, After powering up the chip has no tasks, nor does it output anything. Only after you have presented a card (wiegand data arrives from reader to PIC), card number is output via serial port. Perhaps this helps?
Let me know if it still does not work.

/Felch

PS. Do NOT forget to read PICc's internal calibration data and then burn it back. Otherwise serial comms speed would be incorrect! If programmer asks if it should use OSCAL from file or from chip, say use data from CHIP!

jmaloway
- 27th October 2005, 16:27
Yes, it sure would help if I used the right chip :-)... I think I'm loosing it! lol.

I'll head on over to my parts supplier today and "PIC UP" the right chip.

I had the PIC16F628A from an other similar project that never worked and I had though for some reason that you were using the same chip for this project - I really need to read things more closley.

Which pins output the serial data? I tried pin 6 (I thought thats what it said in your code, But I wasn't sure) but didn't get any output. I just used an LED to try and detect output to make sure the circuit was working before thickining the soup by trying to connect to to my PC, yet. I did try presenting a standard Weigand Prox card with with no luck.

How do you read the calibration data?

Sorry to have to ask so many questions, but I am very new to this.

Thanks so much,

James.

Felch
- 27th October 2005, 19:01
Hi!

Serial string "ID xxxxxx" is output on GPIO0 if GPIO1 is at high level (enable pin). Taking GPIO1 low will disable output. Output speed is 4800 bd.
If you mix up D0 and D1, data will still be output but card number will be wrong.

I have the same code working at 16F628 too. It really requires only minimal changes.

I will "release" a newer version on reader code now (should be attached). Late program had problems with certain types of readers: it did not read anything. Present code fixes it. One more bug is fixed.

About OSCCAL (calibration data). My serial output (bit-banging) routine (actually not mine, I guess mr. Myke Predko wrote it) relies on chips internal oscillator. It's frequency must be exactly 4MHz or receiving computer will fail to read stream. Microchip has made PIC's internal osc's frequency adjustable by means of changing one conf byte - the OSCCAL. It has been set in factory to some (correct) value. When you burn chip, it will get a new value from the .HEX file. This must be avoided. I am not sure about PonyProg but most PIC programmers now about that trick and ask user for the right value. Programmer can read it from chip and then, after burning code, restore it.

Happy PICing!
/Felch

jmaloway
- 28th October 2005, 00:43
Thanks,

I think I'm starting to get a better grasp on how this works.

When you say that GPIO1 (pin 7) must be high, you just mean not connected to ground, right? Or does it have to be connected to +5V?

Thanks for the updated code, I really appreciate it.

I don't know what the frequency of the chip that I have is, I've uploaded and downloaded from it countless times, but I don't know if it's ever actually done anything. Can I just use an external Xtal? I have a bang-on 4.000 Mhz one right here.

Thanks again,

James.

Felch
- 28th October 2005, 07:36
GPIO1 must be connected to +5V, preferably via 1k resistor. Since there is an internal pull-up resistor in PIC, you may also leave this pin floating. You can comment checking this pin out from code if you don't need it. My application needed disabling reader.
Likewise you may change code to implement external xtal oscillator. X-tal can be connected to GPIO5&4 only but since GPIO3 and 2 are free, you can do this. You will need a pull-up for GPIO3 (it does not have internal one.

jmaloway
- 28th October 2005, 15:41
Ok, I think I understand the method to the madness, but...

One thing I don't understand and haven't been able to get any info about on the net is which pins on the PIC the GPIO pins are - are they the RA or the RB pins, and is the numbering the same?

My other question is... why is the oscilator not connected to pins 15 & 16? I though that since those were the "OSC" inputs on a PIC, that they were the only pins that you could attach a Xtal to. And to recap quickly, it's supposed to be running @ 4.000Mhz, right?

Thanks again,

James.

Felch
- 28th October 2005, 18:45
PIC16F628 has 16 i/o pins which are divided into 2 groups - ports. They are PORTA and PORTB. naturally they have different pin numbers! Powerful PICs have more ports (18f452 up to PORTE). PIC12F629 has only 6 pins and they are named GPIO0...GPIO5.
Abbout xtal connection: what code are you talking about? proximity.asm works on pic12f629 which does not have pins 15 and 16!? And the code relies on internal oscillator, no xtal!
dbl_rdr on the other hand works on 16f628 (or analogous). There xtal must be connected to pins 15&16. If u use other chip, pin numbers will be different. Of course xtal can be connested only to dedicated pins. That's true with every microcontroller.

Proximity.asm runs at 4MHz.

jmaloway
- 29th October 2005, 04:34
Ok, I think I get it now.

I am going to head over to my parts supplier tommorow and pick up a PIC12F629.

When I get the chip, I'm supposed to get the OSCAL value by doing an upload from the chip and then choosing to use the value from the chip, right?

Then, once I get "proximity.asm" loaded onto the chip, the pin connections should go as follows:

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.

Is this correct? :-)

Thanks again,

James.

Felch
- 29th October 2005, 09:42
Yep. That's correct.

jmaloway
- 29th October 2005, 19:30
Felch,

I went out today and got the PIC12F629 - but I have one question before I do anything... what programmer and software do you use to burn PICs? I was using Ponyprog 2000, but I have also tried IC-Prog which seems to have a much wider range of devices which it can program. Whenever you go to program a device, there are a multitude of options that you can choose, I beleive they are all for the oscillator. Which one should I use?

Thanks again,

James.

Felch
- 29th October 2005, 19:53
What do you mean with options? WDT, OSC? If so, they are processors config options, correct values should be read from the .HEX file. Anyway, switch WDT off, OSC to INTRCIO and MCLR off.
I use a programmer from www.kitsrus.com -> KIT128. Extremely reliable device!!!
I made it myself, pcb drawings and PIC code files are given. IC-prog is also goodbut serial port programmers usually do not work. Not enough power from modern ports. Use PPwin if you have to.

fdmourao
- 3rd November 2005, 10:49
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

samiassaad
- 16th January 2006, 13:30
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

Felch
- 17th January 2006, 20:15
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

Felch
- 17th January 2006, 20:28
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?...
Francisco

Hi!
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

markocosic
- 19th April 2006, 02:48
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

Felch
- 19th April 2006, 07:34
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 .)

markocosic
- 19th April 2006, 21:05
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!)

Ioannis
- 18th May 2006, 22:01
Hi.

I have found 2 samples of RFID Readers that have Wiegand and iButton format at the same time! Anyways, with their Control Panel they claim that readers can be 150 meters away.

Did anyone try any circuit to interface such readers with a PIC, with more than a few cm cable? I'd like to put them away.

I just hope that narrow pulses could travel through the long cabling.

Ioannis

hkwkok
- 1st March 2007, 08:07
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

Ioannis
- 1st March 2007, 09:14
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

Felch
- 1st March 2007, 12:03
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.

hkwkok
- 1st March 2007, 17:13
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

Felch
- 1st March 2007, 17:44
Hi!
Understood you wrong.
Yes, proximity reader is a stand-alone device. Here's the complete project (MPLAB).

hkwkok
- 1st March 2007, 19:58
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

Felch
- 1st March 2007, 20:09
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... ;)

hkwkok
- 2nd March 2007, 09:46
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

Felch
- 2nd March 2007, 10:04
What does your scope show on inputs? When using a digital storage scope, connect on channel to dat0 and another to dat1. Use single cycle (freezing picture after signal ends) mode. Show card to reader and count pulses form both channels. If count>26, code will not work definitely.
Lock code is attached. Reads 36-bit wiegand and saves card numbers into PIC's EEPROM. Key "Tühista kaart" means "delete card", other key is for registering card.
To register new card press and hold the "registreeri kaart" key and show card to reader. After beep data is saved.
To delete a card, procedure is the same except that you should use "Tühista kaart" key.
Pressing both keys simultaneously opens door lock (could be used for opening the door from inside).
Have fun!

hkwkok
- 2nd March 2007, 17:28
Felch,
Thanks for reply, i don't have digital storage scope, anyway i found the HID ProxPoint Plus reader is 36-bit wiegand format.
On your RFIDlock project, is it using the Clock-and-Data format reader?

William

Felch
- 2nd March 2007, 18:42
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...

hkwkok
- 3rd March 2007, 03:38
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

pmatyas
- 10th June 2007, 20:39
I'm interested your converter, can you send mee an schematic and program source in PIC 16f628?

regards,
Mathias


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.

jose pascoal
- 16th February 2008, 00:53
found this one, ready, tested & cheap :D

http://www.etconcept.com/Security.htm

robrien
- 3rd May 2008, 00:39
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.

robrien
- 3rd May 2008, 18:05
Serial string "ID xxxxxx" is output on GPIO0 if GPIO1 is at high level (enable pin). Taking GPIO1 low will disable output. Output speed is 4800 bd.

I've been carefully trying to decipher your code and am quite pleased I seem to be following most of it, however, when I examine your send_rs232 routine, it looks to me like it only outputs "ID xxxx". i.e. 4 digits - not 5 as one might expect (00000 - 65535). Am I missing something?

hansol
- 11th June 2008, 11:44
im' try create circuit with RFIDlock.zip and not work
if pic not programed voltage pin GP0 = 0V
if pic it's pogramed with RFIDlukk.HEX (winpic) voltage pin GP=5V continus
what is wrong

scuse my primitive englese

mackrackit
- 11th June 2008, 11:51
Welcome hansol.

It helps others to help you if you post your code. (and configuration settings) The schematic is great but...

hansol
- 11th June 2008, 12:05
code adn reader is ay-k12 rosslare(wiegand 26 bit)

mackrackit
- 11th June 2008, 16:35
Hi,

My ASM is very rusty, but after rereading this thread I think the answer , or at least your problem is addressed starting at post #18.

Sorry I can not be more help.