Wiegand data and com port


Closed Thread
Results 1 to 40 of 54

Hybrid View

  1. #1
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default Pre-Programed PIC?

    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.

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


    Did you find this post helpful? Yes | No

    Default

    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

  3. #3
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default RE: Pre-Programmed Chip

    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.

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


    Did you find this post helpful? Yes | No

    Default

    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!

  5. #5
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default RE: Pre-Programmed PIC

    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.

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


    Did you find this post helpful? Yes | No

    Default

    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
    Attached Files Attached Files
    Last edited by Felch; - 27th October 2005 at 18:03.

  7. #7
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default Pic

    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.

  8. #8
    Join Date
    May 2008
    Location
    Durban, South Africa
    Posts
    2


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by Felch View Post
    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?

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