IMPORTANT: There is a mistake at 6:21 for the PIC16F1455. The correct PGD/ICPSDAT connection is at pin 10, and the correct PGC/ICSPCLK connection is at pin 9. Pins 12 and 13 are the wrong connection, sorry for the confusion!
@Planet of the Idiots Yeah, but for what controller? And what kind of lines? If you have lots of complicated operations it will be very few lines, and if it's basic stuff it can be a lot of them. But the best part: you can actually download the XC8 compiler and the MPLAB IDE and give it a try yourself, for the controller and code you have in mind :)
I just programmed my PIC18F4550 after 10 years of not touching it. This channel and the website was a lot of help. Very straightforward, very helpful. Thank you.
It is impossible not to note the quality and detailed сompanion articles on the website. It really sets you apart from the similar content makers. Thank you for your work!
Great to see a channel using the PIC. I am a big PIC fan but with the vast array of devices and constant upgrades to the software it can get intimidating for the beginner. Thanks.
@@FriendlyWire I jumped from the 16F887 to the 18F26K20 mostly because I wanted 3.3V. So much functionality I have yet to master! But most of the code can easily be ported. Thanks again.
@@billebrill8730 Yes, there is a lot of PIC controllers out there, and it can be very overwhelming to begin with. Instead of overthinking I always recommend to just start somewhere in order to form a solid basic understanding, and then branch out from there :) My first controller was the PIC16F627A :)
Hi - Thanks for your video. With the power supply error at 10:00 minutes into your video, change the power setting to 4.75V and you can proceed past this self test ok. No external supply needed. 😁
Oh yeah, good idea! It may work sometimes, but usually when the voltage breaks down it means that the PICkit3 cannot supply enough current (and there may be a reason for that, such as a large number of external components). Glad it worked in your case! :)
Mine didn't work initially, even after trying everything you said. It finally worked after placing a resister between the VDD and MCLR, which from my understanding, was not required (newb trying to read datasheet) : using PIC52313
Thank you for sharing, Mike, and I am so sorry that it didn't work for you. (Sorry that I am replying so late, I only now saw your comment.) MCLR does not require any resistor to VDD with ordinary PICs when programmed with the PICkit3. I am having some trouble finding this controller, the PIC52313. Usually the names start with PIC16F or PIC12F, but this one is different. Can you double check the name? I would love to figure out why it didn't work out properly.
Such a great video thank you very much. Question, if the PC is solder to a PCB is there a way to bridge it to reprogramed/flash or this might get issues?.
Thank you, I am glad you found the video helpful! To answer your question: it depends, unfortunately, one what is connected to the controller. If you have a PCB, check if there is a "programming interface" connector or something like that. A lot of production PCBs are designed such that the PIC can be flashed after being soldered, for convenience. If such a pinheader exists, it should be OK to flash it. Hope it helps!
hello Thanks for your helpful tutorial. I want to copy a 44-pin pic16f1937 with the same program and write it on the raw IC. Please advise the program pins and the voltage value. Thanks ❤
In the datasheet (ww1.microchip.com/downloads/en/DeviceDoc/41364B.pdf) it looks like VDD is pin 20, GND is pins 8 and 19, MCLR is pin 1, PGD is pin 28, and PGC is pin 27. Operating voltage is 1.8V-5.5V. Good luck!
Really clear and understandable, A couple question... 1. If you have more than one VDD and VSS, do you have to connect power and GND to all points? 2. If I just want to read the data from one Chip and send the Hex file to another Chip. How can I do that?
Thank you for your kind words! 1. In our case here, all circuits run on one VDD (typically 3V-5V) and there is only one ground potential. All chips are connected to VDD and to ground. If you connect the PICkit3 to such a circuit, then you have to connect the VDD pin of the PICkit3 to the VDD of your circuit (and hence to the VDD of all chips), and to the ground level. In general, you always have to make sure that the PICkit3 is connected to the VDD and ground of the controller you want to program. If your circuit has multiple voltages (say, there is also a 9V rail, and so on) the you have to be careful not to destroy the PICkit3, as it can only tolerate up to 5V. 2. Yeah, you can do that, provided that the chip does not have code protection enabled. Follow the steps in the video, and at 7:30, when you connect the controller, you see the option "Read" (in the same row as the "Program" button). If you click that button, you will be able to read out the current .hex-file that the microcontroller uses. The IPE will then ask you where to store that .hex-file, and then you can use that .hex-file and send it to other controllers, too. Hope that helps, let me know if you have more questions, and thank you again for your interest! :)
@@FriendlyWire Thank you for your prompt response. I did as you suggested but when I press the Read tab in the IPE it just say read successful and does not ask me to save it anywhere. I am using PicKit 4. I also enable the Pickit to supply the 5 volts. Any ideas? The Chip that I am using is a PIC16F877-20I/P
THANKS, for my case I use the pickit2 software and that the pic 18f8680 is soldered on the electronic card and I have a 5 pin connector on the card for programming. THANKS @FriendlyWire
Sorry for my late reply! I am not sure what went wrong... It could be a lot of things: wiring, unstable power supply, a bug in the code itself perhaps, a loose connection somewhere, or a USB port that cannot supply enough power. We would have to narrow it down some more. Did your setup work in the past, and not stopped working? Or is this the first time you are setting things up? (You can also get clones of the PICkit3 online, they are not so expensive as the newer PICkit4, and they work great.)
Thank you! I am using the XC8 compiler which you can download for free from the Microchip website. All the programs I write are on www.friendlywire.com, I always include them with the projects :)
one more question on some other Topic, how and from where to get and download different supporting library's for PIC microcontroller ? e.g LCD library or I2c , or RS485 I mean any library
Libraries are not so common with PIC controllers; the reason is that each PIC controller is different. You can search for what you want to do, say, control an LCD. When you find a project online for a specific PIC you can usually use it easily yourself for the same PIC. For really advanced topics, such as SD card memory management or USB stuff you find some libraries, but for simpler stuff you probably have to code your own. I think of it as an advantage (long term) because it really teaches you how to code, but for beginners it can be frustrating. Do you have anything in mind, in particular? I would recommend to get started with a simple project, maybe one from this channel, and then take it from there :)
Hi, kindly advice the followings. I fit capacitors on the rails RA7 and RA6 with a quartz oscillator, it lights up the LED on RB3. What if I change the nF value of capacitor? what if I put a polarity capacitor instead? Thx.
My goodness, I just saw this comment from 2 months ago. Sorry to be so late to the party, and thank you @advanceinkscape8494 for your perfect answer. Also, besides what was already said, usually you need to check the datasheet of your crystal and it will tell you what its "load capacitance" is. Say it's 10pF. Then, if you ignore stray capacitance, you can usually take each capacitor to be twice that value, so: 20pF each, or, as was pointed out above, 22pF would also do the trick. Also, a lot of PICs allow you to use an internal oscillator, in which case you don't need an external crystal and capacitors at all.
Really good Video but I just wanna know if you can programm any microcontroller like from other companies with the same software and the Pick it 3 or just PIC's?
Thanks, glad you like it! This video only works for PIC microcontrollers and ATmega controllers, here is a list: pic-microcontroller.com/pickit-3-supported-devices/
Hi, thanks for your video, it made me understand many things.. I have a .bin file of a USB module, is a motherboard gamepad, the board has a PIC18 chip etc.. I have the manufacturer's firmware file , I would like to be able to open it to modify it, how can I do it ?
Hey there, I am glad you found my video helpful! I am not sure how do to what you have in mind, I am sorry. Most likely the manufacturer has code protection enabled. But even if you can get access to the code, it will not be in C, but machine code, which is much harder to read for us humans. Do you have experience in hardware?
@@FriendlyWire Thanks for the answer, yes, I have experience, but when I open the binary I find: 5!`¤*4$ óÖX›Ñ ‹ìxœï› Ó>к½p, :-(... I just can't figure out what language this is. i tried all possible converters to extrapolate to C or other, but nothing,. , this file is loaded on the electronic card via USB, using a software: HIFlash.. :-(
@@fedeyoutub Try opening this with a hex editor instead, it may be more suitable. But it's probably just machine code for your device, so it will be difficult to convert it back.
Hi Stuart, thanks for your kind words! Sorry, I have no videos on the PIC10F200. The chips I use most frequently are the PIC16F1455, PIC16F627A, and the PIC16F883.
@@sanjaybatra6593 If you have the .hex-file that is compiled for your PIC then you can definitely send it with the MPLAB IPE. The C code may be different for different compilers (XC8 in this case, but there are many others) but the .hex-file will always be the same :)
Hello. I am using Pickit3 for programing my PIC18F45K42. I have a problem with LED blinking. In code i set the while loop to bling the diode 5 times, but it keeps blinking forever. Does it something has to do with configuration bits of PIC18F45K42 or is something wrong with connections and my microchip maybe is resetting nonstop ?
Thank you for this video. Unfortunately MPLABX IPE V5.25 can't connect to the programmer (pickit3). I tried with an external power supply without success. The same programmer works fine with the standalone application pickit3 v.3.10.
That is strange---although PICkit3 is no longer officially supported, I am using it every day with the newest release of MPLAB IPE. Can you share a screenshot? You can reach me on social media (links in description) or via email (at the bottom of www.friendlywire.com) so we can get this sorted out :)
@@FriendlyWire Thank you for your reply. Meanwhile, the problem is resolved, thanks to this video: th-cam.com/video/vfmLu6XzBtw/w-d-xo.html. In brief - pickit3 had to be switched to MPLAB mode, either through the standalone application or by holding pressed the button, while usb plug-in.
@@ecotronic6622 That is so interesting---I never had to do anything to my PICkit3 to make it work with the IPE. Thanks for sharing, this is good to know!
hello i have an issue, i am following this project exactly as the video shows, but instead of a 16f627 im using a 628. which from what ive seen online are basically the same. my issue is that the led is turning on, however it is not flashing.
I think the default password is "microchip" in the advanced settings, it should say somewhere in the window. I think the MPLAB IPE works with the PICkit 3.5, have you tried it?
Hey there! I think this would best be accomplished with an array, where you store the 8-bit values of your sine-function. Do you also need negative voltages?
Yes, if the code protection bit is turned off by whoever flashed the PIC, it's possible. Just connect it as shown in the video until 8:17, but then click on "Read" and the PICkit will attempt to read out the PIC's memory and retrieve the .hex-file, if possible. Hope it helps!
Hello. I have seen this video a lot of times and I have made the same "Blinking" program as you and it works OK... BUT when I place the PIC16F627A in my Breadboard and turn on 5 Volt it seems very unstable. The diode is blinking one seequence and the stops but if I touch the PIC chip it turns ON and sometimes the diode just goes ON and stops again and other times the seequence is running. It seems that the chop is sensitive for my fingers... The PIC chip is only connectet to pin 5 for GND pin 14 is +5V and pin 9 RB3. Should I connect all the unused pins to ground or what could I do to make the system more stable??
Thanks for your question, and I am glad it's mostly working already! Have you tried adding a 100uF capacitor and a 100nF capacitor in parallel to the battery? This should help stabilize things.
@@FriendlyWire Thanks a lot... that solved my problem...Fantastic. I will go on learning programming PIC's. Are you still making video clip of programming PIC's?
@@oveschleisner-meyer8139 Fantastic indeed, congratulations! Yes, I am still making videos, but it takes me some time to get them finished. Check out my Twitter @FriendlyWire where I post updates on the new projects :)
Of course, those are good starting points. Switching an LED: th-cam.com/video/e4Q2dYVedPY/w-d-xo.html Reading a voltage with an ADC: th-cam.com/video/AlpbbeX7-BU/w-d-xo.html
How about 12c508/p 04 HAM modchip???? I need digram point for it GND VDD all 8 pin i have k150 programmer and it give error recived data about reset play...
Looks to me that VDD is pin 1, GND is pin 8, MCLR is pin 4, PGD is pin 7, and PGC is pin 6. Check out table 3-1 in here: ww1.microchip.com/downloads/en/DeviceDoc/40139e.pdf Hope it helps!
Thank you for your kind words :) Yes, it is probably doable, since you just need the three wires MCLR (Master Clear), PGD (Program Data), and PGC (Program Clock). But I am not an expert on doing this. If you search on Google for "homemade PIC programmer" I am sure you will find many helpful resources!
@@FriendlyWire alternative of a pickit3 for "ICSP (in circuit system programming) there's a way of directly connecting a PC serial port to the RB6/RB7 and uses a few components including a 12 V keyfob battery for the VPP. Has to use a real hardware rs232 serial port, a PC with usb adaptor is too slow to work.
@@jagmarc Yup, good point! Older development boards used to use that method, check out the Velleman K8048 that I list on my website here: www.friendlywire.com/articles/gear/#ch5 . I have found these types of programmers to not work as reliably as the USB ones, though.
@@FriendlyWire where are you serving your website from? I see you have a domain name. When my device connected the connection didn't upgrade itself to a https . I guess you're missing a setting on your .httaccess file or cPanel configuration
could you explain to me why when I read the source code of the 18f8680 microcontroller and I write it a second time on the same pic the program does not work knowing that I use the pickit2 Thanks a lot
It's a good question, and things like this can be very frustrating, I have been there. I tried to find out of the MPLAB IPE supports the PICkit2, but I could not find it either on the official website or in the manual. I assume that it shows up in the IPE under "tool"?
THANKS, for my case I use the pickit2 software and that the pic 18f8680 is soldered on the electronic card and I have a 5 pin connector on the card for programming. THANKS@@FriendlyWire
Great video!! I have an issue with one PIC from one of my clients. Somebody erase the PIC´s model on the chip, and I don´t the model to read the program. Any tips to do an auto recognition? Thnx
Thank you, Alonzo, glad you like the video! :) I am not aware of auto recognition, but usually the MCLR/PGD/PGC lines are at the same place given a package size. How many pins does the PIC have?
@@AlonsoCorrales In that case I would just try the pinout of the PIC16F627A (friendlywire.com/tutorials/touch/PIC16F627A-datasheet.pdf). MCLR at pin 4, PGD at pin 13, PGC at pin 12, VDD at pin 14, and VDD at pin 14. Then you can make a list of all 18-pin PIC's and try them out by selecting them in the MPLAB IPE, and see if it connects properly.
I have a pic16f689 IC that has been programmed, and I want to copy it, but after I open it, it turns out the data is protected, how do I open the data protection without destroying the data that has been programmed?
Unfortunately, if the data protection bit has been set, you cannot extract the data using the PICkit. That's why I never set it on my projects, just in case I ever need to clone a PIC and I no longer have the .hex-file.
You need some sort of device for that. There are other options out there, including kits that use the serial connection from back in the day, but I find the PICkit3 or similar devices to be the easiest choice.
Hi. Nice video. Is there a way to save the settings so that you don't have to re enter them every time you start IPE? I tried saving the "environment", then importing it the next time I used IPE, but the saved settings didn't come in. Thanks!
Fantastic! It seems to have everything covered. I did not know the password to get into the advanced mode, it seems silly to need one. I thought I had to set something up with Microchip, I really don't like registering for everything I use. Thanks Jens, take care :)
Thank you, Jerry. I think they added the password (that can also be changed) so that it is possible to prevent a user from switching into the advanced mode. I can imagine that in schools or university labs instructors want students to use the default mode instead.
Follow the steps after 7:00. Connect to your PIC, and then click on "read." Then click on File -> Save As, and you can save the .hex code onto your computer. If "code protection" has been enabled, then it won't be possible to extract the .hex-code like this, however. Hope it helps!
Hello. Thanks for posting this video. I stumbled across it and wondered if this device maybe the answer to my problem. I have a motherboard on which the bios has failed due to my own stupidity as to how I flashed the chip (Winbond W29C020-12 32 pin 2mbit) whilst the onboard button battery was dead. I then flashed it a 2nd time and wrote over the back up (duhhh). The consequence is that the board cannot see a floppy drive or even a non accelerated ISA VGA card. The motherboard company are no longer around, but I have the bios on a floppy disk in the form of a .bin file which suggests the file is hexadecimal in nature. Would the mplab software be able to view this type of file in order to 'flash' it directly to the chip? Thanks.
Thank you for your message, John. I don't think the PICkit3 will be useful for that, since "out of the box" it only interfaces with PIC microcontrollers. It may be possible to write your own PICkit3 firmware, but I am out of depth at that question. I think at www.reddit.com/r/AskElectronics/ you may find people who know how to do that. Good luck, and sorry I could not be of more help, I hope you will find a solution!
Thanks for the question! Can you share more details? You can also contact me on social media @FriendlyWire if you want to send a screenshot. Happy to help!
Hi. Great video. For us latecomers, I notice that the latest MPLAB IPE v6.10 (Directed to the download site on your FriendlyWire website) no longer supports the PICKiT 3!!. I found out the hard way. Will uninstall and go back a version or two. Thank you
Thank you for your feedback, I was not aware of that. I am traveling right now, but I will check this on my system when I get back. It would be a real shame, since the PICkit3 is cheaper and just perfect for hobby applications, no need for the much more expensive PICkit4 in my opinion. Thanks again!
@@FriendlyWire Hi. Got it wrong! You can use the PICKit 3 with v6.1.0!! You have to download extra packs which includes support for the ‘3’ So we can breathe again👌
Thanks for the question! The Z86E3116PSC is a Zilog microcontroller, not made by Microchip. For that reason, unfortunately, we cannot use the PICkit to program it.
This is very good info and has got me 95% toward the end of my project. I think...But what do we do when some of the 8 pins on my PIC12LF1822 are labeled differently. It has a Vdd and Vss as 1&8 pins resp. but other pins are labeled RA0 to RA5. Am I off track now or can RA0-RA5 be used? Thanks for the interesting video.
Thanks for the nice comment, Chris, I am so glad my video was helpful! :) Can you send me a link to your datasheet? I am happy to help! //edit: Nevermind, found it (ww1.microchip.com/downloads/en/devicedoc/40001413e.pdf)! Look at table 2 on page 3 :) It looks like PGD is RA0/pin 7; PGC is RA1/pin 6, and MCLR is RA3/pin 4. Hope that helps!
@@FriendlyWire Hey Jens, after many days of delay I got around to programming my PIC today and it went very smooth and programmed successfully. Thanks again for your easy to follow directions and help.
I typically do not offer paid services, but feel free to reach out to me via email (at the bottom of my website www.friendlywire.com) and if it is only a slight change then I can do it for free :)
Thank you Jens! I ordered everything that you used, so I should be receiving everything soon, and please, at least let me buy you a nice dinner via PayPal. Okay? I'll try my best to learn on-my-own, but if not, Bon appétit! : - ) LOL!
@@FriendlyWire You'll definitely be the first to know. : - ) Also, just curious to know, how difficult would it be to add a sfx, (press/beep) with the obvious peripherals added on to the breadboard? Is this thought of mine even in the realm of possibility?
@@thejoeblowshow I am sure you could add a piezo speaker to the mix (and probably a transistor and some passives to drive it properly), but I have actually never worked with those before.
im having this error: Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device. please help i even changed pics already and tried another compiler
@@FriendlyWire i got the cyan brick thing that connects all the pins already , and it did tell me that the pic is not powered but i fixed that error already using the ipe power section, but i still get the id error
@@cubirk Can you send me a picture of the setup? You can find my email at the bottom of www.friendlywire.com . It's quite common to get these errors, we will figure it out :)
@@cubirk Thank you, I got your email! I will look at it today so we can figure it out. It's quite common to have these problems when setting things up, so I am confident we can solve it. :)
Hey Ganesh, thanks for the question! For measuring AC voltages I would definitely recommend to use some sort of galvanic isolation, like an optocoupler. AC line voltage with 50Hz is rather slow compared to the MHz resolution you can get with PIC microcontrollers, so it would be relatively simple to detect a zero crossing. But I am not sure if I understand the rest of your question, can you explain more? :)
hi could you give me a hand .. I have a file that I uploaded via axe027 cable in a pic18f14k22 the file has the extension .AXE I would like to convert it into a .HEX file to be sent with Pickit 2 you can do it.
Finally, after many years, i'm able to program a 16F84A, many thanks to you. Now, i'm trying to read ad program EEPROM 24C02 but it seems doesn't work... any suggestion? Thanks again! p.s. New sub!
Hello Davide, thank you for sharing, I am so glad to hear that and it means a lot to me! I have not covered EEPROMS yet, but hopefully I will do so in a future video. Thank you for the suggestion :)
Oh, that's not good. Can you send a photo of your setup? (My email is at the bottom of www.friendlywire.com, and you can also message me on Twitter or Instagram)
Follow the steps after 7:00. Connect to your PIC, and then click on "read." Then click on File -> Save As, and you can save the .hex code onto your computer. If "code protection" has been enabled, then it won't be possible to extract the .hex-code like this, however. Hope it helps!
You can find unofficial copies of the PICkit online, they cost much less. Also there are some circuits proposed by hobbyists that can get the job done, but I have never used those. What is your budget for a programmer, and where are you located? Maybe we can find one for you :)
@@shrikantnikam2426 You can try searching for PICkit3.5, this is a popular third-party programmer that works well in my experience. Especially if you want to stay with PIC controllers it may be a good one-time investment. There are also older programmers that use the serial port to program PICs directly, but they do not work as reliably I find; one of these you can see here on my website: www.friendlywire.com/articles/gear/#ch5
Hey John, thanks for the question! I have actually been working on a project like this for some time using a phase-locked loop (PLL) but got stuck in the analog electronics part of signal amplification to make it work reliably... I hope to get back to it soon! :)
Did you find the datasheet for the PIC18F4550? MCLR is pin 1, PGD is pin 28, and PGC is pin 27. You can connect VDD at pin 20, and ground at pins 8 and 19. For anything else you just need to replace "PIC16F627A" in the tutorial above with PIC18F4550. Does it work? Let me know, I am happy to help more.
Hey Adam, thanks for the question! I am not sure what you mean by check, but the MPLAB IPE does indeed support the PIC18F2420, so you could connect it to the PICkit. For the PIC18F2420, MCLR is at pin 1, PGD at pin 28, PGC at pin 27, VDD is at pin 20, and GND is at pins 8 and 19. (See the datasheet here: ww1.microchip.com/downloads/en/DeviceDoc/39631E.pdf ). Let me know if that helps! :)
I mean, I have one pre -programmed PIC microcontroller and another that has not been programmed. So my question is can I copy or re -read the code from a pre -programmed PIC microcontroller and re -copy the program and transfer it to another PIC controller
@@adamismaad9604 Yes, if the original PIC does not have code protection enabled you can read out the .hex-file. Look at 7:30 in the video. You can click on "read" and then you can download the existing .hex-file. Then, if you click on File -> Save As you can save this retrieved .hex-file, and then send it to any other PIC you want.
Thank you for your tutorial. Well done! - But the resume to your title "how to get source code onto a PIC microcontroller" is: not at all. The controller can only execute machine code.
Thank you! And yes, that's really the only way to think about it. But I decided to title the video like this because as a beginner I always thought that the actual code would be stored on the microcontroller. I hope the title did not make the video confusing :)
@@mohomadashad4641 You need to physically connect the controller to the computer to transfer the code. The PICkit3 is one possible solution, there are other adapters as well. But you will always need one of these adapters.
I am not sure if the PICkit2 is still supported by the current versions of MPLAB :( But the PICkit3 still is, for now, and you can get clones (sometimes called PICkit3.5) on Amazon and other sites for around $20. I know it's super silly that they keep making new programmers, since for these simple PICs the old ones work just fine...
For now, all my tutorials have companion articles where I explain the source code in detail. I am thinking of making videos just about the programming as well, kind of like this one here: th-cam.com/video/I6m_DTDsE4U/w-d-xo.html . Is that what you have in mind? :)
program memory: start address = 0x0, end address = 0x7ff configuration memory program memory Address: 0 Expected Value: 120a Received Value: 3fff Failed to program device I cant find what is the problem in pic16f877a
This looks like a data transmission error, most likely the cables are not connected properly, it happens sometimes. If you have a picture, you can send it to me on Twitter or Instagram @FriendlyWire and we can figure it out :)
Thank you for your interest! But I am sorry, I don't have enough time to help with individual projects, unless it is something that is very closely related to one of the videos, hope you understand. What is is about? :)
maybe the title of the video should be "how to send source code to a PIC". i must admit i clicked the video thinking it was "how to get..." as in "how to obtain..."
Title is wrong! You don't get source code into a micro! Only machine language or hex files can be sent to program a PIC micro. Anyway it's a useful video! From Chennai city, India.
True, the source code is first compiled into something the PIC understands, and then that .hex-file is transferred to the PIC. I chose this simpler title to make the video more understandable to beginners, but I don't think it will confuse anyone, because if you watch the video you see that I explain it exactly like this :)
Good question! It is impossible to obtain the C code from the PIC, all you can do is get the .hex-file. At 6:54, if you are connected to the PIC, you can click on "read" and that reads out the program memory, if it is not protected. The reason you cannot download the C code directly is this: it doesn't exist on the controller. C code only exists for us as a tool, but before it gets onto the controller it is compiled into the .hex-file. Hope this helps! :)
@@FriendlyWire that is fine. If I can get the hex code, I can then download it to other PICs to duplicate the same function, correct? Also, if the PIC in my equipment had the part number removed by the manufacturer, how do I figure out which one it is? I have the schematics of the board and all pin outs.
@@MrWatlow Yes, the .hex-file is all you need. There are many PICs with the same packages, but their connections PGD/PGC/MCLR tend to be at the same place for all PICs in a given package. But you still have to know what PIC it is. You can try this: maybe you think it's a PIC16F627A. Configure your MPLAB IPE to PIC16F627A and try to connect the PICkit3 to that mystery PIC. If it works, it's a PIC16F627A, if it doesn't, you have to keep trying.
@@FriendlyWire good day here is only a video about flashing LEDs...this is not enough for beginners-I don't understand enough either.I have one project and I want to ask if you will help me?
@@roman_m Hey Roman, you can check out the other videos on my channel (as well as the articles on www.friendlywire.com) and that should definitely get you started with PIC microcontrollers. But I agree, there is always more to talk about! What is your project about?
Hello my friend. I have a microchip PIC 24F 16KA 102-I/SS e3 1845 CAB. it has been placed inside an inverter.Now for reasons well understood the constructor of the inverter is not willing to give me the programm of it or even send me one [to buy of course ] programmed one.He presses me to buy a new inverter around 450 $.I think is totally unfair and i would call this seller a Big Thief.I dont mention more.But i say this.I have already bought pick it 3,5 programmer.Is there a hope i can do something??and what about if it is encrypted??And my last question.How does the ministry of commerce of each country allow these thieves for a Pic chip of 2 euro cost to force you to spend another 450$ ???Thank you for your time.....Respect to your work my friend.
I am sorry this is so expensive... It seems a bit extreme, to be sure. If the developer has not activated "code protection" you can read out the .hex-file with the PICkit3. But I am sure they enabled the code protection using the configuration word of their PIC, which is what companies can do to protect their intellectual property. In this case it is not possible to get the .hex-file from the PIC.
I guess the answer is YES, since this channel exists ;-) I like to use them for the type of projects and applications I share on this channel, but there are of course other alternatives. I like to program them in C, since you learn a lot about how registers work, and how the hardware is configured. But you have to choose what you like best, of course :)
@@FriendlyWire i have just tested some PICs with this PICKIT3, and I must say it's a very hard time finding a working version of IDE/IPE to actually let you connect the device. I eventually had to use MPLAB X IDE 6.20 + Standalone PICKIT3 Programmer 3.10 to completely control over this. I think PIC / PICKIT3 are very obsolete technology nowadays that Microchip doesn't even bother to maintain correctly.
I am only using the XC8 compiler, and that specific dialect for PIC microcontrollers. Is there anything in C++ that you would like to do that is cumbersome or difficult in the XC8 language?
IMPORTANT: There is a mistake at 6:21 for the PIC16F1455. The correct PGD/ICPSDAT connection is at pin 10, and the correct PGC/ICSPCLK connection is at pin 9. Pins 12 and 13 are the wrong connection, sorry for the confusion!
@Planet of the Idiots Happy to, but an update on what?
@Planet of the Idiots Yeah, but for what controller? And what kind of lines? If you have lots of complicated operations it will be very few lines, and if it's basic stuff it can be a lot of them. But the best part: you can actually download the XC8 compiler and the MPLAB IDE and give it a try yourself, for the controller and code you have in mind :)
I just programmed my PIC18F4550 after 10 years of not touching it. This channel and the website was a lot of help. Very straightforward, very helpful. Thank you.
That's amazing, congratulations, and thank you for your kind words!
Hlw I've something to ask
So your PIC survived 10 years in the closet ? that's impressive.
It is impossible not to note the quality and detailed сompanion articles on the website. It really sets you apart from the similar content makers. Thank you for your work!
Wow, thank you so much! :)
Great tutorial, very understandable. I'm a greenhorn. I've been struggling with MCU orientation for weeks. Now I get it, all in one video.
Thank you so much, I am glad you find this video helpful! :)
Great to see a channel using the PIC. I am a big PIC fan but with the vast array of devices and constant upgrades to the software it can get intimidating for the beginner. Thanks.
Hey Bill, glad you like the video! Yes, there are so so many PICs out there, which is why I focus on just a few of them in my videos :)
@@FriendlyWire I jumped from the 16F887 to the 18F26K20 mostly because I wanted 3.3V. So much functionality I have yet to master! But most of the code can easily be ported. Thanks again.
@@billebrill8730 Yes, there is a lot of PIC controllers out there, and it can be very overwhelming to begin with. Instead of overthinking I always recommend to just start somewhere in order to form a solid basic understanding, and then branch out from there :) My first controller was the PIC16F627A :)
Thank you so much.
Very useful.
Clear, simple to follow, and direct to the point.
Thank you for your kind words, I am glad you found it useful!
High quality stuff, soon you'll be big! Can't wait to see what you have in store for us.
Thank you for your kind words, Mohit! All the best wishes :)
Hi - Thanks for your video. With the power supply error at 10:00 minutes into your video, change the power setting to 4.75V and you can proceed past this self test ok. No external supply needed. 😁
Oh yeah, good idea! It may work sometimes, but usually when the voltage breaks down it means that the PICkit3 cannot supply enough current (and there may be a reason for that, such as a large number of external components). Glad it worked in your case! :)
Awesome video, just chose a pic10f200 as my first microcontroller to play around with, this will be real useful ^^
Glad you found it helpful, and have fun! :-)
Just the info I'd been looking for.
Thanks 👍
Glad you found the video helpful! :)
Good clear and easy understanding tutorial... thanks a lot...
Glad you like it, thank you so much!
Mine didn't work initially, even after trying everything you said. It finally worked after placing a resister between the VDD and MCLR, which from my understanding, was not required (newb trying to read datasheet) : using PIC52313
Thank you for sharing, Mike, and I am so sorry that it didn't work for you. (Sorry that I am replying so late, I only now saw your comment.) MCLR does not require any resistor to VDD with ordinary PICs when programmed with the PICkit3. I am having some trouble finding this controller, the PIC52313. Usually the names start with PIC16F or PIC12F, but this one is different. Can you double check the name? I would love to figure out why it didn't work out properly.
Such a great video thank you very much. Question, if the PC is solder to a PCB is there a way to bridge it to reprogramed/flash or this might get issues?.
Thank you, I am glad you found the video helpful! To answer your question: it depends, unfortunately, one what is connected to the controller. If you have a PCB, check if there is a "programming interface" connector or something like that. A lot of production PCBs are designed such that the PIC can be flashed after being soldered, for convenience. If such a pinheader exists, it should be OK to flash it. Hope it helps!
You save me a couple hours or maybe days . Thanks.
Thank you, happy to help! :)
Great Video Tutorial. PIC programming is my favourite.Thanks.
Thank you, Sudara, I am happy you like it! :)
hello Thanks for your helpful tutorial. I want to copy a 44-pin pic16f1937 with the same program and write it on the raw IC. Please advise the program pins and the voltage value. Thanks
❤
In the datasheet (ww1.microchip.com/downloads/en/DeviceDoc/41364B.pdf) it looks like VDD is pin 20, GND is pins 8 and 19, MCLR is pin 1, PGD is pin 28, and PGC is pin 27. Operating voltage is 1.8V-5.5V. Good luck!
Really clear and understandable, A couple question... 1. If you have more than one VDD and VSS, do you have to connect power and GND to all points? 2. If I just want to read the data from one Chip and send the Hex file to another Chip. How can I do that?
Thank you for your kind words!
1. In our case here, all circuits run on one VDD (typically 3V-5V) and there is only one ground potential. All chips are connected to VDD and to ground. If you connect the PICkit3 to such a circuit, then you have to connect the VDD pin of the PICkit3 to the VDD of your circuit (and hence to the VDD of all chips), and to the ground level. In general, you always have to make sure that the PICkit3 is connected to the VDD and ground of the controller you want to program. If your circuit has multiple voltages (say, there is also a 9V rail, and so on) the you have to be careful not to destroy the PICkit3, as it can only tolerate up to 5V.
2. Yeah, you can do that, provided that the chip does not have code protection enabled. Follow the steps in the video, and at 7:30, when you connect the controller, you see the option "Read" (in the same row as the "Program" button). If you click that button, you will be able to read out the current .hex-file that the microcontroller uses. The IPE will then ask you where to store that .hex-file, and then you can use that .hex-file and send it to other controllers, too.
Hope that helps, let me know if you have more questions, and thank you again for your interest! :)
@@FriendlyWire Thank you for your prompt response. I did as you suggested but when I press the Read tab in the IPE it just say read successful and does not ask me to save it anywhere. I am using PicKit 4. I also enable the Pickit to supply the 5 volts. Any ideas? The Chip that I am using is a PIC16F877-20I/P
@@Electrolab28Ag Oops, my bad. I think after the read you have to click on File -> Export and save it this way. Does it work for you? :)
@@FriendlyWire I am out of the workshop today, buy once I get back and I'll try iy and let you know.
@@Electrolab28Ag Yeah, let me know if it works!
THANKS,
for my case I use the pickit2 software
and that the pic 18f8680 is soldered on the electronic card and I have a 5 pin connector on the card for programming.
THANKS @FriendlyWire
Sorry for my late reply! I am not sure what went wrong... It could be a lot of things: wiring, unstable power supply, a bug in the code itself perhaps, a loose connection somewhere, or a USB port that cannot supply enough power. We would have to narrow it down some more. Did your setup work in the past, and not stopped working? Or is this the first time you are setting things up? (You can also get clones of the PICkit3 online, they are not so expensive as the newer PICkit4, and they work great.)
Nice video. Can you provide any link to PIC programming language libraries / headers etc.
Thank you! I am using the XC8 compiler which you can download for free from the Microchip website. All the programs I write are on www.friendlywire.com, I always include them with the projects :)
one more question on some other Topic, how and from where to get and download different supporting library's for PIC microcontroller ?
e.g LCD library or I2c , or RS485 I mean any library
Libraries are not so common with PIC controllers; the reason is that each PIC controller is different. You can search for what you want to do, say, control an LCD. When you find a project online for a specific PIC you can usually use it easily yourself for the same PIC. For really advanced topics, such as SD card memory management or USB stuff you find some libraries, but for simpler stuff you probably have to code your own. I think of it as an advantage (long term) because it really teaches you how to code, but for beginners it can be frustrating.
Do you have anything in mind, in particular? I would recommend to get started with a simple project, maybe one from this channel, and then take it from there :)
Hi, kindly advice the followings. I fit capacitors on the rails RA7 and RA6 with a quartz oscillator, it lights up the LED on RB3. What if I change the nF value of capacitor? what if I put a polarity capacitor instead? Thx.
My goodness, I just saw this comment from 2 months ago. Sorry to be so late to the party, and thank you @advanceinkscape8494 for your perfect answer.
Also, besides what was already said, usually you need to check the datasheet of your crystal and it will tell you what its "load capacitance" is. Say it's 10pF. Then, if you ignore stray capacitance, you can usually take each capacitor to be twice that value, so: 20pF each, or, as was pointed out above, 22pF would also do the trick.
Also, a lot of PICs allow you to use an internal oscillator, in which case you don't need an external crystal and capacitors at all.
Really good Video but I just wanna know if you can programm any microcontroller like from other companies with the same software and the Pick it 3 or just PIC's?
Thanks, glad you like it! This video only works for PIC microcontrollers and ATmega controllers, here is a list: pic-microcontroller.com/pickit-3-supported-devices/
@@FriendlyWire Thanks
Hi, thanks for your video, it made me understand many things.. I have a .bin file of a USB module, is a motherboard gamepad, the board has a PIC18 chip etc.. I have the manufacturer's firmware file , I would like to be able to open it to modify it, how can I do it ?
Hey there, I am glad you found my video helpful! I am not sure how do to what you have in mind, I am sorry. Most likely the manufacturer has code protection enabled. But even if you can get access to the code, it will not be in C, but machine code, which is much harder to read for us humans. Do you have experience in hardware?
@@FriendlyWire Thanks for the answer, yes, I have experience, but when I open the binary I find: 5!`¤*4$ óÖX›Ñ ‹ìxœï› Ó>к½p, :-(...
I just can't figure out what language this is. i tried all possible converters to extrapolate to C or other, but nothing,. , this file is loaded on the electronic card via USB, using a software: HIFlash.. :-(
@@fedeyoutub Try opening this with a hex editor instead, it may be more suitable. But it's probably just machine code for your device, so it will be difficult to convert it back.
Hi I love you videos. But did you do some video on the pic 10f200. I thought I saw some on your channel. Thank you again
Hi Stuart, thanks for your kind words! Sorry, I have no videos on the PIC10F200. The chips I use most frequently are the PIC16F1455, PIC16F627A, and the PIC16F883.
thanx a lot for nice video. I have a question , if the code has been written through mikroC....... Still it will work ?
Thank you, Sanjay! Can you send me a link to that compiler?
I am sure HEX file will be same generated by MPLAB or MikroC.......but still want the clear my doubt.
@@sanjaybatra6593 If you have the .hex-file that is compiled for your PIC then you can definitely send it with the MPLAB IPE. The C code may be different for different compilers (XC8 in this case, but there are many others) but the .hex-file will always be the same :)
Amazing. You helped me a lot. Thank u very much bro!
Thank you so much, Fabricio, I am glad you found my video helpful!
Hello. I am using Pickit3 for programing my PIC18F45K42. I have a problem with LED blinking. In code i set the while loop to bling the diode 5 times, but it keeps blinking forever. Does it something has to do with configuration bits of PIC18F45K42 or is something wrong with connections and my microchip maybe is resetting nonstop ?
It's probably because everything is enclosed in a loop like this:
while(1) {
// your LED stuff
}
Can you share your code?
WISH I HAD FOUND THIS CHANNEL EARLIER
Thank you so much, Mariam :)
Thank you for this video. Unfortunately MPLABX IPE V5.25 can't connect to the programmer (pickit3). I tried with an external power supply without success. The same programmer works fine with the standalone application pickit3 v.3.10.
That is strange---although PICkit3 is no longer officially supported, I am using it every day with the newest release of MPLAB IPE. Can you share a screenshot? You can reach me on social media (links in description) or via email (at the bottom of www.friendlywire.com) so we can get this sorted out :)
@@FriendlyWire Thank you for your reply. Meanwhile, the problem is resolved, thanks to this video: th-cam.com/video/vfmLu6XzBtw/w-d-xo.html. In brief - pickit3 had to be switched to MPLAB mode, either through the standalone application or by holding pressed the button, while usb plug-in.
@@ecotronic6622 That is so interesting---I never had to do anything to my PICkit3 to make it work with the IPE. Thanks for sharing, this is good to know!
Would you like to give me advice about visual IDE ?
I used visuino
Do you have a link to that one? I don't think I have ever used it, but it sounds interesting!
Excellent explination.
Thank you, glad you like the video!
hello i have an issue, i am following this project exactly as the video shows, but instead of a 16f627 im using a 628. which from what ive seen online are basically the same. my issue is that the led is turning on, however it is not flashing.
Thanks for your interest and for your question! When you set up the project etc. did you select the PIC16F28A as a device?
@@FriendlyWire yes i selected PIC16F628, maybe this issue is something to do with the internal clock?
@@djt3934 Yes, it could be that. Can you send me your code to my email (at the bottom of www.friendlywire.com) and I will have a look at it :)
Sir , mpli ixe in advance settings which password use??
Microchip ic read and save which software best for pickit3.5?
I think the default password is "microchip" in the advanced settings, it should say somewhere in the window. I think the MPLAB IPE works with the PICkit 3.5, have you tried it?
Hi dear. Its an excellent tutorial. How can I implement sine function for 8 bit PIC microcontroller. Please reply. Thanks.
Hey there! I think this would best be accomplished with an array, where you store the 8-bit values of your sine-function. Do you also need negative voltages?
@@FriendlyWire Thanks. What you suggested, is more efficient solution.
@@FriendlyWire no negative voltages
@@imtiazhussain5027 If you don't need negative voltages then it is really the easiest solution I can think of :)
Your explanation above is great. thanks.
Thank you very much, I am glad you like it! :)
Is it possible to get the hex code from pic ic where it was flashed earlier.
Yes, if the code protection bit is turned off by whoever flashed the PIC, it's possible. Just connect it as shown in the video until 8:17, but then click on "Read" and the PICkit will attempt to read out the PIC's memory and retrieve the .hex-file, if possible. Hope it helps!
Hello. I have seen this video a lot of times and I have made the same "Blinking" program as you and it works OK... BUT when I place the PIC16F627A in my Breadboard and turn on 5 Volt it seems very unstable. The diode is blinking one seequence and the stops but if I touch the PIC chip it turns ON and sometimes the diode just goes ON and stops again and other times the seequence is running. It seems that the chop is sensitive for my fingers... The PIC chip is only connectet to pin 5 for GND pin 14 is +5V and pin 9 RB3. Should I connect all the unused pins to ground or what could I do to make the system more stable??
Thanks for your question, and I am glad it's mostly working already! Have you tried adding a 100uF capacitor and a 100nF capacitor in parallel to the battery? This should help stabilize things.
@@FriendlyWire
Thanks a lot... that solved my problem...Fantastic. I will go on learning programming PIC's. Are you still making video clip of programming PIC's?
@@oveschleisner-meyer8139 Fantastic indeed, congratulations! Yes, I am still making videos, but it takes me some time to get them finished. Check out my Twitter @FriendlyWire where I post updates on the new projects :)
Can you show , how can a MC read an input , say voltage and do something , like switch on an LED , just like a voltage level meter or so?
Of course, those are good starting points. Switching an LED: th-cam.com/video/e4Q2dYVedPY/w-d-xo.html
Reading a voltage with an ADC: th-cam.com/video/AlpbbeX7-BU/w-d-xo.html
@@FriendlyWire That was fantastic. Simple and straight.
@@anithasshenoy6662 Thanks a lot! :)
Great and easy explanation, great video 👍
Thank you so much, Martin, glad you like it!
How about 12c508/p 04 HAM modchip???? I need digram point for it GND VDD all 8 pin i have k150 programmer and it give error recived data about reset play...
Looks to me that VDD is pin 1, GND is pin 8, MCLR is pin 4, PGD is pin 7, and PGC is pin 6. Check out table 3-1 in here: ww1.microchip.com/downloads/en/DeviceDoc/40139e.pdf Hope it helps!
Great help frienly wire
Thanks Jhoan, glad you like it!
thanks man, this was a good presentation.
Glad you like it!
Very good video sir, Is there any way to upload a hex file onto a PIC microcontroller without using a PICkit, instead using an Arduino?
Thank you for your kind words :) Yes, it is probably doable, since you just need the three wires MCLR (Master Clear), PGD (Program Data), and PGC (Program Clock). But I am not an expert on doing this. If you search on Google for "homemade PIC programmer" I am sure you will find many helpful resources!
@@FriendlyWire alternative of a pickit3 for "ICSP (in circuit system programming) there's a way of directly connecting a PC serial port to the RB6/RB7 and uses a few components including a 12 V keyfob battery for the VPP. Has to use a real hardware rs232 serial port, a PC with usb adaptor is too slow to work.
@@jagmarc Yup, good point! Older development boards used to use that method, check out the Velleman K8048 that I list on my website here: www.friendlywire.com/articles/gear/#ch5 . I have found these types of programmers to not work as reliably as the USB ones, though.
@@FriendlyWire where are you serving your website from? I see you have a domain name. When my device connected the connection didn't upgrade itself to a https . I guess you're missing a setting on your .httaccess file or cPanel configuration
@@jagmarc You can also use www.friendlywire.com/articles/gear/#ch5 .
Love your videos
Thank you, Muhammad, glad you like them!
could you explain to me why when I read the source code of the 18f8680 microcontroller and I write it a second time on the same pic the program does not work
knowing that I use the pickit2
Thanks a lot
It's a good question, and things like this can be very frustrating, I have been there. I tried to find out of the MPLAB IPE supports the PICkit2, but I could not find it either on the official website or in the manual. I assume that it shows up in the IPE under "tool"?
THANKS,
for my case I use the pickit2 software
and that the pic 18f8680 is soldered on the electronic card and I have a 5 pin connector on the card for programming.
THANKS@@FriendlyWire
Great video!! I have an issue with one PIC from one of my clients. Somebody erase the PIC´s model on the chip, and I don´t the model to read the program. Any tips to do an auto recognition? Thnx
Thank you, Alonzo, glad you like the video! :) I am not aware of auto recognition, but usually the MCLR/PGD/PGC lines are at the same place given a package size. How many pins does the PIC have?
@@FriendlyWire 18 PINs
@@AlonsoCorrales In that case I would just try the pinout of the PIC16F627A (friendlywire.com/tutorials/touch/PIC16F627A-datasheet.pdf). MCLR at pin 4, PGD at pin 13, PGC at pin 12, VDD at pin 14, and VDD at pin 14. Then you can make a list of all 18-pin PIC's and try them out by selecting them in the MPLAB IPE, and see if it connects properly.
hi sir......is it possible upload the program from PIC to PC ?
Yes, but you can only obtain the .hex file this way, and only if code protection is turned off on the PIC controller.
can we use eeprom sst27sf512 to program with pickit 3 ?
Are you asking whether we can transfer data on EEPROMs using the PICkit3? I don't think this works, sorry.
I have a pic16f689 IC that has been programmed, and I want to copy it, but after I open it, it turns out the data is protected, how do I open the data protection without destroying the data that has been programmed?
Unfortunately, if the data protection bit has been set, you cannot extract the data using the PICkit. That's why I never set it on my projects, just in case I ever need to clone a PIC and I no longer have the .hex-file.
Do i really need to use Pickit 3, can't I directly dump the code from pc to microcontroller
You need some sort of device for that. There are other options out there, including kits that use the serial connection from back in the day, but I find the PICkit3 or similar devices to be the easiest choice.
Dear sir how to programe 30f2010 microcontroler ic rt809h programer
This tutorial is for the PICkit3 programmer. Do you want to use a different programmer? If so, do you have a link so I can check it out?
Hi. Nice video. Is there a way to save the settings so that you don't have to re enter them every time you start IPE? I tried saving the "environment", then importing it the next time I used IPE, but the saved settings didn't come in. Thanks!
I wish I knew... I have to set it up again every time myself, too. If you find a way that works, let me know!
@@FriendlyWire I will definitely let you know if I figure it out.
@@tzampini Thanks and good luck!
Fantastic! It seems to have everything covered. I did not know the password to get into the advanced mode, it seems silly to need one. I thought I had to set something up with Microchip, I really don't like registering for everything I use. Thanks Jens, take care :)
Thank you, Jerry. I think they added the password (that can also be changed) so that it is possible to prevent a user from switching into the advanced mode. I can imagine that in schools or university labs instructors want students to use the default mode instead.
@@FriendlyWire Ah yes, it is good to keep students out of harms way. Thanks :)
How to program read in ic and save file for copy other ic .
Follow the steps after 7:00. Connect to your PIC, and then click on "read." Then click on File -> Save As, and you can save the .hex code onto your computer. If "code protection" has been enabled, then it won't be possible to extract the .hex-code like this, however. Hope it helps!
Hello. Thanks for posting this video. I stumbled across it and wondered if this device maybe the answer to my problem. I have a motherboard on which the bios has failed due to my own stupidity as to how I flashed the chip (Winbond W29C020-12 32 pin 2mbit) whilst the onboard button battery was dead. I then flashed it a 2nd time and wrote over the back up (duhhh). The consequence is that the board cannot see a floppy drive or even a non accelerated ISA VGA card. The motherboard company are no longer around, but I have the bios on a floppy disk in the form of a .bin file which suggests the file is hexadecimal in nature. Would the mplab software be able to view this type of file in order to 'flash' it directly to the chip? Thanks.
Thank you for your message, John. I don't think the PICkit3 will be useful for that, since "out of the box" it only interfaces with PIC microcontrollers. It may be possible to write your own PICkit3 firmware, but I am out of depth at that question. I think at www.reddit.com/r/AskElectronics/ you may find people who know how to do that. Good luck, and sorry I could not be of more help, I hope you will find a solution!
@@FriendlyWire Many thanks for your response. I will check the link and keep looking for a solution.
@@johnsparks3979 Good luck, and my apologies that I could not be of more help. Best of luck!
@@johnsparks3979 Best of luck! Did you find anything?
pls how do I overcome hold in reset enabled
or release hold in reset enabled
Thanks for the question! Can you share more details? You can also contact me on social media @FriendlyWire if you want to send a screenshot. Happy to help!
Hi. Great video. For us latecomers, I notice that the latest MPLAB IPE v6.10 (Directed to the download site on your FriendlyWire website) no longer supports the PICKiT 3!!.
I found out the hard way. Will uninstall and go back a version or two. Thank you
Thank you for your feedback, I was not aware of that. I am traveling right now, but I will check this on my system when I get back. It would be a real shame, since the PICkit3 is cheaper and just perfect for hobby applications, no need for the much more expensive PICkit4 in my opinion. Thanks again!
@@FriendlyWire Hi. Got it wrong! You can use the PICKit 3 with v6.1.0!! You have to download extra packs which includes support for the ‘3’ So we can breathe again👌
@@rogthedodge99 Good to know, thanks for checking! Do you have a link for where to download the package?
This was great. Thank you very much 💟
Thank you, glad you like it! :)
I can't find those pins name in this chip Z86E3116PSC
Thanks for the question! The Z86E3116PSC is a Zilog microcontroller, not made by Microchip. For that reason, unfortunately, we cannot use the PICkit to program it.
Thanks
This is very good info and has got me 95% toward the end of my project. I think...But what do we do when some of the 8 pins on my PIC12LF1822 are labeled differently. It has a Vdd and Vss as 1&8 pins resp. but other pins are labeled RA0 to RA5. Am I off track now or can RA0-RA5 be used? Thanks for the interesting video.
Thanks for the nice comment, Chris, I am so glad my video was helpful! :) Can you send me a link to your datasheet? I am happy to help!
//edit: Nevermind, found it (ww1.microchip.com/downloads/en/devicedoc/40001413e.pdf)! Look at table 2 on page 3 :) It looks like PGD is RA0/pin 7; PGC is RA1/pin 6, and MCLR is RA3/pin 4. Hope that helps!
Hey Thank you so much. I appreciate the help.¡
Great, happy to help, and thank you for stopping by! :)
@@FriendlyWire Hey Jens, after many days of delay I got around to programming my PIC today and it went very smooth and programmed successfully. Thanks again for your easy to follow directions and help.
@@CliveDrone Hey Chris, that's fantastic news, I am so happy to hear it! On to new adventures!!!
any video for dspic30f2010
For now I will stick with PIC microcontrollers :)
the windows XP sound effect makes me nostalgic
Ha, you and me both! :) ( It's at 1:50 for anybody who is interested. )
Hi. Can you slightly re-program this project with a few slight changes, for hire?
I typically do not offer paid services, but feel free to reach out to me via email (at the bottom of my website www.friendlywire.com) and if it is only a slight change then I can do it for free :)
Thank you Jens! I ordered everything that you used, so I should be receiving everything soon, and please, at least let me buy you a nice dinner via PayPal. Okay? I'll try my best to learn on-my-own, but if not, Bon appétit! : - ) LOL!
@@thejoeblowshow That's fantastic, let me know when it all arrives!
@@FriendlyWire You'll definitely be the first to know. : - ) Also, just curious to know, how difficult would it be to add a sfx, (press/beep) with the obvious peripherals added on to the breadboard? Is this thought of mine even in the realm of possibility?
@@thejoeblowshow I am sure you could add a piezo speaker to the mix (and probably a transistor and some passives to drive it properly), but I have actually never worked with those before.
How to calculate hex for using km change odo meter
Hi! I am not sure if I understand your question, can you elaborate?
Hello please is possible get the source code of protected PIC16F877A?
Hello, thank you for your question. Unfortunately, if the source code is protected it is not possible to extract it with the PICkit.
im having this error:
Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.
please help i even changed pics already and tried another compiler
If it reads back 0x0 it most likely means that the PIC is not connected to power. Can you check the VDD and VSS pins for 5V?
@@FriendlyWire i got the cyan brick thing that connects all the pins already , and it did tell me that the pic is not powered but i fixed that error already using the ipe power section, but i still get the id error
@@cubirk Can you send me a picture of the setup? You can find my email at the bottom of www.friendlywire.com . It's quite common to get these errors, we will figure it out :)
@@FriendlyWire oks thank you
@@cubirk Thank you, I got your email! I will look at it today so we can figure it out. It's quite common to have these problems when setting things up, so I am confident we can solve it. :)
How to measure three phase voltage 415v micro controller r phase voltage loop y phase can't read 415v phase voltage 0 measure sir if any formula
Hey Ganesh, thanks for the question! For measuring AC voltages I would definitely recommend to use some sort of galvanic isolation, like an optocoupler. AC line voltage with 50Hz is rather slow compared to the MHz resolution you can get with PIC microcontrollers, so it would be relatively simple to detect a zero crossing. But I am not sure if I understand the rest of your question, can you explain more? :)
hi
could you give me a hand ..
I have a file that I uploaded via axe027 cable in a pic18f14k22
the file has the extension .AXE I would like to convert it into a .HEX file to be sent with Pickit 2 you can do it.
Hello Saverio, thank you for your question. I am not sure what an .axe-file is, do you have a link with some documentation?
Finally, after many years, i'm able to program a 16F84A, many thanks to you.
Now, i'm trying to read ad program EEPROM 24C02 but it seems doesn't work... any suggestion?
Thanks again!
p.s. New sub!
Hello Davide, thank you for sharing, I am so glad to hear that and it means a lot to me! I have not covered EEPROMS yet, but hopefully I will do so in a future video. Thank you for the suggestion :)
Im using PIC18F46K22 but its showing connection fail
Oh, that's not good. Can you send a photo of your setup? (My email is at the bottom of www.friendlywire.com, and you can also message me on Twitter or Instagram)
Can the PIC be reused/reprogrammed over again, or is it one time use?
Good question, I should have mentioned! It can be used again and again :)
@@FriendlyWire Ok great and thanks
@@stnwrd Happy to help, and let me know if you have any other questions :)
Ok Thanks again
Can we copy hex file from microcontroller??? Please reply as soon as possible 🙏
Follow the steps after 7:00. Connect to your PIC, and then click on "read." Then click on File -> Save As, and you can save the .hex code onto your computer. If "code protection" has been enabled, then it won't be possible to extract the .hex-code like this, however. Hope it helps!
@@FriendlyWire thanks 🙏
@@satishkumar-gg5fm Happy to help, and thanks for stopping by! :)
is there any other way to program pic microcontroller without using pickit to save money?
You can find unofficial copies of the PICkit online, they cost much less. Also there are some circuits proposed by hobbyists that can get the job done, but I have never used those. What is your budget for a programmer, and where are you located? Maybe we can find one for you :)
@@FriendlyWire india
@@shrikantnikam2426 You can try searching for PICkit3.5, this is a popular third-party programmer that works well in my experience. Especially if you want to stay with PIC controllers it may be a good one-time investment. There are also older programmers that use the serial port to program PICs directly, but they do not work as reliably I find; one of these you can see here on my website: www.friendlywire.com/articles/gear/#ch5
what a great video thank you nerd
Haha sure thing :)
Hello how make ir remote
Hey John, thanks for the question! I have actually been working on a project like this for some time using a phase-locked loop (PLL) but got stuck in the analog electronics part of signal amplification to make it work reliably... I hope to get back to it soon! :)
Program pic 12f683/684/675 sir...thanks..
Is it all working for you? All you need to do is find the locations of the PGD, PGC, and MCLR pins. Let me know if you have any questions :)
Good information
Thank you, glad you like it!
Great! I Love it.
Thank you, Renato, glad you like it!
Good~ Thank you
Glad you liked it! :)
How to clear pic 18f4550 can u help me
Did you find the datasheet for the PIC18F4550? MCLR is pin 1, PGD is pin 28, and PGC is pin 27. You can connect VDD at pin 20, and ground at pins 8 and 19. For anything else you just need to replace "PIC16F627A" in the tutorial above with PIC18F4550. Does it work? Let me know, I am happy to help more.
@@FriendlyWire let me try notify u shortly
@@ajs-tatu-spitstop9235 Sounds good!
Can I check a code from PIC18F2420 too?
Hey Adam, thanks for the question! I am not sure what you mean by check, but the MPLAB IPE does indeed support the PIC18F2420, so you could connect it to the PICkit. For the PIC18F2420, MCLR is at pin 1, PGD at pin 28, PGC at pin 27, VDD is at pin 20, and GND is at pins 8 and 19. (See the datasheet here: ww1.microchip.com/downloads/en/DeviceDoc/39631E.pdf ). Let me know if that helps! :)
I mean, I have one pre -programmed PIC microcontroller and another that has not been programmed. So my question is can I copy or re -read the code from a pre -programmed PIC microcontroller and re -copy the program and transfer it to another PIC controller
@@adamismaad9604 Yes, if the original PIC does not have code protection enabled you can read out the .hex-file. Look at 7:30 in the video. You can click on "read" and then you can download the existing .hex-file. Then, if you click on File -> Save As you can save this retrieved .hex-file, and then send it to any other PIC you want.
Oh ok thank you very much
@@adamismaad9604 Happy to help, let me know if it works!
Thank you for your tutorial. Well done! - But the resume to your title "how to get source code onto a PIC microcontroller" is: not at all. The controller can only execute machine code.
Thank you! And yes, that's really the only way to think about it. But I decided to title the video like this because as a beginner I always thought that the actual code would be stored on the microcontroller. I hope the title did not make the video confusing :)
can i do cording with out this device?
Yes, the coding is done just on your computer. You only need it for the final step of transferring the code onto the controller.
@@FriendlyWire is there other way
@@mohomadashad4641 You need to physically connect the controller to the computer to transfer the code. The PICkit3 is one possible solution, there are other adapters as well. But you will always need one of these adapters.
@@FriendlyWire ok. what are the others
@@mohomadashad4641 PICkit4 is the newest one, but the PICkit3 works just fine. Why do you want to use a different one?
hello sir nice information ❤
Thank you, glad you like it! :)
By the way, my programmer device is PICKit 3.5, thank you
This should work with either PICkit3 or PICkit 3.5 :)
bro how to do for pickit2
I am not sure if the PICkit2 is still supported by the current versions of MPLAB :( But the PICkit3 still is, for now, and you can get clones (sometimes called PICkit3.5) on Amazon and other sites for around $20. I know it's super silly that they keep making new programmers, since for these simple PICs the old ones work just fine...
make video on how to write programme
For now, all my tutorials have companion articles where I explain the source code in detail. I am thinking of making videos just about the programming as well, kind of like this one here: th-cam.com/video/I6m_DTDsE4U/w-d-xo.html . Is that what you have in mind? :)
program memory: start address = 0x0, end address = 0x7ff
configuration memory
program memory
Address: 0 Expected Value: 120a Received Value: 3fff
Failed to program device
I cant find what is the problem in pic16f877a
This looks like a data transmission error, most likely the cables are not connected properly, it happens sometimes. If you have a picture, you can send it to me on Twitter or Instagram @FriendlyWire and we can figure it out :)
Did you solve the problem ?
Please I want you to assist me to program for a project
Thank you for your interest! But I am sorry, I don't have enough time to help with individual projects, unless it is something that is very closely related to one of the videos, hope you understand. What is is about? :)
maybe the title of the video should be "how to send source code to a PIC". i must admit i clicked the video thinking it was "how to get..." as in "how to obtain..."
Oooh, I never even though about that! I hope it was not too confusing, but I will think about renaming the video. Thank you!
Title is wrong! You don't get source code into a micro! Only machine language or hex files can be sent to program a PIC micro. Anyway it's a useful video! From Chennai city, India.
True, the source code is first compiled into something the PIC understands, and then that .hex-file is transferred to the PIC. I chose this simpler title to make the video more understandable to beginners, but I don't think it will confuse anyone, because if you watch the video you see that I explain it exactly like this :)
I want to do the opposite, I want to pull the code from a PIC provided that it isn’t protected. How is that accomplished?
Good question! It is impossible to obtain the C code from the PIC, all you can do is get the .hex-file. At 6:54, if you are connected to the PIC, you can click on "read" and that reads out the program memory, if it is not protected. The reason you cannot download the C code directly is this: it doesn't exist on the controller. C code only exists for us as a tool, but before it gets onto the controller it is compiled into the .hex-file. Hope this helps! :)
@@FriendlyWire that is fine. If I can get the hex code, I can then download it to other PICs to duplicate the same function, correct?
Also, if the PIC in my equipment had the part number removed by the manufacturer, how do I figure out which one it is? I have the schematics of the board and all pin outs.
@@MrWatlow Yes, the .hex-file is all you need. There are many PICs with the same packages, but their connections PGD/PGC/MCLR tend to be at the same place for all PICs in a given package. But you still have to know what PIC it is. You can try this: maybe you think it's a PIC16F627A. Configure your MPLAB IPE to PIC16F627A and try to connect the PICkit3 to that mystery PIC. If it works, it's a PIC16F627A, if it doesn't, you have to keep trying.
sir i need your help
I'll do my best! :)
Microchip shared this video. :)
It was very kind of them :)
@@FriendlyWire You covered this topic well, so I’m not surprised. I just subscribed 👍🏻.
@@_jmeg_3436 Thank you, Jeff, welcome to the channel! :)
and you don't program anything except light bulbs?
You can program a lot of things with PICs :) What do you have in mind?
@@FriendlyWire good day here is only a video about flashing LEDs...this is not enough for beginners-I don't understand enough either.I have one project and I want to ask if you will help me?
@@roman_m Hey Roman, you can check out the other videos on my channel (as well as the articles on www.friendlywire.com) and that should definitely get you started with PIC microcontrollers. But I agree, there is always more to talk about! What is your project about?
Thank you so much
I'm making a digital door lock :))
+1 follow
Oh, that's a cool project, and I am happy that my video could help you! Have a great day!
Anyone else seeing the thumbnail, reading "mains" and the arrow point to the board, and then thinking, oh, BigClive found another crappy power supply?
Hahaha, my favorite comment! :D
Hello my friend. I have a microchip PIC 24F 16KA 102-I/SS e3 1845 CAB. it has been placed inside an inverter.Now for reasons well understood the constructor of the inverter is not willing to give me the programm of it or even send me one [to buy of course ] programmed one.He presses me to buy a new inverter around 450 $.I think is totally unfair and i would call this seller a Big Thief.I dont mention more.But i say this.I have already bought pick it 3,5 programmer.Is there a hope i can do something??and what about if it is encrypted??And my last question.How does the ministry of commerce of each country allow these thieves for a Pic chip of 2 euro cost to force you to spend another 450$ ???Thank you for your time.....Respect to your work my friend.
I am sorry this is so expensive... It seems a bit extreme, to be sure. If the developer has not activated "code protection" you can read out the .hex-file with the PICkit3. But I am sure they enabled the code protection using the configuration word of their PIC, which is what companies can do to protect their intellectual property. In this case it is not possible to get the .hex-file from the PIC.
Are people still using PIC nowadays ?
I have so many mixed comments into starting with it...
I guess the answer is YES, since this channel exists ;-) I like to use them for the type of projects and applications I share on this channel, but there are of course other alternatives. I like to program them in C, since you learn a lot about how registers work, and how the hardware is configured. But you have to choose what you like best, of course :)
@@FriendlyWire i have just tested some PICs with this PICKIT3, and I must say it's a very hard time finding a working version of IDE/IPE to actually let you connect the device.
I eventually had to use MPLAB X IDE 6.20 + Standalone PICKIT3 Programmer 3.10 to completely control over this.
I think PIC / PICKIT3 are very obsolete technology nowadays that Microchip doesn't even bother to maintain correctly.
plz redo using C++
I am only using the XC8 compiler, and that specific dialect for PIC microcontrollers. Is there anything in C++ that you would like to do that is cumbersome or difficult in the XC8 language?