1- Getting Started with MPLAB XC8 | MPLAB XC8 for Beginners Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • This is an introduction to programming PIC Microcontrollers with MPLAB XC8 compiler. You'll learn the features of MPLAB X IDE, start a new project, set your configuration bits, build your code and simulate with Proteus.
    For more info and download source code: www.studentcom...
    Have questions, need assistance or looking for source code? Engage with us and please do not forget to support us with any donation:
    Please Donate: www.paypal.com...
    Facebook: / studentcompanion
    Twitter: / stcompanion
    Patreon: / studentcompanion
    Forums: www.studentcom...
    #ProgrammingMicrocontrollers #MicrocontrollersTutorials #MPLABX #MPLABXC8 #MPLABTutorials #StudentCompanionElectronics #PICmicrocontrollerTutorial #GettingStartedMPLABXC8 #MPLABXC8BeginnersTutorial

ความคิดเห็น • 625

  • @StudentCompanion
    @StudentCompanion  3 ปีที่แล้ว +6

    If you found this video useful, please give it a thumbs up 👍 and subscribe to the channel. Also, let me know what topics you want me to cover in future videos by commenting below.
    By simply liking the video or a short comment like Thanks, helps this video in TH-cam algorithm to be found by others. It helps us a lot.

  • @nokuphilasimelane5091
    @nokuphilasimelane5091 7 ปีที่แล้ว +7

    This is the most thorough video i have ever seen, on mplab... thanks sir

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +4

      +Nokuphila Simelane thank you. We appreciate your feedback. More tutorials to be uploaded soon.

  • @davidmarks509
    @davidmarks509 8 ปีที่แล้ว +4

    I am a beginner just getting started I found this very useful thank you

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +David Marks you are welcome! If you encounter any problem to understand our tutorials, let us know. Thanks for watching our videos

  • @gamagehemaratne1
    @gamagehemaratne1 8 ปีที่แล้ว +20

    Dear Sir, Very Interesting. Please add more tutorials. Very difficult even to find a text book written on this subject. Your voice is excellently understood. Clear explanation. Thanks Sir.

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +5

      +Gamage Hemaratne thank you. We appreciate your feedback. We will upload more tutorials.

    • @ChaitanyaVarmaD
      @ChaitanyaVarmaD 5 ปีที่แล้ว +1

      This tutorial more useful to beginners. Add some more tutorials. Thank you.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +2

      Thanks for your feedback. We will.

  • @salvadorgarza461
    @salvadorgarza461 8 ปีที่แล้ว +4

    Will be watching your videos and I may contribute to your patreon as I watch these videos. Thank you for uploading.

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Salvador Garza thank you very much for watching our videos and your contribution will be greatly appreciated.

  • @AirandEnergy
    @AirandEnergy 9 ปีที่แล้ว +4

    This is a great video. I have subscribed due to the fact you are up to date and speak in a common easy to understand way. I am using a PIC16877A and had to reconfigure some of your code to accomadate my chip. Build came out with no problems but the actual chip didn't do anything.. There are no local schools to learn from and I have been studying hard knocks. Hoping your videos will help.

    • @ABTECHNOLOGIES
      @ABTECHNOLOGIES 5 ปีที่แล้ว

      th-cam.com/video/Bk8GiMuFIq0/w-d-xo.html
      For beginners, PIC microcontroller tutorials (first part)
      th-cam.com/video/Uh8kPZ7vcAk/w-d-xo.html
      PIC microcontroller tutorials (second part)

  • @leofiis
    @leofiis 7 ปีที่แล้ว +5

    Tutorias de qualidade!
    Greetings from Brazil

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +4

      +Leonardo Tavares Thank you very much. Muito obrigado.

  • @galalahmedfahmy5482
    @galalahmedfahmy5482 6 ปีที่แล้ว +1

    Simple, Clear and useful, thanks for this very good presntation

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Thank you very much for watching our videos and for your feedback. Much appreciated!

  • @dangtrungnam2809
    @dangtrungnam2809 9 ปีที่แล้ว +5

    Thanks, it's really helpful and straight forward to follow.

  • @keshenanaidu7160
    @keshenanaidu7160 8 ปีที่แล้ว +4

    Easy and straightforward.

  • @martymikov9315
    @martymikov9315 7 ปีที่แล้ว +3

    Nicely done! I am really interest in programming microcontrollers. I would like to learn advanced programming in the future!

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      +Marty Mikov thank you for watching our videos and for your feedback.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Marty Mikov thank you for watching our videos and for your feedback.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Marty Mikov thank you for watching our videos and for your feedback.

  • @yohangao8563
    @yohangao8563 8 ปีที่แล้ว +4

    Very good tutorial, I have been looking for this kind of video, and this is the best!

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      thank you for watching and we are glad it is of assistance to you. Don';t forget to watch tutorial 18 (th-cam.com/video/JxSSVtTj_fA/w-d-xo.html) as well using the code configurator. Thanks

  • @rasmusd3852
    @rasmusd3852 8 ปีที่แล้ว +4

    Thank you very much! Great tutorial! Cheers from Sweden

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      thank you for watching. we appreciate your feedback.

  • @keshenanaidu7160
    @keshenanaidu7160 10 ปีที่แล้ว +3

    Great tutorial! Thanks. Really easy and straight forward to follow.

  • @rabindrasharma
    @rabindrasharma 5 ปีที่แล้ว +2

    Dear sir this is a very comprehensive tutorial, my request is to make us understand he to manually set up registers in memory.

  • @erichmora1949
    @erichmora1949 8 ปีที่แล้ว +2

    Thank you very much from Venezuela.

  • @studentcompanionsastudentc4850
    @studentcompanionsastudentc4850 8 ปีที่แล้ว +4

    We appreciate all your feedback guys. Thanks

    • @tota896
      @tota896 8 ปีที่แล้ว +4

      Thank you. Keep it up guys. your videos are amazing.

    • @studentcompanionsastudentc4850
      @studentcompanionsastudentc4850 8 ปีที่แล้ว +4

      tota896 thanks for your feedback. We appreciate it.

    • @parkashjain5182
      @parkashjain5182 5 ปีที่แล้ว

      Student Companion SA Student Companion वरर

  • @1TELLAURA
    @1TELLAURA 6 ปีที่แล้ว +1

    Thanks for posting this series ... very helpful.

  • @StudentCompanion
    @StudentCompanion  6 ปีที่แล้ว +1

    We appreciate all your feedback guys. Keep commenting with your suggestions for future tutorials. Thank you!

  • @rensvanbreukelen3762
    @rensvanbreukelen3762 6 ปีที่แล้ว +1

    Many thanks from Holland!

  • @songming0101
    @songming0101 9 ปีที่แล้ว +3

    It is Just what I need. Thank you!

  • @moulasahebmohammed1945
    @moulasahebmohammed1945 7 ปีที่แล้ว +1

    Dear sir its soo interesting and too good . It will be so useful if you start online course for students like us...

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      Hi. Thanks for watching our tutorials and for your feedback. Much appreciated.
      We will consider it maybe sometimes in the future as it reuires some resources o run an effective online class.
      In the mean time we will continue to upload more tutorials on TH-cam and on our website: www.studentcompanion.co.za/
      Thanks

  • @mraspot
    @mraspot 7 ปีที่แล้ว +3

    great tutorial for beginners

  • @antonmetzler4927
    @antonmetzler4927 4 ปีที่แล้ว +1

    Thank you. Your videos helped me alot

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      You are welcome! Thanks for your feedback

  • @mmhsf9644
    @mmhsf9644 6 ปีที่แล้ว +1

    Really helpful for beginners

  • @StudentCompanion
    @StudentCompanion  9 ปีที่แล้ว +5

    Thank you +AirandEnergy for your compliment. We are doing our best to record even more. For more and newer tutorials please check our website: www.studentcompanion.co.za

  • @bizu2603
    @bizu2603 7 ปีที่แล้ว +5

    Hello, nice video . For the new guys (newbies) can you please show us how did you made the schematic in Proteus, is there a way? Thank you and keep up the good work:)

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      +Andrew Gheorghiu Thanks for watching our videos. And we really appreciate your feedback. Due to time constraints we don't show all the steps as the video could become too long and people generally don't watch long videos. But check all our projects we explain and show all the steps. Check out this project: th-cam.com/video/lrMXX-qBGlU/w-d-xo.html

  • @JassonRodriguez
    @JassonRodriguez 8 ปีที่แล้ว +6

    U are the BESt!!!!

  • @sheldonnyce1274
    @sheldonnyce1274 5 ปีที่แล้ว +2

    Hi there. Please help. I followed this tutorial to the letter, and when I try to include the headers in the main.c file, for instance #include, it shows a little icon on the left that looks like a lightbulb with an exclamation mark, and the code won't build. When you float the cursor above the icon, it says: "Cannot find include file , For extra info hold control and move mouse over included directive"
    I tried following the prompts, and it didn't help.
    Please help. Is there an easy fix?

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Hi. Did you install the XC8 compiler? Which version of the XC8 compiler did you install? Which PIC model?

    • @sheldonnyce1274
      @sheldonnyce1274 5 ปีที่แล้ว

      @@StudentCompanion I did install XC8 compiler, V2.05, PIC18F45K20

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว

      It shouldn't give you those warnings. Unless you forgot to include the config bit file. Can you post here your full codes. And full error messages?

  • @learningexploration4608
    @learningexploration4608 4 ปีที่แล้ว +1

    Informative, good explanation

  • @Diego4322237
    @Diego4322237 8 ปีที่แล้ว +7

    Muchas gracias amigo, esto es genial. :)

  • @BenQueensland
    @BenQueensland 8 ปีที่แล้ว +7

    Thank you.

  • @muzammilwaziri7263
    @muzammilwaziri7263 6 ปีที่แล้ว +1

    Thank you Soo much Sir...Figured The mistake out

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Good to hear that.
      Thanks for watching our videos

  • @salvadormoran9133
    @salvadormoran9133 8 ปีที่แล้ว +3

    Very good, thank you

  • @karastom2304
    @karastom2304 8 ปีที่แล้ว +4

    Thanks so much you are amazing, can you please do lecture about CAN BUS application or do you know good book about it.

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Takey Asaad Thanks for watching our tutorials. We will work on it.

  • @Alfret17
    @Alfret17 9 ปีที่แล้ว +4

    Thank you!

  • @martian5608
    @martian5608 2 ปีที่แล้ว

    Excellent video. Thanks a lot!

  • @bindugroup319
    @bindugroup319 8 ปีที่แล้ว +4

    great. Wonderful.

  • @mhdhouri2906
    @mhdhouri2906 8 ปีที่แล้ว +3

    good job good channel

  • @SHAWON_BD_TECH
    @SHAWON_BD_TECH ปีที่แล้ว

    wow. good information

  • @fabiovsroque
    @fabiovsroque 8 ปีที่แล้ว +5

    RE3 is input only.

  • @RingQy
    @RingQy 7 ปีที่แล้ว +3

    mplabX 3.55 + xc8 1.41 = super (05.04.2017) hello from Russia

  • @xblackoole
    @xblackoole 9 ปีที่แล้ว +2

    Very good tuto, THX

  • @SCALO_Coimbatore
    @SCALO_Coimbatore 4 ปีที่แล้ว +2

    Dear Sir.......I plane to start for weighing Scale project in XC8 Compilor.So which tutorial topic there ....

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +2

      Hi. Unfortunately we don't have any tutorials covering that topic but there are plenty of such topic on the net

    • @SCALO_Coimbatore
      @SCALO_Coimbatore 4 ปีที่แล้ว +1

      @@StudentCompanion Dear Sir.Kindly request you to put tutotrial for weighing scale XC8 Compilor.From the beginning we learn everything because of all your tutorials.Could not move others tutorial.We can easily understand your tutorials only.

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +2

      @@SCALO_Coimbatore Thanks for your feedback.

  • @anokhautomation4453
    @anokhautomation4453 2 ปีที่แล้ว

    it was a very very useful tutorial for me .thanks for your detailed explanation.
    expecting more project tutorials from you in future.
    👍thank you

  • @alixsonpl7973
    @alixsonpl7973 7 ปีที่แล้ว +3

    great tutorials. And sir, could you please upload the missing videos such as tutorial 23?

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +4

      +HuKu TON thank you for watching our videos and we appreciate your feedback. We will upload all the remaining videos. This is an ongoing playlist we haven't finalize all the videos in this series. Just subscribe to our youtube channel and you'll be notified of new uploads. Thanks

  • @m_to_the_s1050
    @m_to_the_s1050 3 ปีที่แล้ว +1

    What program do you use for the simulations?? Kind regards Melvin

    • @StudentCompanion
      @StudentCompanion  3 ปีที่แล้ว

      Hi. We used Proteus. It's from labcenter.com

  • @engegy2483
    @engegy2483 9 ปีที่แล้ว +3

    the compiler didn't build the program until i defined " _XTAL_FREQ ", How did you build it successfuly without useing this function ?

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +4

      العربي الأصيل You must watch carefully that video because we did use that function and it's explained in the video

  • @AnishRavindranathan
    @AnishRavindranathan 5 ปีที่แล้ว +1

    Seems that some parts are missing, e.g. after MPLAB XC8 for Beginners Tutorial -22 its MPLAB XC8 for Beginners Tutorial -32 where is from 23 to 31? Even as a beginner its easy to understand and follow

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Yes. They will be uploaded in due course. Just subscribe to our TH-cam channel and you'll be notified when we upload new tutorials.
      In the meantime you can get more info on our website. They'll be also extra videos and tutorials on our online store

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Start from the beginning. More info on our website

  • @MRTAG08
    @MRTAG08 4 ปีที่แล้ว +2

    what if we use external occilator? and LATB for P18 Then what for P16 Series??

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Yes, you can use an external oscillator, in the configuration bits window, select either XT for Crystals of 4MHz or below or HS from 4MHz and above.
      If you use newer enhanced mid-range PIC16 series, you can still use the LAT register but for older ones like the PIC16F877, you will have to use the PORT register for reading and writing.

  • @larrypoorman2300
    @larrypoorman2300 9 ปีที่แล้ว +2

    I have downloaded and installed the latest versions of MPLAB X and the C compiler XC8. When I do the build on the code in this tutorial I get the messages that TRISBbits and LATBbits are not defined. Can you tell me which include contains these definitions?

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +1

      Hi Larry Poorman did you set the configuration bits correctly of the PIC you used? did you include these configurations? Paste the screenshot of your code so we can have a look what could be the problem

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +2

      Ashwani Garg What kind of errors are u getting? did you use the same PIC that we used in this tutorial? Did you set correctly your configuration bits?

    • @engegy2483
      @engegy2483 9 ปีที่แล้ว +2

      Larry Poorman
      Try this insted of TRISBbits-----> TRISBbits.TRISB0 = 0

  • @ngocbaopham8127
    @ngocbaopham8127 9 ปีที่แล้ว +3

    Thanks. This is a great video. Can you do more video?. ADC, Interrupt, timer, counter...
    Please.

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      Ngọc Bảo Phạm You are welcome!
      We are busy recording more videos, just subscribe to our TH-cam channel and you will be notified of new tutorials as they are uploaded. At the mean time, you can visit our website for more tutorials: www.studentcompanion.co.za/category/MPLAB-XC8-

    • @ngocbaopham8127
      @ngocbaopham8127 9 ปีที่แล้ว +2

      Thanks. I am very grateful

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      We appreciate you are enjoying our tutorials. Don't forget to subscribe

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      Ngọc Bảo Phạm Have you watched this one: th-cam.com/video/BBLsoeQlYyw/w-d-xo.html

    • @ABTECHNOLOGIES
      @ABTECHNOLOGIES 5 ปีที่แล้ว

      th-cam.com/video/Bk8GiMuFIq0/w-d-xo.html
      For beginners, PIC microcontroller tutorials (first part)
      th-cam.com/video/Uh8kPZ7vcAk/w-d-xo.html
      PIC microcontroller tutorials (second part)

  • @esvw1986
    @esvw1986 5 ปีที่แล้ว +1

    nice job. thank you.

  • @jayachandran5444
    @jayachandran5444 6 ปีที่แล้ว +1

    nice tutorial

  • @thuonghd3101
    @thuonghd3101 8 ปีที่แล้ว +4

    Thank you so much!!!!

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Thương HD You are welcome. Don't forget to watch Tutorial 18 to learn how to blink an LED with MPLAB Code Configurator. Much easier, the configuration bits are generated graphically (th-cam.com/video/JxSSVtTj_fA/w-d-xo.html)

    • @thuonghd3101
      @thuonghd3101 8 ปีที่แล้ว +4

      +StudentCompanionSA oh, wonderful ! Your lessons are really helpful. ^^

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +5

      +Thương HD Thanks. We are glad they are assisting you and others

  • @stigtheghost
    @stigtheghost 9 ปีที่แล้ว +4

    Great tutorials I have everything working with MPLABX and Xc8 and my PIC16f1823 but what's the IDE you are using to do the situation is it free where can I get it :)

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      pier shaw It's called Proteus. It's a great tool for Microcontrollers simulation. unfortunatly it's not free, but there is a limited free demo version that you can download from their website: www.labcenter.com/index.cfm

    • @stigtheghost
      @stigtheghost 9 ปีที่แล้ว +3

      Oh thank you I found it it's great

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +4

      pier shaw you are welcome!

  • @jamescullins2709
    @jamescullins2709 7 ปีที่แล้ว +3

    question, is the MPLAB XC8 free or is only free for 60 days? Good job on the video. Thanks

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      +James Cullins Thank you for watching our videos.
      MPLAB has two types of licences. Free license and professional license where you need to buy the license. The free version is absolutely free with no time limit or code size restrictions. The difference from the professional version is the code optimization. The generated Hex code of the professional version might be a bit smaller in size than the free version. For small and medium project you might not see much differences.
      When you install XC8 for the first time it will give you the professional features for 60 days after that it will become like the free version.

    • @jamescullins2709
      @jamescullins2709 7 ปีที่แล้ว +3

      Thanks, with a little reading I found that on their web page. How does it compare to MikroC for PIC compiler? I have it.
      Thank you for your quick response, keep up the good work.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +4

      +James Cullins The difference in terms of functionalities or price?
      If you mean in terms of price, as we explained earlier on, with xc8 free version there is no time limit or the size of the code you can compile.
      With mikroC there is also no time limit but the free version allows you to compile only a code which is 2Kb or less in size. So if you have a long code or a code with floating point or long variables with mikroC you won't even compile your code. It will give you an error message: Demo limit.

    • @jamescullins2709
      @jamescullins2709 7 ปีที่แล้ว +4

      I was wondering about the functionality .
      Thanks so much for the quick responses.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +4

      +James Cullins it's all depends from user to user. As mplab xc8 is manufacturer's compiler it'll akways guarantee you to support all devices and all features. Everything the device can do you'll be able to implement with MPLAB. With their new code configurator add on tool, makes it easy to configure peripherals. MPLAB libraries for Application helps you to configure advanced and complex peripherals.
      On the other hand, MikroC tends to make everything easy. You'll find it easy to use mikroC as a beginner then mplab because they supply you with tons of libraries to access many peripherals or control external devices. The drawback is that their libraries are embedded into their compiler. You cant edit or view them and they try to simplify everything and not supporting all features. So for some applications you might be stuck.
      But the choice is yours depending on your level of programming and what you are designing or plan to design.

  • @marhsall-bw5kv
    @marhsall-bw5kv 9 ปีที่แล้ว +4

    I'll be using PIC16F628A.. do you also have tutorial for Pic16f?

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +5

      marhsall 27777 We don't have tutorials for the PIC16F series, because the logic is the same. If you understand one PIC, you can be able to program another model. All you have to know is the registers available in your PIC, like the PIC16F don't have the LAT register but the rest is not much different.

  • @ShahbazParviezQazi
    @ShahbazParviezQazi 6 ปีที่แล้ว +1

    multitasking RTOS with PIC18 with mplab xc8 all i cant find on internet more. please make a series on this also.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      We will look at the them in the future. RTOS is easier to implement with PIC32 than PIC18F.

  • @marcosmecatronikify
    @marcosmecatronikify 6 ปีที่แล้ว +1

    Thank you for the tutorial, it is very clear and interesting. Could you recommend me a book where I can read details about what you are explaining in your tutorial, for example: ports management, interruptions, ADC, etc.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Thanks for watching our videos and for your feedback. There are many books we are reading, but to get the details of port management and other registers the best is to read the PIC datasheet. No book can explain in detail compared to the PIC datasheet.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      For books we sometimes use the books by professor Dogan Ibrahim

    • @marcosmecatronikify
      @marcosmecatronikify 6 ปีที่แล้ว +1

      Student Companion thank you very much!

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      You are welcome!

  • @najehmchirgui8117
    @najehmchirgui8117 8 ปีที่แล้ว +4

    Thanks you so much

  • @srujansriram
    @srujansriram 8 ปีที่แล้ว +4

    Hello excellent tutorial! I use Mac OS and have installed MPLAB X IDE v3.15. However, Proteus is not supported on Mac OS. Which spice tool can I use? I would prefer that it be exactly similar to what you are using (plus has models of Microchip's PIC).

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Srujan Sriram We are not using Mac OS so it's gonna be difficult to suggest a spice tool for Mac Users, I would suggest to inquire from Microchip, they are in better position to respond to this query. Thanks

    • @srujansriram
      @srujansriram 8 ปีที่แล้ว +4

      +StudentCompanionSA Thank you for your response. Questions:
      1. How do I get the Proteus professional along with the PIC model?
      2. I am seeing here that these tools are industry grade and hence, expensive (www.labcenter.com/products/vsm/picbundle.cfm). Is that correct?Are there any student grade tools with PIC models?
      3. It seems cheaper to just buy a PIC development board. Any recommendations?

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      1. You can get a quote online and specify what tools and models to use, or contact them directly if you want a student discount.
      2. There is a discount for student, you can contact them directly: www.labcenter.com/ordering/eprices.cfm
      3. There are many boards on the market depending on what you want to learn. My favorites: EasyPIC v7 from Mikroelekronika,it's supports more than 387 PIC models with many peripheral supports, it's also on special (15% off) for these 2 days. You can use it with Mikroelektronika compilers (mikroC, mikroBasic...) but also with MPLAB compilers products by loadinding directly the hex code: www.mikroe.com/easypic/
      It is the board we used in this tutorial: th-cam.com/video/c976a4Fmrps/w-d-xo.html
      Microchip also have very nice tools, the low cost Curiosity Development Board is also on special :www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=DM164137
      and the more comprehensive development board, the Explorer 8: www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=DM160228

  • @agnichatian
    @agnichatian 10 ปีที่แล้ว +2

    Why does the LVP mode need to be disabled ? I noticed that my debugger demands it (Pickit 3).

    • @StudentCompanion
      @StudentCompanion  10 ปีที่แล้ว +3

      agnichatian LVP is another form of programming a PIC using low voltage but this one is very tricky, if any condition is not met, the processor will reset. That is why it is always advisable to disable it unless you gonna program your PIC in LPV mode. I don't see why Pick 3 will request it!

  • @SoftEngineeringSolutions
    @SoftEngineeringSolutions 8 ปีที่แล้ว +4

    I am new please tell me what is the name of the software for simulate Hex file ???..Thank you

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +Umar Hayat That software is called Proteus. It's from Labcenter Electronics.

  • @vishnusukumaran2744
    @vishnusukumaran2744 6 ปีที่แล้ว +2

    when i write the code , unresolved directives comes under #include and #include with a red underline. any suggstiions ?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +2

      Which PIC are you using? The versions of MPLAB X IDE and XC8 Compiler?
      Do you need those directives? Chances are you don't need them so you can just delete them. Only use what you need. Even if they were included by default in this tutorial they are not used.

    • @vishnusukumaran2744
      @vishnusukumaran2744 6 ปีที่แล้ว

      thanks for reply sir, i typed word by word from your video,but as mentioned #include and #include with a red underline, when buit up process, also when run this pgm,this error comment appears
      make[1]: *** No rule to make target '.build-conf'. Stop.
      make: *** [.build-impl] Error 2 ---this comment appears, also

  • @ojieokogua4605
    @ojieokogua4605 4 ปีที่แล้ว +1

    Thank you so much for your videos sir.Please i just installed mplab x ide v4.05 and xc8 v2.10 and when i create c header file it keeps showing the error "cannot find include . And #include and every other header file highlighted in red. I have tried to uninstalled and reinstalled yet the problem is still there.Please sir how do i resolve this?

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Hi. Did you try to write a short program and build it and see if it will not build successful without generating any errors? Don't worry if MPLAB X ID shows those red squiggly lines, it does not always mean it's an error, you can just ignore them, sometimes they will just go away. They won't prevent you from compiling successful your code. It's a long know problem and Microchip knows about it because many people in microchip forum have reported it but so far nothing has been done about it.
      Sometimes reparsing your project can resolve them (right click and select reparse).
      But if when you click on build if it fails to compile then post your code here and the full error message and we will assist you further.

  • @hco77
    @hco77 9 ปีที่แล้ว +3

    hi! thanks for the videos, i only have a question, in the main program, when i write the line OSCCON = 0x76 meaning an 8Mhz internal clock source and i run the simulation in proteus the display keeps clear, but when i delete this line the lcd shows what it got to show, so whats the problem? can u help me please?

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      Hi hernán cote , did you set your configuration bits correctly?
      It's a bit strange and it's a bit difficult to know exactly what could be the problem unless we see your code.
      Can you send us your codes so we can have a look.
      Send on facebook.com/StudentCompanion

  • @nashs.4206
    @nashs.4206 4 ปีที่แล้ว +1

    Great video series! Quick question though: why do we define the internal oscillator frequency to be 8 Mhz? How do we know to choose that value? Can the internal oscillator generate other frequencies or can it only generate certain frequencies? Where in the datasheet would I check to get this information (for reference, the PIC microcontroller I'm using is PIC16F18446, but I think these questions are general enough that they apply to any PIC microcontrollers).

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Hi. Thanks for the feedback. You can use differents internal oscillator frequencies, we just prefer this 8MHz for our tutorials. But you can't just pick-up any internal frequency, each PIC has a set of fixed internal oscillator frequencies you can choose from unlike if you select to use an external oscillator which will give you a wide choice. This information about internal oscillator options is PIC dependant, some have a many oscillator selection options, others just a few and some don't even have an internal oscillator or have but not very accurate like old PIC models, the PIC you are using is quite modern with possibly a wide choice of accurate internal oscillator frequencies.
      The frequency selection is usually project dependant, some peripherals require high frequencies while others dont.
      In general, higher frequency consume more power especially if your project is battery powered compared to projects run at lower frequency, so don't unnecessarily run your project at very high frequency if not required.

    • @nashs.4206
      @nashs.4206 4 ปีที่แล้ว +1

      @@StudentCompanion Hello, thank you for your response :) I am glad that I found this channel because you provide great lessons, and you respond to comments. It is rare to find such channels!
      I have another question. I am using MPLAB X IDE v5.40 and learning how to use configuration bits and since this video uses an older version of MPLAB X, things are slightly different. Now, if you feel that the following questions are better answered using other resources, I would highly appreciate if you could guide me to them.
      Consider the following:
      1) In this link, you will find a screenshot of the configuration bits window for the clock selection: imgur.com/a/q10yfIY
      2) In this link, you will find a screenshot of the relevant section of the datasheet for the PIC16F18446:
      imgur.com/a/05G15S6
      In the first link, you can see that I have turned off the external oscillator mode (since I want to use the internal oscillator) and I have selected HFINT32 as the internal oscillator. Under the "settings" tab, the description states that the OSCFREQ = 32 MHz. Am I correct in assuming that OSCFREQ is the same thing as FOSC? I.e. both refer to the oscillation frequency of the selected oscillator?
      Now, in the second link, you can see that the description says that I can select up to 32 MHz for this oscillator source. However, it seems to me that according to the first link, the oscillator's frequency is locked to 32 MHz. How would I select HFINT as the oscillator source, but make it so that its oscillation frequency is, say, 16 MHz? Would I use #define _XTAL_FRQ 16000000 ?
      Thank you for your help.

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +2

      Hi, I don't think you are selecting correctly the oscillator. You did not post the full configuration bits for me to see all your selection. Your PIC can select up to 32MHz internal oscillator but you didn't show the full configuration bits, I can't see how you selected the internal oscillator. We will read tye datasheet later to provide you with a definate answer.
      The frequency is not selected in the configuration bits, you set it with the OSCCON register in your main program. Read the datasheet on the OSCCON register section.
      For simpler clock selection, you can use MPLAB Code Configurator as explained in this video: th-cam.com/video/JxSSVtTj_fA/w-d-xo.html
      For easy assistance, please ask the question on our Forum, there it's easier to post images or even MPLAB X Project so that we can see your configuration bits and the rest of the project.
      Our Forum: www.studentcompanion.co.za/forums

    • @nashs.4206
      @nashs.4206 4 ปีที่แล้ว +1

      @@StudentCompanion I have posted the question in your forum as well.

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Great! We will have a look at it.

  • @jesusjimenezleon7786
    @jesusjimenezleon7786 7 ปีที่แล้ว +2

    A question:
    If in bit configuration the oscillator value has been already declared, why we need to configurate OSCCON register?
    greetings

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Jesús Jiménez León in bit configuration you can only select either to use internal, XC, HS etc oscillator. If you opt to use internal then you can set the OSCCON register.

    • @jesusjimenezleon7786
      @jesusjimenezleon7786 7 ปีที่แล้ว +2

      awesome, I think i'm working out all tutorials.
      Thanks.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +Jesús Jiménez León Thank you. We appreciate your feedback.

  • @kamalenreddy2179
    @kamalenreddy2179 8 ปีที่แล้ว +4

    Is there a free alternative or free version of proteus that one can download to view the schematic?

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Kamalen Reddy you can download a free demo version of Proteus for free on their website. You can view schematic with it.

    • @kamalenreddy2179
      @kamalenreddy2179 8 ปีที่แล้ว +4

      Do you know what their web address is?

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Kamalen Reddy you can download a free demo version on this link: www.labcenter.com/downloads/

    • @kamalenreddy2179
      @kamalenreddy2179 8 ปีที่แล้ว +4

      Thank you

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +Kamalen Reddy you are welcome!

  • @geoffreyluora5253
    @geoffreyluora5253 7 ปีที่แล้ว +1

    am getting an error ------unable to resolver identifier TRIBbits---- kindly assist
    Thanks so much for your tutorial and thanks in advance for your assistance

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      Hi. It's TRISBits and not TRIBbits as you are writing it. There is an 'S' missing.

  • @hakanozturk7442
    @hakanozturk7442 4 ปีที่แล้ว +1

    How can I find Peripheral Libraries that I can use for Mplab XC8 in Microchip Web Site.

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Hi. You can download the peripheral libraries at the same location where you downloaded the XC8 compiler. They're now called Legacy peripherals libraries. Make sure to use an older version of XC8 compiler because from version 2.0 they no longer suppprted. Watch the beginning of this video to learn more: th-cam.com/video/4WaB_Lj8FnY/w-d-xo.html

  • @sahlatube7356
    @sahlatube7356 6 ปีที่แล้ว +1

    السلام عليكم أستاذ هشام لدي مشكلة مع الدالة
    - Lcd_init()
    في برنامج
    mikroc
    وبرنامج
    mplab
    بحيث لايقوم الربرنامج بتنفيذها ويظهر الخطأ التا
    Undeclared identifier 'Lcd_Init' in expression

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว

      Please write your question in English. We don't understand Arabic.

  • @architbhargava8035
    @architbhargava8035 8 ปีที่แล้ว +3

    Hey,can I program PIC32 micrro-controller using pickit 2 using MPLAB?

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      hi, if you open the pickit2 user guide it lists all the devices it supports

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +4

      +archit bhargava It supports PIC32 but it might not support the latest PICs as it is discontinued, users are adviced to use the Pickit3. You'll have to check if your device is supported.

  • @robertparenton7470
    @robertparenton7470 6 ปีที่แล้ว +1

    Thank You!

  • @hemlinshaji8211
    @hemlinshaji8211 4 ปีที่แล้ว +1

    I had built program according to the vedio in Mplab and while try to simulate in Proteus, there it showing "SCSx bits have been set. This feature is not modelled -". Can you help me to sort out this error

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +2

      It's difficult to guess what could be the problem without more information . Did you use the same PIC as in this video? Did you build a new hex file or used our hex file? Is your schematic correct?

    • @hemlinshaji8211
      @hemlinshaji8211 4 ปีที่แล้ว

      @@StudentCompanion problem solved . In edit properties I selected attach hierarchy module option. Then problem get solved . Thank you for your support

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว

      You are welcome!

  • @actyon20
    @actyon20 5 ปีที่แล้ว +1

    I am getting this error when I am trying to run the .hex file in Proteus:
    [PIC18] PC=0x0000. $MCLR$ is low. Processor is in reset. [U1]

    • @actyon20
      @actyon20 5 ปีที่แล้ว +1

      nwm. It works now. Somehow I didn't browse correctly for the .hex file? Strange, I can swear that I put the correct hex file.
      Anyway, thanks and take care.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +2

      Good to hear you managed to fix it.

  • @kckasun
    @kckasun 4 ปีที่แล้ว +1

    Sir, could you explain why it's not required to give power supply to the pic in the Proteus schematic

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +2

      Hi. The pins for power are just hidden. You can right click the pic and show the hidden pins you will see the power pins.
      It's not important, that's how they modelled the simulation component of the PIC, you are not simulating the pic power but the code, it's already assumed it's powered whether by 5v or 3.3v it doesn't matter

    • @kckasun
      @kckasun 4 ปีที่แล้ว +1

      @@StudentCompanion Thank you very much for the prompt reply sir.

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +2

      You are welcome!

  • @ignasmixer
    @ignasmixer 7 ปีที่แล้ว +4

    14:21 Code not working. Can you paste working somethere code? Also if i name my source file the same as header file error occurs saying the name already exist.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      What do you mean code is not working I must paste something working? You can see by your own eyes that the code is working by that simulation. They must be something wrong you are doing on your part.
      Is your code compiling? What errors are you getting?
      If the source file and header files have different file extension as they should, one .H and the other .C there is no way it can give you an error of same file already exist.
      You can download this tutorial source codes from our website.

    • @ignasmixer
      @ignasmixer 7 ปีที่แล้ว +3

      I see it is working for you not for me. Maybe some typo error in my case. I'm asking kindly if you can paste your code somethere, where i could copy and try it for myself.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      +Josh3292 you can download the code of this video from this link at the bottom of the page. If you have any more questions, feel free to ask: www.studentcompanion.net/en/introduction-to-microchip-xc8-compiler/

    • @ignasmixer
      @ignasmixer 7 ปีที่แล้ว +3

      These are my codes:
      i.cubeupload.com/KU1Cgk.png
      i.cubeupload.com/pZQi5F.png
      i.cubeupload.com/fEpRMx.png

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      We can't open those links, please send us on email or on our Facebook page: facebook.com/StudentCompanion/

  • @jeromembeche8907
    @jeromembeche8907 5 ปีที่แล้ว +1

    Thanks for the video. it helped a lot but i think you made a mistake while explaining the reset section on the MCLR pin.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Thanks for your feedback. Can you clarify more about the mistake?

  • @reho9393
    @reho9393 2 ปีที่แล้ว

    Error while running in Proteus " [PIC18]PC=0x0000. $MCLR$ is low. Processor is in reset. " Can you guide me clear this error?

  • @mohmmadismail521
    @mohmmadismail521 6 ปีที่แล้ว +1

    sir your all videos is very good
    plz sir one video make for sms control ralay with code
    plz plz plz Reply me

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +2

      Hi. We will create one an sms controlled relay , it's part of our playlist. But we won't do it now. We have other videos to do before it.

    • @mohmmadismail521
      @mohmmadismail521 6 ปีที่แล้ว +1

      Thanks sir your is very NICE

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      Thanks

  • @jayeshkumarpr6219
    @jayeshkumarpr6219 6 ปีที่แล้ว +1

    hi sir
    if i want to learn mplab ,should i learn c language at first? i have only basic knolodge in c language. which is the better way to learn mplab?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r you can learn both at the same time. MPLAB XC8 is ansi compliant, it uses C syntax. If you have basics knowledge of C that's great if not continue to learn together with XC8 as this compiler has it's own syntaxes as well especially how to access PORTS.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r Check the MPLAB Code Configurator, it generated easy to understand codes for your peripherals. It will make your learning easy:
      th-cam.com/video/JxSSVtTj_fA/w-d-xo.html

    • @jayeshkumarpr6219
      @jayeshkumarpr6219 6 ปีที่แล้ว +1

      thank you very much. i will try and let u know feed back

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r you are welcome!

  • @unrmaestro
    @unrmaestro 5 ปีที่แล้ว +1

    when i create a new source file #include is made by default should i leave it or delete it i am kinda confused or move to header file?

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Leave it. If you delete it, your code won't compile. It include the PIC hardware details

    • @unrmaestro
      @unrmaestro 5 ปีที่แล้ว +1

      @@StudentCompanion what about the other declaration such as stdio and stdlib

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Those are standard C libraries. They are needed in some applications like when using standard C Printf() ect. But for simple projects like blink Led you don't need them. You can google them to het more information about them then you'll know when to include them.

  • @Fubar12341
    @Fubar12341 9 ปีที่แล้ว +3

    Thank you for a good video
    I am having problems with the 1 second delay line as the 'Error undefined identifier' keeps appearing. any ideas of what i have done wrong ?
    Chris

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +4

      Chris Perkins Did you define your oscillator frequency? normally before you use this delay function, you must define your oscillator frequency first using the: #define _XTAL_FREQ xxxxxxxxx (with the xxx your frequency. if you intend you use 8MHz, then it you can define as: _XTAL_FREQ 8000000 ). In this tutorial, we defined the frequency in the XC8.h file.

    • @Fubar12341
      @Fubar12341 9 ปีที่แล้ว +3

      I have found the problem , I had missed one of the 'Curly Braces' from the end of the program. Thanks for the help. Just trying it on Proteus and then to convert the project to run on an 18F4550. I will let you know how I get on.

    • @StudentCompanion
      @StudentCompanion  9 ปีที่แล้ว +3

      Okay good luck. Let us know if you manage with the PIC18F4550

    • @lilaayad5776
      @lilaayad5776 8 ปีที่แล้ว +3

      +StudentCompanionSA I also worked on the same PIC18F4550 and I want to Know if the syntaxe is the same with other pic
      I also want your chanal plz to subscribe because I serch tutorial No. 20 and i don't foun it thks

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +Lila Ayad The syntax is the same, the only difference is the configuration bits, you have to set according to this PIC

  • @jayeshkumarpr6219
    @jayeshkumarpr6219 6 ปีที่แล้ว +1

    can you show how to configure header file in ds pic33fj256gp710, i have tried to configure, but i didnt see mclr option and the options are different from 18 f

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Jayesh kumar p r Hi. At the moment we are working with only 8-bit microcontrollers.

  • @howilliam1688
    @howilliam1688 5 ปีที่แล้ว +1

    Hi sir, thanks for your introduction. Can I ask what is the simulate program you are using in the video?

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Hi. Thanks for watching our videos and for your feedback. The simulating software is Proteus.

    • @howilliam1688
      @howilliam1688 5 ปีที่แล้ว +1

      @@StudentCompanion I was wondering if the free version of Proteus can run the simulation? do you think it's possible?

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      The free version doesn't allow you to save your work and it only runs simulation of provided examples. That's how it used to be. I don't know now. You can try it yourself

    • @howilliam1688
      @howilliam1688 5 ปีที่แล้ว +1

      thanks for your kindly reply.

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      You are welcome!

  • @khairulalamsojib3114
    @khairulalamsojib3114 7 ปีที่แล้ว +4

    Hi,
    how can i get Proteus, cracked version.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +4

      +Khairul Alam Sojib we don't advocate cracking software. You must buy a genuine license from Labcenter Electronics (www.labcenter.com)

  • @argh1969
    @argh1969 6 ปีที่แล้ว +1

    Why do you loop over __delay_ms(50) 20 times instead of simply calling __delay_ms(1000) ?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      +Grant Smith in the older version of xc8 compiler it was giving errors when you use a longer delay. To overcome that was to loop several times a shorter delay. But this has been resolved in the current version of XC8. Now you can simply call __delay_ms(1000). It will work without problems.

  • @jboy4real
    @jboy4real 3 ปีที่แล้ว +1

    Please do you know the subscription cost of microchip xc8 for

    • @StudentCompanion
      @StudentCompanion  3 ปีที่แล้ว +1

      XC8 is for free but with only some code optimisation. If you need the professional license, you can either buy the license or pay a monthly subscription which is around $30 per month if my memory is still correct. But you can get the correct price from MichrochipDirect.

  • @hosanalove
    @hosanalove 8 ปีที่แล้ว +4

    Hello Studencompanion, i´m so happy because i have found you. Your Tutorial is the best. So please can you help me? i have to Programme (whit MPLAB) a srf06 Ultraschallsensor with the PIC32MZ1024ECG100 and i don´t have any idea how i can beginn. the srf06 ist connect through a 4-20mA current Loop. Please can you give some idea? thank in advance!

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +hosanalove According to it's description, you just need some resistors to convert the output current into voltage. You can use the analog to digital converter module of the microcontroller and display it. Check our analog to digital tutorial.

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +hosanalove Check out this: www.robot-electronics.co.uk/htm/srf06tech.htm

  • @yogeshraj5331
    @yogeshraj5331 4 ปีที่แล้ว +1

    Hello sir, I loved your videos and I am constantly watching it. But sir I have a problem with my project and I need to contact you. Can you give any contact information?

    • @StudentCompanion
      @StudentCompanion  4 ปีที่แล้ว +1

      Hi. Thanks for your feedback. You can ask your questions here on TH-cam or in the Forum on our website (www.studentcompanion.co.za/forums). Please note we don't provide tutorial support in private messages.

  • @crtsuznik
    @crtsuznik 6 ปีที่แล้ว +1

    I've done everything in the video and the simulation works, however when I try the same in real life it doesn't work. The led blinks, but it's really fast. Changing the delay doesn't effect it. I did however disconnect it from power and placed the pic into a breadboard and powered it (5V to vcc and gnd to vss)...and connected the led. I did nothing else so I might be missing something. I'm using a PIC18F4520 for which the simulation works. Any advice?

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      If the delay is not working correctly it might be oscillator frequency issue.
      Are you using internal or external oscillator? If external, the crystal oscillator value is it correctly configured in code?
      If using internal oscillator, did you configure it correctly and configured the OSCCON register correctly with what value?

    • @crtsuznik
      @crtsuznik 6 ปีที่แล้ว +1

      I did everything exactly like in the video. The only difference is the pic version. I'm using the internal one. From what I can tell, the OSCCON should be set to 0x76 with my pic too. ww1.microchip.com/downloads/en/devicedoc/39631e.pdf ...page 32
      I defined the frequency the same way as shown in the video. #define _XTAL_FREQ 8000000
      I've also noticed that when running the simulation, it runs, but gives an error. "[PIC18] PC=0x7FBA. The SCSx bits have been set. This feature is not modelled - the model continues to clock itself as before." Not sure if that matters though.
      Since I did disconnect the pic from the programmer and later powered it with gnd and vcc, could that be effecting the program somehow? Maybe I should change something in the configuration bits part.

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      That's very strange, it should work, the OSCCON of 0x76 should also work well with your PIC. Please upload your MPLAB and Proteus projects in the Forum. We will have a look: www.studentcompanion.co.za/forums/

    • @crtsuznik
      @crtsuznik 6 ปีที่แล้ว +1

      Will do. Thanks for the help.
      Edit: here's a link for anyone with the same problem...if we manage to fix it anyway...www.studentcompanion.co.za/forums/topic/led-blinking-problem/

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      You are welcome!

  • @partscience
    @partscience 7 ปีที่แล้ว +2

    Hello everyone I have a question about pic programming times that how many times does pic microcontroller programmable and how can I find that my microcontroller now programme again X Times.And about PIC18F46K22 that how many times does it programme.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +PART&Co., by chipTALHAelectro hi. You can program a PIC microcontroller more than 100 000 times. With newer PIC Microcontrollers even very higher than this number. Read your PIC Microcontroller datasheet to get the exact number of times as it might be different from PIC to PIC.
      I don't think there is a way to find out how many times you have already programmed your PIC.
      Maybe you can inquire from Microchip directly. They might have some special tools for that. But this is my guess.

    • @partscience
      @partscience 7 ปีที่แล้ว +2

      Thanks!!! Sir please also upload a video about how can I upgrade the new PICKit3 Original Programmer Firmware latest version using mplab x ide.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      +PART&Co., by chipTALHAelectro thanks.

  • @lorenrus
    @lorenrus 6 ปีที่แล้ว +1

    Hi :)
    if you want to use the internal oscillator in addition to register Osccon you do not even have to set the register Config1h as the datasheet says ? Thanks

    • @lorenrus
      @lorenrus 6 ปีที่แล้ว +1

      If you want , we can talk trought email :)

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว

      +Lorenzo Ruscitti you must always follow what the datasheet says. We don't understand your question

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว

      +Lorenzo Ruscitti talk about what through email?

    • @lorenrus
      @lorenrus 6 ปีที่แล้ว +1

      Student Companion I have read the datasheet of your Pic , image on page 27, the block control clock has in input some bits of Osccon register and some bits of Config1h register.
      Why do not you set the bits of Config1h ? Thanks

    • @StudentCompanion
      @StudentCompanion  6 ปีที่แล้ว +1

      config1h was set in the configuration bit. That's the first bit we configured when we created the header file

  • @ismailkhan887
    @ismailkhan887 5 ปีที่แล้ว +1

    Why does it show me "Target Memory Views" not " PIC Memory Views" for Configuration Bits ?

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Meaning you are looking at wrong place

    • @ismailkhan887
      @ismailkhan887 5 ปีที่แล้ว +1

      @@StudentCompanion Brohter, I klicked on Windows and then I came down to the "Traget Memory Views" because it doesn't show me the "PIC Memory Views".
      It shows me "T.M.V." instead of "PIC M. V.". LCD Program does not work with that configuration Bits that I made from your toturial, but this time the Program works for 7-segment_Display.
      Thank you for your replay!

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว +1

      Which PIC are you using? What is the version of your XC8 compiler and MPLAB X IDE?

    • @StudentCompanion
      @StudentCompanion  5 ปีที่แล้ว

      If the LCD doesn't work, do you get error messages when you compile the code?

  • @dineshreddy4454
    @dineshreddy4454 ปีที่แล้ว

    im having trouble with using delay ms() function sir

  • @abdallahabuhirrah1459
    @abdallahabuhirrah1459 7 ปีที่แล้ว +1

    How do I know the value of OSCCON for another controller? I have 18F4620, I opened data sheet but I am not which value to take, can you advise please

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +2

      It will depend on your selected internal frequency. The OSCCON oscillator control is explained on page 30 of the datasheet. If you use 8MHz as in our example, you can use:
      OSCCON =0x76 //this in binary is: 1110110. Your can check the datasheet to see the selected bits.

    • @abdallahabuhirrah1459
      @abdallahabuhirrah1459 7 ปีที่แล้ว +1

      This is perfectly clear answer, thank you a lot it really help me.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +1

      You are welcome.

  • @nhungphamthi7755
    @nhungphamthi7755 7 ปีที่แล้ว +4

    Thank you for your video. I dit same in your video but it failed. Can you help me, please?
    make[2]: *** [build/default/production/led.p1] Error 1
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
    (908) exit status = 1

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      +Nhung Phamthi Hi. Can you paste your full code so that we can see if you missed something. Paste also the full error and build messages

    • @nhungphamthi7755
      @nhungphamthi7755 7 ปีที่แล้ว +2

      it's here.
      make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
      make[1]: Entering directory 'C:/Users/Nhung/MPLABXProjects/led.X'
      make -f nbproject/Makefile-default.mk dist/default/production/led.X.production.hex
      make[2]: Entering directory 'C:/Users/Nhung/MPLABXProjects/led.X'
      "C:\Program Files (x86)\Microchip\xc8\v1.41\bin\xc8.exe" --pass1 --chip=18F2220 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/led.p1 led.c
      led.c:20: error: (192) undefined identifier "_XTAL_FREQ"
      (908) exit status = 1
      nbproject/Makefile-default.mk:100: recipe for target 'build/default/production/led.p1' failed
      make[2]: Leaving directory 'C:/Users/Nhung/MPLABXProjects/led.X'
      nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed
      make[1]: Leaving directory 'C:/Users/Nhung/MPLABXProjects/led.X'
      nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
      make[2]: *** [build/default/production/led.p1] Error 1
      make[1]: *** [.build-conf] Error 2
      make: *** [.build-impl] Error 2
      BUILD FAILED (exit value 2, total time: 2s)

    • @nhungphamthi7755
      @nhungphamthi7755 7 ปีที่แล้ว +2

      This is full code. It's just another name.
      #include
      #include
      #include "led.h"
      void main(void) {
      TRISBbits.RB0 = 0;
      OSCCON = 0x76;
      while (1)
      {
      LATBbits.LATB0 =~ LATBbits.LATB0;
      for ( int countDelay; countDelay

    • @nhungphamthi7755
      @nhungphamthi7755 7 ปีที่แล้ว +2

      I watched your video many times but i don't know where is errors in my code.

    • @StudentCompanion
      @StudentCompanion  7 ปีที่แล้ว +3

      +Nhung Phamthi It's complaining about undefined identifier "_XTAL_FREQ ". Did you define this in your led.h file? You cannot use the delay functions without specifying the frequency. If you're gonna use 8MHz, then write: #define _XTAL_FREQ 8000000

  • @JassonRodriguez
    @JassonRodriguez 8 ปีที่แล้ว +3

    excellent!! I have a problem with xc8'S instalation. On the installation directory when I clic next, shows this error "C:/programFiles(86)/Miicrochip/xc8/v1.35 does not contain a compiler installation...
    Help me

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +Jasson Rodriguez Have you installed MPLAB X IDE first? Which operating system are you using?

    • @JassonRodriguez
      @JassonRodriguez 8 ปีที่แล้ว +3

      +StudentCompanionSA win7 sp2 , yes I have installed IDE, I solve the problem installing xc8 v1.33 but now I can't create new projects

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +Jasson Rodriguez Why? What kind of errors are you getting if you start a new project?

    • @JassonRodriguez
      @JassonRodriguez 8 ปีที่แล้ว +2

      +StudentCompanionSA the program remains in the window "standalone project", don´t work , no response!!

    • @StudentCompanion
      @StudentCompanion  8 ปีที่แล้ว +3

      +Jasson Rodriguez can you post a screen shot to see what os going on. post it to our Facebook page or email.