How to get source code onto a PIC microcontroller

Поділитися
Вставка
  • Опубліковано 13 лип 2024
  • How do you get source code onto a PIC microcontroller? In this tutorial we will go through five steps so that you can transfer C source code onto a PIC microcontroller using the MPLAB IDE, XC8 compiler, the MPLAB IPE, and the PICkit3. Let's go!
    Thanks for watching, and let me know in the comments if you have any questions!
    Companion article: www.friendlywire.com/tutorials...
    Email list: www.friendlywire.com/email
    Website: www.friendlywire.com
    Twitter: / friendlywire
    Reddit: / friendlywire
    Facebook: / friendlywire
    Instagram: / friendlywire
    Timestamps:
    00:00 Introduction
    00:23 Overview
    01:18 Step 1: Install the software
    01:53 Step 2: Create a new MPLAB project
    03:48 Step 3: Compile the C code
    04:46 Step 4: Connect the PICkit3
    06:49 Step 5: Program the controller
    08:55 Eight common mistakes and their solutions
    11:05 Conclusion

КОМЕНТАРІ • 298

  • @FriendlyWire
    @FriendlyWire  2 роки тому +8

    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!

    • @mba2ceo
      @mba2ceo Рік тому +1

      plz do an update video

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@mba2ceo Happy to, but an update on what?

    • @mba2ceo
      @mba2ceo Рік тому +1

      @@FriendlyWire Write a program and keep adding code until the program no longer fits/works and display how many lines of code that is

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@mba2ceo 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 :)

  • @ChikiChpoki
    @ChikiChpoki 10 місяців тому +2

    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!

  • @mohitrahaman
    @mohitrahaman Рік тому +2

    High quality stuff, soon you'll be big! Can't wait to see what you have in store for us.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Thank you for your kind words, Mohit! All the best wishes :)

  • @billebrill8730
    @billebrill8730 2 роки тому +4

    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
      @FriendlyWire  2 роки тому +1

      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 :)

    • @billebrill8730
      @billebrill8730 2 роки тому +1

      @@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.

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@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 :)

  • @palmering88
    @palmering88 8 місяців тому +2

    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.

    • @FriendlyWire
      @FriendlyWire  8 місяців тому

      That's amazing, congratulations, and thank you for your kind words!

    • @Vamptech360
      @Vamptech360 4 місяці тому

      Hlw I've something to ask

  • @tdranger6888
    @tdranger6888 Рік тому +3

    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.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Thank you so much, I am glad you find this video helpful! :)

  • @1georgeh
    @1georgeh Місяць тому +1

    Thank you so much.
    Very useful.
    Clear, simple to follow, and direct to the point.

    • @FriendlyWire
      @FriendlyWire  Місяць тому

      Thank you for your kind words, I am glad you found it useful!

  • @NZ2Pepper
    @NZ2Pepper 8 місяців тому +2

    Just the info I'd been looking for.
    Thanks 👍

    • @FriendlyWire
      @FriendlyWire  8 місяців тому

      Glad you found the video helpful! :)

  • @sudarapremathilaka1706
    @sudarapremathilaka1706 2 роки тому +1

    Great Video Tutorial. PIC programming is my favourite.Thanks.

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Thank you, Sudara, I am happy you like it! :)

  • @kingkappa9916
    @kingkappa9916 Рік тому +4

    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. 😁

    • @FriendlyWire
      @FriendlyWire  Рік тому +2

      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! :)

  • @fabriciocuellarzuna5249
    @fabriciocuellarzuna5249 Рік тому +1

    Amazing. You helped me a lot. Thank u very much bro!

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Thank you so much, Fabricio, I am glad you found my video helpful!

  • @oveschleisner-meyer8139
    @oveschleisner-meyer8139 Рік тому +2

    Good clear and easy understanding tutorial... thanks a lot...

  • @martinveselovsky8135
    @martinveselovsky8135 Рік тому +1

    Great and easy explanation, great video 👍

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Thank you so much, Martin, glad you like it!

  • @anokhautomation4453
    @anokhautomation4453 2 роки тому +1

    Very very useful tips 👍 thanks for your detailed explanation 👌

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Thank you so much for your kind comment, I am so glad you like the video and find it helpful :)

  • @uuuu6590
    @uuuu6590 2 роки тому +2

    This was great. Thank you very much 💟

  • @wtar8469
    @wtar8469 8 місяців тому +1

    You save me a couple hours or maybe days . Thanks.

    • @FriendlyWire
      @FriendlyWire  8 місяців тому

      Thank you, happy to help! :)

  • @beatrute2677
    @beatrute2677 Рік тому +1

    thanks man, this was a good presentation.

  • @Vancha112
    @Vancha112 5 місяців тому +1

    Awesome video, just chose a pic10f200 as my first microcontroller to play around with, this will be real useful ^^

    • @FriendlyWire
      @FriendlyWire  5 місяців тому

      Glad you found it helpful, and have fun! :-)

  • @muhammadhayyan9914
    @muhammadhayyan9914 2 роки тому +1

    Love your videos

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Thank you, Muhammad, glad you like them!

  • @hemashri
    @hemashri 3 місяці тому +1

    Your explanation above is great. thanks.

    • @FriendlyWire
      @FriendlyWire  3 місяці тому

      Thank you very much, I am glad you like it! :)

  • @jhoanrivero7885
    @jhoanrivero7885 2 роки тому +1

    Great help frienly wire

  • @vinilg1
    @vinilg1 4 місяці тому +1

    Excellent explination.

    • @FriendlyWire
      @FriendlyWire  4 місяці тому

      Thank you, glad you like the video!

  • @RenatoCorreaRJ
    @RenatoCorreaRJ 2 роки тому +1

    Great! I Love it.

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Thank you, Renato, glad you like it!

  • @digitalmachine0101
    @digitalmachine0101 6 місяців тому +1

    Good information

    • @FriendlyWire
      @FriendlyWire  6 місяців тому

      Thank you, glad you like it!

  • @user-mq4ki1fr2c
    @user-mq4ki1fr2c Рік тому +1

    Good~ Thank you

  • @Amin-py6tl
    @Amin-py6tl 2 місяці тому +1

    what a great video thank you nerd

  • @jerril42
    @jerril42 2 роки тому +1

    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 :)

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      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.

    • @jerril42
      @jerril42 2 роки тому +1

      @@FriendlyWire Ah yes, it is good to keep students out of harms way. Thanks :)

  • @ranasaeed5807
    @ranasaeed5807 8 місяців тому +1

    hello sir nice information ❤

    • @FriendlyWire
      @FriendlyWire  8 місяців тому

      Thank you, glad you like it! :)

  • @mariamsal8531
    @mariamsal8531 2 роки тому +2

    WISH I HAD FOUND THIS CHANNEL EARLIER

  • @ScottWalshWoodworking
    @ScottWalshWoodworking 2 роки тому +3

    the windows XP sound effect makes me nostalgic

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Ha, you and me both! :) ( It's at 1:50 for anybody who is interested. )

  • @huythaiquang9682
    @huythaiquang9682 8 місяців тому +1

    Thank you so much
    I'm making a digital door lock :))
    +1 follow

    • @FriendlyWire
      @FriendlyWire  8 місяців тому

      Oh, that's a cool project, and I am happy that my video could help you! Have a great day!

  • @mikemeyer301
    @mikemeyer301 Рік тому +2

    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

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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.

  • @SNStuart
    @SNStuart 3 місяці тому +1

    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

    • @FriendlyWire
      @FriendlyWire  2 місяці тому

      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.

  • @anithasshenoy6662
    @anithasshenoy6662 5 місяців тому +1

    Nice video. Can you provide any link to PIC programming language libraries / headers etc.

    • @FriendlyWire
      @FriendlyWire  5 місяців тому +1

      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 :)

  • @MADDOG_BC
    @MADDOG_BC Рік тому +1

    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?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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/

    • @MADDOG_BC
      @MADDOG_BC Рік тому

      @@FriendlyWire Thanks

  • @sanjaybatra6593
    @sanjaybatra6593 Рік тому +1

    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

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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 :)

  • @jagmarc
    @jagmarc Рік тому +5

    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..."

    • @FriendlyWire
      @FriendlyWire  Рік тому +1

      Oooh, I never even though about that! I hope it was not too confusing, but I will think about renaming the video. Thank you!

  • @davidenanni5311
    @davidenanni5311 Рік тому +1

    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!

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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 :)

  • @eXtremeFX2010
    @eXtremeFX2010 6 місяців тому +1

    This is helpful in understanding loading process. But I simply want to "CLONE" an existing PIC16F684 microchip. Do you have a video on HOW TO connect and CLONE?

    • @FriendlyWire
      @FriendlyWire  6 місяців тому

      Thank you, I am glad it's helpful. It is sometimes possible to extract the .hex-file stored on a PIC. (But please make sure that you are allowed and have the right to extract it.) At 8:25, instead of selecting a .hex-file from your computer, you can click on "Read" and that will read out the .hex-file stored on the PIC. Note that this is only possible when "code protection" has been turned off by whoever programmed that PIC before you.

  • @mabsonleo
    @mabsonleo 2 роки тому +2

    Would you like to give me advice about visual IDE ?
    I used visuino

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Do you have a link to that one? I don't think I have ever used it, but it sounds interesting!

  • @_jmeg_3436
    @_jmeg_3436 2 роки тому +1

    Microchip shared this video. :)

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      It was very kind of them :)

    • @_jmeg_3436
      @_jmeg_3436 2 роки тому +1

      @@FriendlyWire You covered this topic well, so I’m not surprised. I just subscribed 👍🏻.

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@_jmeg_3436 Thank you, Jeff, welcome to the channel! :)

  • @sanjaybatra6593
    @sanjaybatra6593 Рік тому +1

    thanx a lot for nice video. I have a question , if the code has been written through mikroC....... Still it will work ?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Thank you, Sanjay! Can you send me a link to that compiler?

    • @sanjaybatra6593
      @sanjaybatra6593 Рік тому +1

      I am sure HEX file will be same generated by MPLAB or MikroC.......but still want the clear my doubt.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@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 :)

  • @DomenSoster
    @DomenSoster Рік тому +1

    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 ?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      It's probably because everything is enclosed in a loop like this:
      while(1) {
      // your LED stuff
      }
      Can you share your code?

  • @CliveDrone
    @CliveDrone Рік тому +1

    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.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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!

    • @CliveDrone
      @CliveDrone Рік тому +1

      Hey Thank you so much. I appreciate the help.¡

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Great, happy to help, and thank you for stopping by! :)

    • @CliveDrone
      @CliveDrone Рік тому +1

      @@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.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@CliveDrone Hey Chris, that's fantastic news, I am so happy to hear it! On to new adventures!!!

  • @Electrolab28Ag
    @Electrolab28Ag 2 роки тому +2

    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?

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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! :)

    • @Electrolab28Ag
      @Electrolab28Ag 2 роки тому +1

      @@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

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      @@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? :)

    • @Electrolab28Ag
      @Electrolab28Ag 2 роки тому +1

      @@FriendlyWire I am out of the workshop today, buy once I get back and I'll try iy and let you know.

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      @@Electrolab28Ag Yeah, let me know if it works!

  • @imtiazhussain5027
    @imtiazhussain5027 2 роки тому +1

    Hi dear. Its an excellent tutorial. How can I implement sine function for 8 bit PIC microcontroller. Please reply. Thanks.

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      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?

    • @imtiazhussain5027
      @imtiazhussain5027 2 роки тому +1

      @@FriendlyWire Thanks. What you suggested, is more efficient solution.

    • @imtiazhussain5027
      @imtiazhussain5027 2 роки тому +1

      @@FriendlyWire no negative voltages

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      @@imtiazhussain5027 If you don't need negative voltages then it is really the easiest solution I can think of :)

  • @AlonsoCorrales
    @AlonsoCorrales 2 роки тому

    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

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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
      @AlonsoCorrales 2 роки тому +1

      @@FriendlyWire 18 PINs

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      @@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.

  • @fedeyoutub
    @fedeyoutub Рік тому +1

    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 ?

    • @FriendlyWire
      @FriendlyWire  Рік тому +1

      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?

    • @fedeyoutub
      @fedeyoutub Рік тому +1

      @@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.. :-(

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@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.

  • @electrical_engineer1
    @electrical_engineer1 Рік тому +1

    Sir , mpli ixe in advance settings which password use??
    Microchip ic read and save which software best for pickit3.5?

    • @FriendlyWire
      @FriendlyWire  Рік тому +2

      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?

  • @donnlai
    @donnlai 7 місяців тому +1

    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.

    • @advancedinkscape8494
      @advancedinkscape8494 4 місяці тому +1

      The two capacitors that connect each leg of the oscillator crystal to ground should be around 27pF. I use 22pF and it's fine. On most of the PIC microcontrollers (but not all), you can probably go as low as 15pF and as high as 50pF or higher and it won't stop your blinky program from working. You would use the cheapest type of capacitor, they are "ceramic". If you have a (wrong) capacitor that has a positive side and a negative side, it is NOT the right one. I have 22pF on my crystal oscillators on my old (and not powerful) PIC16F84A as well as my more powerful PIC18F4550, and plan to use that value on PIC16F877A and my other chips too. In the video, he runs another program to put the hex file to the chip, but it's not necessary, just press the arrow in MPLABX, and it'll program the chip, it's a million times faster!

    • @FriendlyWire
      @FriendlyWire  4 місяці тому

      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.

    • @advancedinkscape8494
      @advancedinkscape8494 4 місяці тому

      @@FriendlyWire It's not necessary to consult the data sheet of a crystal. It's much more practical and realistic to consult the datasheet of your particular microcontroller where it's clearly stated what capacitors are required for a crystal oscillator. When employing a crystal, you will find in your PIC microcontroller datasheet two categories. The first is the values of capacitors suggested for resonators (not the one you want) and the other mentions "crystal", typically "crystal oscillator". You can take a shortcut to finding these sections, surprisingly, by doing a search for 'pf' (which may occur in datasheets only when talking about capacitors). The capacitor suggestions in the datasheet are indicated for which oscillator mode you want to use, which is the one thing you always have to specify when setting configuration bits. To keep life simple, use a 4MHz crystal (because it allows you to select either XT or high speed in the configuration bits, but simplify further and select XT). Also, as I previously stated, use a 22p capacitor on each leg of the crystal, it'll work for all the common PIC chips that hobbyists are likely to use.

  • @michaelkotthaus7120
    @michaelkotthaus7120 Рік тому +2

    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.

    • @FriendlyWire
      @FriendlyWire  Рік тому +1

      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 :)

  • @tzampini
    @tzampini Рік тому +1

    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!

    • @FriendlyWire
      @FriendlyWire  Рік тому +1

      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!

    • @tzampini
      @tzampini Рік тому +1

      @@FriendlyWire I will definitely let you know if I figure it out.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@tzampini Thanks and good luck!

  • @naushadc.k.8851
    @naushadc.k.8851 5 місяців тому +1

    Is it possible to get the hex code from pic ic where it was flashed earlier.

    • @FriendlyWire
      @FriendlyWire  5 місяців тому

      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!

  • @rogthedodge99
    @rogthedodge99 Рік тому +1

    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

    • @FriendlyWire
      @FriendlyWire  11 місяців тому

      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!

    • @rogthedodge99
      @rogthedodge99 11 місяців тому +1

      @@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👌

    • @FriendlyWire
      @FriendlyWire  11 місяців тому

      @@rogthedodge99 Good to know, thanks for checking! Do you have a link for where to download the package?

  • @homijbhabha8860
    @homijbhabha8860 2 роки тому +2

    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?

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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!

    • @jagmarc
      @jagmarc Рік тому +1

      @@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.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@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.

    • @jagmarc
      @jagmarc Рік тому +1

      @@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

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@jagmarc You can also use www.friendlywire.com/articles/gear/#ch5 .

  • @MrJansen-nd7ld
    @MrJansen-nd7ld 8 місяців тому +1

    can we use eeprom sst27sf512 to program with pickit 3 ?

    • @FriendlyWire
      @FriendlyWire  8 місяців тому

      Are you asking whether we can transfer data on EEPROMs using the PICkit3? I don't think this works, sorry.

  • @saverio17021967
    @saverio17021967 2 роки тому +1

    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.

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Hello Saverio, thank you for your question. I am not sure what an .axe-file is, do you have a link with some documentation?

  • @tanvirmahmud1048
    @tanvirmahmud1048 2 роки тому +1

    make video on how to write programme

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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: ua-cam.com/video/I6m_DTDsE4U/v-deo.html . Is that what you have in mind? :)

  • @mohandmohand2047
    @mohandmohand2047 Рік тому +1

    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...

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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!

  • @anithasshenoy6662
    @anithasshenoy6662 5 місяців тому +1

    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?

    • @FriendlyWire
      @FriendlyWire  5 місяців тому +1

      Of course, those are good starting points. Switching an LED: ua-cam.com/video/e4Q2dYVedPY/v-deo.html
      Reading a voltage with an ADC: ua-cam.com/video/AlpbbeX7-BU/v-deo.html

    • @anithasshenoy6662
      @anithasshenoy6662 5 місяців тому +1

      @@FriendlyWire That was fantastic. Simple and straight.

    • @FriendlyWire
      @FriendlyWire  5 місяців тому

      @@anithasshenoy6662 Thanks a lot! :)

  • @suck06257
    @suck06257 2 роки тому +1

    hi, thanks for the video. How can we import Hex code to 64 pin PIC. Thanks in advance

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Hey Amit, thank you for your kind words :) Which PIC are you interested in?

    • @suck06257
      @suck06257 Рік тому

      @@FriendlyWire hi, i missed the notification. so sorry for late response. my PIC is PIC18F6520.

    • @suck06257
      @suck06257 Рік тому

      I also look on the internet and found that DM160228 EXPLORER 8 DEVELOPMENT board will do the job. However do i need an additional programming adapter as the package is TQFP.

  • @electrical_engineer1
    @electrical_engineer1 Рік тому +1

    How to program read in ic and save file for copy other ic .

    • @FriendlyWire
      @FriendlyWire  Рік тому +1

      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!

  • @mishealunegbu1766
    @mishealunegbu1766 Рік тому +1

    pls how do I overcome hold in reset enabled
    or release hold in reset enabled

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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!

  • @oveschleisner-meyer8139
    @oveschleisner-meyer8139 Рік тому +1

    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??

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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.

    • @oveschleisner-meyer8139
      @oveschleisner-meyer8139 Рік тому +1

      @@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?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@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 :)

  • @djt3934
    @djt3934 2 місяці тому +1

    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.

    • @FriendlyWire
      @FriendlyWire  2 місяці тому

      Thanks for your interest and for your question! When you set up the project etc. did you select the PIC16F28A as a device?

    • @djt3934
      @djt3934 2 місяці тому +1

      @@FriendlyWire yes i selected PIC16F628, maybe this issue is something to do with the internal clock?

    • @FriendlyWire
      @FriendlyWire  2 місяці тому

      @@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 :)

  • @susilnishantha3711
    @susilnishantha3711 Рік тому +1

    hi sir......is it possible upload the program from PIC to PC ?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Yes, but you can only obtain the .hex file this way, and only if code protection is turned off on the PIC controller.

  • @ajalprofs8746
    @ajalprofs8746 9 місяців тому +1

    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

    • @FriendlyWire
      @FriendlyWire  9 місяців тому

      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.)

  • @ganeshelectronic473
    @ganeshelectronic473 2 роки тому +1

    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

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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? :)

  • @isdiagnostic.software
    @isdiagnostic.software 3 місяці тому +1

    How to calculate hex for using km change odo meter

    • @FriendlyWire
      @FriendlyWire  2 місяці тому

      Hi! I am not sure if I understand your question, can you elaborate?

  • @johnsparks3979
    @johnsparks3979 Рік тому +1

    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.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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!

    • @johnsparks3979
      @johnsparks3979 Рік тому +1

      @@FriendlyWire Many thanks for your response. I will check the link and keep looking for a solution.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@johnsparks3979 Good luck, and my apologies that I could not be of more help. Best of luck!

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@johnsparks3979 Best of luck! Did you find anything?

  • @stnwrd
    @stnwrd 2 роки тому +1

    Can the PIC be reused/reprogrammed over again, or is it one time use?

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      Good question, I should have mentioned! It can be used again and again :)

    • @stnwrd
      @stnwrd 2 роки тому +1

      @@FriendlyWire Ok great and thanks

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@stnwrd Happy to help, and let me know if you have any other questions :)

    • @stnwrd
      @stnwrd 2 роки тому +1

      Ok Thanks again

  • @thejoeblowshow
    @thejoeblowshow 2 роки тому +1

    Hi. Can you slightly re-program this project with a few slight changes, for hire?

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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 :)

    • @thejoeblowshow
      @thejoeblowshow 2 роки тому +1

      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
      @FriendlyWire  2 роки тому +1

      @@thejoeblowshow That's fantastic, let me know when it all arrives!

    • @thejoeblowshow
      @thejoeblowshow 2 роки тому +1

      @@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?

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@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.

  • @NasirKhan-jl2sn
    @NasirKhan-jl2sn 3 місяці тому +1

    any video for dspic30f2010

    • @FriendlyWire
      @FriendlyWire  2 місяці тому

      For now I will stick with PIC microcontrollers :)

  • @ANCHALCHAUDHARY-nk6uv
    @ANCHALCHAUDHARY-nk6uv 3 місяці тому +1

    Do i really need to use Pickit 3, can't I directly dump the code from pc to microcontroller

    • @FriendlyWire
      @FriendlyWire  3 місяці тому

      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.

  • @palprofesional
    @palprofesional 4 місяці тому +1

    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?

    • @FriendlyWire
      @FriendlyWire  4 місяці тому

      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.

  • @orsingmit7574
    @orsingmit7574 2 роки тому +1

    I can't find those pins name in this chip Z86E3116PSC

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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.

    • @orsingmit7574
      @orsingmit7574 2 роки тому +1

      Thanks

  • @ajalprofs8746
    @ajalprofs8746 10 місяців тому +1

    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

    • @FriendlyWire
      @FriendlyWire  10 місяців тому

      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"?

    • @ajalprofs8746
      @ajalprofs8746 10 місяців тому +1

      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

  • @alponurkanduran415
    @alponurkanduran415 4 місяці тому +1

    Hi dude i compiled my code but i cant reach the hex file. I mean it doesnt appear on my project file ?

    • @FriendlyWire
      @FriendlyWire  3 місяці тому

      It's a bit hidden, it shows up in the dist/default/production/ subfolder of your main project folder. Can you find it there?
      Alternatively, if you compile it inside MPLAB IDE, there should be a message where the .hex-file is stored.
      Hope it helps, let me know! :)

  • @TheDiveO
    @TheDiveO 2 роки тому +1

    Anyone else seeing the thumbnail, reading "mains" and the arrow point to the board, and then thinking, oh, BigClive found another crappy power supply?

  • @pdcigbt7293
    @pdcigbt7293 2 роки тому +1

    Program pic 12f683/684/675 sir...thanks..

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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 :)

  • @4rf-garvjain648
    @4rf-garvjain648 Рік тому +1

    Im using PIC18F46K22 but its showing connection fail

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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)

  • @satishkumar-gg5fm
    @satishkumar-gg5fm Рік тому +1

    Can we copy hex file from microcontroller??? Please reply as soon as possible 🙏

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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!

    • @satishkumar-gg5fm
      @satishkumar-gg5fm Рік тому +1

      @@FriendlyWire thanks 🙏

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@satishkumar-gg5fm Happy to help, and thanks for stopping by! :)

  • @shrikantnikam2426
    @shrikantnikam2426 Рік тому +1

    is there any other way to program pic microcontroller without using pickit to save money?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      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
      @shrikantnikam2426 Рік тому +1

      @@FriendlyWire india

    • @FriendlyWire
      @FriendlyWire  Рік тому

      @@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

  • @ibrahimadam450
    @ibrahimadam450 11 місяців тому +1

    Please I want you to assist me to program for a project

    • @FriendlyWire
      @FriendlyWire  11 місяців тому

      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? :)

  • @ajs-tatu-spitstop9235
    @ajs-tatu-spitstop9235 2 роки тому +1

    How to clear pic 18f4550 can u help me

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      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.

    • @ajs-tatu-spitstop9235
      @ajs-tatu-spitstop9235 2 роки тому +1

      @@FriendlyWire let me try notify u shortly

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@ajs-tatu-spitstop9235 Sounds good!

  • @bharathreddy6962
    @bharathreddy6962 4 місяці тому +1

    bro how to do for pickit2

    • @FriendlyWire
      @FriendlyWire  4 місяці тому

      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...

  • @harishharish7323
    @harishharish7323 2 роки тому +1

    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

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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 :)

    • @yaseralali6309
      @yaseralali6309 Рік тому

      Did you solve the problem ?

  • @mohomadashad4641
    @mohomadashad4641 2 роки тому +1

    can i do cording with out this device?

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      Yes, the coding is done just on your computer. You only need it for the final step of transferring the code onto the controller.

    • @mohomadashad4641
      @mohomadashad4641 2 роки тому

      @@FriendlyWire is there other way

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@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.

    • @mohomadashad4641
      @mohomadashad4641 2 роки тому

      @@FriendlyWire ok. what are the others

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@mohomadashad4641 PICkit4 is the newest one, but the PICkit3 works just fine. Why do you want to use a different one?

  • @ranasaeed5807
    @ranasaeed5807 8 місяців тому +1

    sir i need your help

  • @NasirKhan-jl2sn
    @NasirKhan-jl2sn 3 місяці тому +1

    hi

  • @adamismaad9604
    @adamismaad9604 2 роки тому +1

    Can I check a code from PIC18F2420 too?

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      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! :)

    • @adamismaad9604
      @adamismaad9604 2 роки тому +1

      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

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      @@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.

    • @adamismaad9604
      @adamismaad9604 2 роки тому +1

      Oh ok thank you very much

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@adamismaad9604 Happy to help, let me know if it works!

  • @MrWatlow
    @MrWatlow 2 роки тому +1

    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?

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      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! :)

    • @MrWatlow
      @MrWatlow 2 роки тому +1

      @@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.

    • @FriendlyWire
      @FriendlyWire  2 роки тому

      @@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.

  • @pkefvkef4856
    @pkefvkef4856 7 місяців тому +1

    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.

    • @FriendlyWire
      @FriendlyWire  7 місяців тому

      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.

  • @jackski5732
    @jackski5732 2 роки тому +1

    plz redo using C++

    • @FriendlyWire
      @FriendlyWire  2 роки тому +1

      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?

  • @roman_m
    @roman_m Рік тому +1

    and you don't program anything except light bulbs?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      You can program a lot of things with PICs :) What do you have in mind?

    • @roman_m
      @roman_m Рік тому +1

      @@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?

    • @FriendlyWire
      @FriendlyWire  Рік тому +1

      @@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?

  • @anjonnandy
    @anjonnandy Рік тому

    7.15MICROCHIP PASSWORD I NEED

  • @DungLe-sr7tq
    @DungLe-sr7tq Рік тому +1

    The title is a little confusing. I was expected to see a trick to get the source code from a flashed chip, not into it.

    • @FriendlyWire
      @FriendlyWire  Рік тому

      Oh, I see, that thought did not cross my mind at all, thanks for the heads up!

  • @mba2ceo
    @mba2ceo Рік тому +1

    How much code can the PIC hold ? lines ?

    • @FriendlyWire
      @FriendlyWire  Рік тому

      This is hard to say, it depends on the PIC controller. Also, one line of C can result in a lot of operations. For example, the simple command NOP(); (which does nothing) is only one instruction, whereas an operation int c = d*2.789; can be extremely resource-intensive (floating point operation). So: it depends :) Do you have a specific PIC in mind?