Looking into getting a PIC programmer for a project, not sure if it's worth it f - Page 1
Forum section: electronics / beginners

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 10, 2022, 08:20:46 pm
content: There is an upcoming project I want to do, problem is one step involves flashing a microcontroller, a SOP89 version of the PIC12F629 specifically (If I can find one anytime this year that's not clearly a Chinese bootleg, though one of said bootleg sites did have a cheap flashing service...). I don't have a chip programmer, I am just getting into doing electronics projects actually and am still new to soldering, so I went looking for one to see if there were any cheap/budget ones for beginner hobbyists that I could use.First thing that came up was the PICkit 3, that thing is everywhere. I figured it looks decent, and cheap, but then when I read into it a little more some issues came up. First of all being that it's apparently been discontinued years ago, and 99% of the ones I can find are very likely just bootlegs that I would have no idea how well they work (Especially annoying since I am new and would not know if I am doing something wrong or it's a fault of the programmer).I also saw that apparently, it was not as good as the PICkit 2. So I went to see if I can find a used version of that figuring everyone would be busy just bootlegging the 3, but nope. They didn't even try to hide that all the PICkit 2s are bootlegs, they are using the same translucent red casing as the 3, despite the real PICkit 2 having an opaque black casing.Some tried to hide the fact that it's a fake even less by claiming they are selling a PICkit 3.5.... a device that never officially existed.Ok, so PICkit 2 and 3 are almost all fake, but there is a PICkit 4, and that one is still being produced AFAIK and I can get legitimate ones. Issue is, it's also considerably more expensive. Seems to have a MSRP of around $75 (For some reason it's $100-250 on Amazon), but that's somewhat pricy for a device that I am not sure yet if I will get more use out of, or I just need to program a chip once. Also after the mess of 2 and 3 I am not so sure how much I would trust the PICkit 4.Next one I ran into was the XGecu TL866II. I had seen this one in many YouTube videos of people doing repair/project work, but this one also seems to be heavily bootlegged everywhere with different "brands" claiming they have their own model of it, and XGecu's own page warning about the bootlegs that they can't update their firmware anbd discontinued it. One silver lining though is that they apparently came out with a TL866II Plus, and they have an official store on Amazon that I can purchase from so it looks like I probably can get an authentic one. Price is still not too great, but $65 with about a dozen adapters (Including a SOP to DIP adapter that I would need for that PIC12F629) still sounds good, especially for a programmer that I have seen many hobbyists swear by.My only concern with the TL866II Plus is that when I saw people setting it up, I noticed that it installs some Chinese drivers onto the system. Is this safe? I have seen a lot of problems and sometimes intentional malware caused by dodgy drivers, and drivers that I can't even read the company name/title of because the name was completely in Chinese is a little worrying considering how low level an amount of access drivers have on a Windows system. Is it safe to use this if anyone here has used this programmer?I also saw something form Sparkfun called a "MPLAB Compatible USB PIC Programmer" that was around $75 as well, could not find much info on that, but the company itself at least seems less dodgy.That's about all I could find on my own that wasn't some four-figure professional flasher. There was some incredibly cheap ones on Amazon called a "CH341A" but it wasn't clear if that one was only for flashing BIOS chips or it can flash other types too.Anyone have any suggestions? Are the PICKits not as bad as they seem, even if I am likely to get a bootleg? Or am I just over-worrying about the TL866II Plus drivers? Or should I just use one of those sites with bootleg PIC12F629s that offer to flash them for me for a fee? For now I do want to do some other future projects that would also involve needing to flash chips, but I don't know if I will ever get around to it and only wind up using a programmer for this one chip in this one project.

author: Ian.M
author_rank: Super Contributor
timestamp: July 10, 2022, 08:55:19 pm
content: A PICkit 3 clone is the cheapest reasonably reliable option for programming older Microchip PICs that have FLASH program memory and need HV (high voltage) programming. It will also program many newer PICs, (up to when they discontinued it), and with PICkit 2 emulation firmware installed, can also be used to program many Atmel AVRs using AVRDUDE.Get your PIC and have it all ready to program, soldered to your PCB with no other parts except a 100nF decoupling capacitor and the programming header. You may also want to get a PDIP package one so if you have problems, you can prove its *NOT* your board!Install the current version of MPLAB X on your PC + the XC8 compiler, or if you are coding in MPASM assembly language, you need an older version of MPLAB X (v5.35) as they dropped MPASM support back in 2020.Try to compile the code you want to program the PIC with. Ask here if you have problems. N.B. there are some issues and simple mistakes that can lock you out of a PIC12F629 or PIC12F675 the first time you program it, so post your code and ask us if it looks OK.When you've got all your ducks in a row, order a PICkit 3 clone fromAmazon, delivered by Amazon (to take advantage of their extremely customer friendly returns policy). The DollarTek one looks to be as good as any.When it lands on your doorstep, connect it to your PC and run MPLAB X, open your project and go through the motions of programming your PIC even though it isn't connected to the PICkit 3. That should update the PICkit 3 firmware. If it fails completely, exit MPLAB, and unplug and replug the PICkit 3, this time holding down the button while you plug it in to force bootloader mode. If it makes any progress updating the firmware, wait for it to complete. If it hangs for >10 minutes, disconnect it, exit MPLAB and reboot your PC and try again *without* holding the button down. It should get further, and complete updating.It will eventually try to program your PIC and fail with a Device ID error. Now you can connect your PICkit 3 to your PIC on your target board and program it.If you get stuck ask here.If we tell you its borked, return it to Amazon.

author: MikeK
author_rank: Super Contributor
timestamp: July 10, 2022, 09:14:37 pm
content: Is there a reason that you want a 20y/o part? The 12F675 is the same part but with A/D. Still 20y/o, though. And the 12F683 is the move up from that, but only 15 y/o. All are 8-pin.

author: theHWcave
author_rank: Regular Contributor
timestamp: July 10, 2022, 09:26:05 pm
content: I have both, the PICKIT3 and the TL866II Plus. My (genuine) PICKIT3 died all of a sudden and I got a clone from Ebay which worked fine and still works. However, sometime last year I needed to read and program other chips and EPROMS, and so I got a (new) and supposedly genuine TL866II+ using Ebay. Turns out I was lucky, it is indeed authentic and I have updated the firmware a couple of times with no problems. I have retired the PICKIT3 and the TL866II+ is now my go-to programmer for everything. I totally understand your worry about installing strange software and drivers. This is one of the reasons I am normally using Linux. The software for the TL866II+ is only for Windows but I knew that there is an open source Linux (command line) utility for the TL866 family called minipro which allowed me to avoid installing anything from XGecu. I do download the EXE every so often because it contains the firmware for the programmer, but all I do is to extract the firmware from the EXE (which is really a ZIP file in disguise) and use minipro to update it.I realise that my way to use the TL866II+ is not how 99% of the people are using it and so I did eventually install the XGecu windows software on an old laptop just to see how that works. I was actually surprised how good that Windows software is. If you know what your are doing, the minipro command line use is way faster, but the Windows version is much easier to use if you are unfamiliar with the chip, the programmer, or both. I made a YouTube video about the whole TL866II+ experience from minipro to Windows recently:https://youtu.be/NXwT7NL4PQMI should add that updating the firmware via Minipro looks very scary in this video but that is because I did it from a virtual machine. During the update, the USB connection to the programmer was briefly lost twice which is normal when updating firmware, but when running in a VM, VirtualBox decided to totally disconnect the USB from the VM which means minipro wasn't able to reconnect and hence the scary error messages. This does not happen if you update the firmware with minipro on a machine where the USB is directly connected.

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 10, 2022, 09:31:55 pm
content: Quote from: MikeK on July 10, 2022, 09:14:37 pmBecause it's a DIY project that has a list of the parts and files I would need to buy, including the file I would need to flash the chip with. I have no idea how to write the source code for the part myself. I can't just flash an entirely different chip with the same hex file.

author: Ian.M
author_rank: Super Contributor
timestamp: July 10, 2022, 09:38:05 pm
content: For a one-off project, it would be worth asking here if there's anyone in your area that has the equipment to, and would be willing to program the PIC for you. Expect to pay at least postage both ways . . .

author: BrokenYugo
author_rank: Super Contributor
timestamp: July 10, 2022, 09:43:40 pm
content: My TL866II+ hasn't disappointed me yet, though that comes with the disclaimer that all I've run through it is some 12V UV EPROMS, 5V flash, and a PIC. Only problem so far is the definitely not 3M (a real one is like $40) ZIF socket has one somewhat flaky pin if you center the chip in it, off to either side and it works fine.Given how the 866 is a technical product aimed at technical people that sells quite well, I'm fairly confident nothing nefarious is happening with the included software/drivers from the official source. Odds are somebody would have noticed. Run it in a virtual machine or on an old junk computer if it bothers you.

author: ledtester
author_rank: Super Contributor
timestamp: July 10, 2022, 10:18:19 pm
content: FWIW, here's an Arduino project which claims to support the 12f629:https://github.com/rweather/ardpicprog12F629 appears in the doc/supported_devices.dox file:https://github.com/rweather/ardpicprog/blob/2f8b5405440b30b0390f6d9d459da70e70e894cd/doc/supported_devices.dox#L63A blog post about the project:https://www.hackster.io/rweather/arduino-based-pic-programmer-d7428e

author: MikeK
author_rank: Super Contributor
timestamp: July 10, 2022, 10:44:01 pm
content: FWIW, a PICKit2 will also program that old chip. And I actually use my PICKit2 to program all my PIC's as I don't like how Microchip made the PK3 with switchable modes. There are [at least] two people who have upgraded software for the PICKit2 to be able to program newer chips (PICKitPlus and PICKitMinus are two, the Minus is free)...which you don't really need anyway. I modified my own PK2 to do all the newer chips that I use and I like the standalone app that I call from my IDE...I click a button to compile and it automatically programs the PIC afterwards.Official PK2's are selling for insane prices on eBay. I'm sorry I didn't pick up another one when they were still reasonable. Clones can be hand for cheap. If you're just programming the 12F629 you can use either PK2 or PK3.

author: MarkF
author_rank: Super Contributor
timestamp: July 11, 2022, 01:18:21 am
content: For any that are interested, I've attached the latest known "Device List" file for the PICKit2 and a HTML file listing the devices it supports.If you don't already have a PICKit2, I wouldn't recommend purchasing one since it is extremely out-of-date at this time. Even the PICKit3 is showing its age and has its quirks running with MPLAB X.As far as the PICKit3 goes, you can download the PICkit 3 Programmer App and Scripting Tool v3.10,https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem,from the Microchip Archive if the PICKit3 is totally unresponsive to MPLAB X. It allows you to program really old firmware into the PICKit3 which will then allow MPLAB X to update the firmware to its latest.

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 11, 2022, 09:23:14 pm
content: Quote from: Ian.M on July 10, 2022, 09:38:05 pmI was also looking into the possibility of that. Thing is, I do have some future projects in mind that would also use it, I just have no idea if I will ever get to them. There was also a site I was linked to that would program the chips for 20 cents each, but considering that they claimed to have hundreds of PIC12F629 in stock when every credible electronics site like Mouser, DigiKey, Microchip, etc claim they are sold out until July of 2023, those are clearly either bootlegs or flat out fake.Quote from: BrokenYugo on July 10, 2022, 09:43:40 pmYeah, that's one of the things that crossed my mind. I figured if there was malware in the software or drivers, it would have likely been found by now. But they also seem to update their software often. The last update was July 7 of this year IIRC. So it would not be impossible to sneak something in later. They would destroy their reputation utterly if found out though. I wonder if it would be worth it to get a cheap used junker laptop to just use for such software and never log into any of my personal accounts on.Quote from: ledtester on July 10, 2022, 10:18:19 pmI am just starting out trying to do some DIY electronics projects following a guide, I would have nowhere near the skills yet to create my own hobbyist programmer. I am watching many video tutorials just to try to figure out how to use the existing programmers, and the PICkit 3 itself feels confusing with it's 1GB software IDE. (Although the software for the TL866II seems pretty easy and straightforward.)Quote from: MikeK on July 10, 2022, 10:44:01 pmYeah I know, and as I mentioned many seem to prefer the 2 over the 3. Issue is, as you also mentioned, pretty much impossible to find one that's not a clone. All the clones of the 2 also seem to just be the clone of 3 but with a "2" written on the casing instead of 3, they didn't even try to match the casing color and used the casing of 3.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 11, 2022, 10:20:13 pm
content: I programmed my first PIC16F84 with a few wires hanging off an LPT port and going to a breadboard. In those days it was ASM only, and I did not have much appetite for that and I did not do much with uC's. when atmel had the AT90S2313 I bought a few, programmed the first also with a few wires from an LPT port, then quickly programmed an AN910 programmer, and from there on use a serial port with that programmer. Later I switched to USBasp (also self flashed) and later bought some USBasp clones from China. I was once tempted to buy a "Dragon" for around EUR50 but it had a faulty power supply design and had a tendency to destroy itself and I'm not paying EUR 50 for such *&^%$#@!.Then came the fun small TFT displays and those AVR's were too slow for my liking and I already was curious for somthing a bit quicker anyway, so I settled on STM32. Bought a bunch of Blue Pills (they were still genuie back then) and a few ST-Link V2 clones, and they all work.In the early days of 27Cxxx eproms you had to apply weird voltages and carefully take care of timings to program IC's, but those days are long gone. These days all IC's program themselves with on-board charge pump for the programming voltage and built in timing. The only thing left is to get the data into the IC and that is usually done by some serial protocol. The most important thing to remember is that such a cheap knockoff / clone programmer either works quite good, or it does not work at all, because the chip does almost everything by itself.I have killed a few programmers in the last 20 years. Mostly by gross abuse such as reversing the supply voltage or putting much to high voltages on their inputs, and that is another reason I like the EUR3 programmers.

author: jpanhalt
author_rank: Super Contributor
timestamp: July 11, 2022, 10:42:29 pm
content: As previously noted, the 12F629 can be programmed with anything Microchip has produced this century and the clones. Unfortunately, prices have skyrocketed. A few years ago, I needed to program an early 16Cxx chip to test a theory regarding a GIE bug. My gen. 3 programmers couldn't do it, so I bought a late version(blackcase) PICStart Plus for less than $20. I checked eBay, and they are all double that now.You are in the US, why not just ask for a volunteer to do it for you? Of course, the hex you provide may not actually work. There would be no guarantees or trouble shooting. I suspect a lot of people here would do it (send them two, 12F629 for safety) without a second though. It has taken me longer to write this reply than to program two chips starting with the hex code.If you plan to continue with Microchip MCU's, then buy a current programmer. I use an ICD3 as my goto. I have a virtually unused PicKit3 sitting in a drawer (original one was defective, while waiting for its replacement, Microchip sold me the ICD3 at a nice discount). That was when you could actually talk to someone at Microchip in Chandler. The main difference I see is the power supply. If the current PicKit 4 has a better power supply, that is what I would get.

author: ledtester
author_rank: Super Contributor
timestamp: July 12, 2022, 02:26:14 am
content: Quote from: Cyber Akuma on July 10, 2022, 08:20:46 pmIs there a reason you have to use this particular chip?I'd look into replacing the brains of the project with an Arduino (like an UNO or Nano). You'll have to re-write the firmware, but it probably wouldn't be that difficult.Advantages of using an Arduino: the IDE is easy to set up, the boards are easy to program and there's a lot of help available (websites and people).Is the project on-line somewhere?

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 12, 2022, 06:44:28 am
content: Quote from: Doctorandus_P on July 11, 2022, 10:20:13 pmThis is all way beyond me. I definitely would not be able to just stick some wires in the Parallel port of my old Pentium 3 and manually send signals/voltages out to program a chip, I would have zero idea how to start out like that, much less making my own programmer. Since I am both trying to learn how to solder properly and follow already-made instructions for some projects, I am going to be lucky if I can manage those without breaking something. For now, I would definitely need something that can program the ICs for me and then verify that they did get programmed correctly instead of making something on my own that I would have no idea or equipment to make sure it worked. Especially since if it doesn't, I would have to troubleshoot if it's even the flashing of the chip, the soldering job, or something else I did wrong. So I would like to remove as many variables that could go wrong from my own incompetence as possible.Quote from: jpanhalt on July 11, 2022, 10:42:29 pmYeah, that's one angle I am also considering, if I can just find someone to do it for me. It would be a waste to buy a chip programmer just for one chip. But depending how well it goes, I have other projects I want to do that would rely on it as well. So I am also considering if I want to just go for it to have it already available for if I do those future projects. But if not I am looking into if I can just find someone to do it for me.Quote from: ledtester on July 12, 2022, 02:26:14 amAs I mentioned, it's from a set of instructions I would be following. There are hex files included for some variations, but the creator of the project I recall mentioned that one of the variations (Specifically the 675 apparently will not work properly for this). I could try asking the creator of the project what alternate ICs I can use.And actually the brains of the project is an Arduino, a Mega 2560 specifically, that IC is just used for a small sub-system.And the wiki for the project is here:https://github.com/sanni/cartreader/wikiIt's a device that can read most of my older console cartridges. I have an older model that has less support and I want to build the upcoming V5 when it's released (Pretty much all versions use that same Arduino and PIC12F629. I use it to backup the data from my cartridges before the SRAM battery dies out.)

author: jpanhalt
author_rank: Super Contributor
timestamp: July 12, 2022, 08:57:08 am
content: The difference between the 12F675 and 12F629 is that the former has A/D peripherals. On the 12675, the analog select (ANSEL) register needs to have bits 0-3 set to zero for digital input.

author: jpanhalt
author_rank: Super Contributor
timestamp: July 12, 2022, 10:33:40 am
content: Quote from: Cyber AkumaI went to that link and didn't find the PIC hex files easily. Can you post a link to the hex file or the actual file here?Do you have any interest in using the 12F675 (Modifying the hex file for that chip would not be too difficult assuming that file can be disassembled to something reasonable.)

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 12, 2022, 10:49:55 am
content: Quote from: jpanhalt on July 12, 2022, 10:33:40 amThe Wiki talks about flashing it here:https://github.com/sanni/cartreader/wiki/Flashing-the-snesCICAnd you can get the files for that here:https://github.com/mrehkopf/sd2snes/tree/develop/cicQuoteSupposedly the 675 does not work well for this:https://forum.arduino.cc/t/rom-reader-for-super-nintendo-super-famicom-game-cartridges/155260/1260Any specific reason you want me to switch the chip out? I would rather just stick to the guide because if it doesn't work it would be hard for me to diagnose if it's because of the chip or because of something else I did wrong since I am new to all of this.

author: ledtester
author_rank: Super Contributor
timestamp: July 12, 2022, 11:04:20 am
content: Quote from: Cyber Akuma on July 12, 2022, 10:49:55 amI would just follow this advice from that page:Quote

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 12, 2022, 11:22:32 am
content: Quote from: ledtester on July 12, 2022, 11:04:20 amI mentioned that before. That considering the PIC12F629 and many other variants seem to be sold out on just about every major electronics site with an estimated restock of a year from now, yet that site claims to have hundreds of them in stock, there is a very good chance they are at best bootlegs and at worst fake or broken.

author: MikeK
author_rank: Super Contributor
timestamp: July 12, 2022, 01:49:51 pm
content: Here's a hex file for the PIC12F675. I only added CLRF ANSEL. No other difference between those two chips. The two other ASM files aren't compiled into hex so I assume you don't need them.Also attached the ASM.

author: jpanhalt
author_rank: Super Contributor
timestamp: July 12, 2022, 03:10:42 pm
content: This morning I had to go into Cleveland and didn't realize the Assembly code had been posted. As you say, compatible 12F675/629 are out of stock. The 12F1840 is in stock. There is more to turn off with that chip and Bank selection is different, but I suspect it can be made to work easily and is pin compatible.If you can't find the 12F629 and really want to give it a go, getting a first version of the code for the 12F1840 would not be hard. I would be reluctant, though, to advise doing that if you do not have a suitable programmer. The prices on eBay for the 12F629 are outrageous.

author: MikeK
author_rank: Super Contributor
timestamp: July 12, 2022, 05:53:01 pm
content: Tayda has both the 629 and 675 in stock, for around $2 each. PDIP package.https://www.taydaelectronics.com/ic-integrated-circuits/microcontrollers/pic12f629-12f629-microcontroller-ic.htmlhttps://www.taydaelectronics.com/ic-integrated-circuits/microcontrollers/pic12f675-12f675-microcontroller-ic.html

author: eugene
author_rank: Frequent Contributor
timestamp: July 12, 2022, 06:03:26 pm
content: Quote from: Cyber Akuma on July 12, 2022, 11:22:32 amIs a few dollars too much to risk? We're talking about something like $5 total for the part, programming service, and shipping. Maybe they aren't real Microchip parts, but maybe they work just fine in this application.

author: Cyber Akuma
author_rank: Regular Contributor
timestamp: July 12, 2022, 07:44:31 pm
content: Quote from: eugene on July 12, 2022, 06:03:26 pmIt's not the risk of money so much that if it's not working I would have a hard time figuring out if it's because something is wrong with the chip or if it's entirely something else.

author: jpanhalt
author_rank: Super Contributor
timestamp: July 12, 2022, 07:55:16 pm
content: Quote from: Cyber AkumaThat is exactly why I think the best path is to program the chip yourself. However, $5 + delay is too cheap to ignore. I would go for it. If it fails, then plan B is to DIY.On a personal note, there was never a question in my mind whether to just burn a hex file and/or have someone do it for me. I like control. To this date for MCU's, the only hex file I just loaded was the operating system for the T-962 reflow oven. That was 18 years after I picked up the hobby.

author: macboy
author_rank: Super Contributor
timestamp: July 17, 2022, 02:17:18 pm
content: I have a pickit 3 and it does what it is designed to do. One very annoying feature is that it has several different firmwares for different series of PIC. If you don't update it then it won't even identify the connected device. At least that was my experience.I have a TL866CS (not II) which I use frequently. I've used it for old parallel programmed PIC devices (e.g. PIC16C54) which can't be used with pickit3. And many EEPROMs, FLASH, AVR micros, and to test some SRAM and logic chips. Very good investment.I also have an old pickit 1. Utterly useless.