Thanks Felch and Yuantu, looks like I have plenty to get started with now!
Regards,
ALlan
Thanks Felch and Yuantu, looks like I have plenty to get started with now!
Regards,
ALlan
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.
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
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.
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!
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.
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
Last edited by Felch; - 27th October 2005 at 18:03.
Bookmarks