Tutorial 0 – Getting Started with Microchip PIC Microcontrollers.

After my tutorial series on Atmel AVR Microcontrollers and I have planed to start a similar tutorial series on Microchip PIC Microcontrollers. PIC Family of Micros are popular among hobbyists as they are easily available, easy to use and are low cost. In the first couple of tutorial we will make/collect hardware and software tools which will be required to experiment with PIC MCUs. Once you have the basic tools up and running we will proceed to learning how to do basic stuffs with PICs, like setting and using PORTs, Controlling LEDs, Relays, Motors etc. These will help you as building blocks that will help you develop your own project and understand and implement thousands of PIC MCU projects out there in Magazines and Internet.

These tutorials assumes that you are a beginner with Microcontroller i.e. having no or little experience with them.

What is a Microcontroller?

Ans: For information of "What is a microcontroller?" and how it can help you see this link.

Selecting A Microcontroller

We will start our journey with PIC16F877A and PIC16F628A Microcontrollers. Then we will move to high performance 18F core microcontrollers like PIC18F2550 and PIC18F4550.

Tools Required

What hardware and software tools you will need is described in this page. The article also gives you the over all process of development with MCUs. The article was written for Atmel AVR Microcontrollers but the same process is applicable for Microchip PICs too. So by now you must have got that the most important tool you need is a Programmer.

A PIC Programmer.

A PIC Programmer will be used to transfer the final hex file from your PC to the PIC Microcontroller. There are many ready made PIC programmers available from many vendors. A good programmer is from Olimex. European Users can buy directly from them. US Users can buy from US Reseller Sparkfun. Please see the worldwide distributors of Olimex products. And for my Indian Friends I am designing some PIC programmers they will be available shortly from shop.eXtremeElectronics.co.in

Low Cost PIC Programmer form Olimex

 

Making a Low Cost PIC Programmer

If you have basic knowledge about electronics and simple electronics assembly skills then you can easily make a PIC programmer at home ! How to do this will be described in details in next tutorial.

Low Cost Home Made PIC Programmer

Low Cost Home Made PIC Programmer

 

Software Required

You will need the following software.

  1. An IDE (Integrated Development Environment) – Used to Write, Edit and compile programs. (Available Free of Cost from the Manufacturer of PIC MCUs)
  2. A C Compiler – This will convert your C program to machine language. It will be integrated in above IDE as a plug in. (Lite Version Available Free of Cost).
  3. A Programmer Software – Will act as an Interface between you and programmer hardware. Will help you to browse hex file in your hard drive and burn (transfer) them to PIC MCU (Free)

The details about each software will be given in subsequent tutorials.

Development Board.

It is a simple circuit board containing PIC MCU, it’s power supply and some basic circuitry for operation of PIC MCU. It also has some prototyping space. The development board greatly ease you life as a developer. Every time you want to prototype a project you have to make the circuit specific to that project only, while the rest "basic" connection is already done and well tested for you.

Again you can make a Development board yourself or buy one. Good development boards are available from Olimex. Indian Friends can buy from shop.eXtremeElectronics.co.in (Have to wait some time as they are not available at the moment).

40 PIN PIC Development Board from Olimex

40 PIN PIC Development Board from Olimex.

 

In the first few tutorial we will not be using a development board. We will prototype them in a simple bread board.

That’s it for now. Meet you in next tutorial. Till then goodbye. And Don’t forget to post your comments ! They will help better development for coming tutorials.

Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.

Avinash

Avinash Gupta is solely focused on free and high quality tutorial to make learning embedded system fun !

More Posts - Website

Follow Me:
FacebookLinkedInGoogle Plus

34 thoughts on “Tutorial 0 – Getting Started with Microchip PIC Microcontrollers.

  • By Anthony - Reply

    Hi I working with PIC more than 2 years
    I very good C Compiler I recoment is mikroC
    http://www.mikroe.com/en

    They have the best development tools.

    Anthony

  • By mozard - Reply

    Hi,
    Thank you again. I am still waiting for the tutorial on “interfacing external memory to AVR microcontroller, as you mentioned in your last tutorials;but, i haven’t seen it yet. I would really appreciate if you give one. Say, you have data that you want to read and process,which does not fit in the available memory on the board. How would you interface an external memory to the AVR microcontroller?

  • By Avinash - Reply

    Hi,

    I have made the code for that and in few days the tutorial will be ready.:)

  • By Avinash - Reply

    @Anthony

    microC is good but I think no free version is available. I got HI-TECH c it is free with no limitation just some OPTIMIZATION will not be available. I think that would be best for Hobbyiest.

  • By Anthony - Reply

    Hi
    @Avinash I know that mikroC is not free but it has
    many libraries and you can do many things, tell me
    where to download HI-TECH c to compare them both!!

  • By Avinash - Reply

    Hi Anthony,

    See
    http://www.htsoft.com/

    for HI-TECH C compiler for PIC MCUs

  • By Anthony - Reply

    Hi Avinash
    I saw, but the PRO version it cost more than 1100$
    the STD version 495 $ and you you have only the
    PIC10 PIC12 PIC16 if you want to use PIC18 you have to
    pay more that’s a lot of money.
    I read the manual and belive is not something special
    What I recoment mikroC is better it has many libraries
    and it cost only 190$ with discount.
    Download the demo 2kbyte limit.
    see at http://www.mikroe.com/en/compilers/mikroc/pic/
    Please also download the manual to see all the special
    feature.
    http://www.mikroe.com/pdf/mikrobasic/mikrobasic_manual.pdf

    I have bought mikroC 2 years ago and belive me is realy
    good.
    I have free tech support and free livetime update.
    With only 190$

    Anthony

  • Pingback: eXtreme Burner PIC - USB Programmer for PIC Microcontrollers. | eXtreme Electronics

  • By Tetje - Reply

    Sup? thank you for this brilliant tutorial. The tutorial helped me improving my skills greatly. It is at all times awesome to get some newly inspiration and I hope to find more of such posts here soon because nobody will ever stop learning new things. Props

  • By ah loon - Reply

    I am fresh in this field! Someone can help me how to start my lesson in this field. For your information that i never use this C programming. But i am interesting on this field and dont know where i can start my lesson.

  • By sudarshana - Reply

    Hi avinash,

    I am intested in PIC micro controllers. Now here only one tutorial is available. Can i get the remaining details ?

    • By Avinash - Reply

      @Sudarshana,

      Can’t you see the navigation ? Simple click (hope you know whats that!) on the navigation Item called “PIC Tutorial” will take you there …

      • By Pranav -

        You should include a ‘like!’ button also, now. 😛

  • By sudarshana - Reply

    Hi avinash,

    Thanks, got it.

  • Pingback: PIC microcontroller projects

  • By anoop - Reply

    very nice

  • By sleiman - Reply

    hi
    pleas all person give me in my email (kaherl7ayat_3achekoha@hotmail.com) the tutorial cours pic programming step by step because i lick the working and here not exist and thanks all

  • By embedded fan - Reply

    Thanks for the best tutorial, and please let me know when is the next PIC micro controller tutorial is available

  • By oscar - Reply

    me lleva el chango!

  • By M.krishnasamy - Reply

    Hi, I’m looking forward to learn microcontroller programming, will some one help me.

    thanks.

  • By M.krishnasamy - Reply

    Hi,
    I’m looking forward to learn microcontroller programming
    ,will some one help me?

    thanks.

  • By JEEVAN SINGH - Reply

    HI
    I m intrested in this programming kit.Please provide me data for puchasing this pic programmer software and hardware.

    Regards
    JEEVAN SINGH

  • By JEEVAN SINGH - Reply

    Please provide me the same anybody.

    Regards
    JEEVAN SINGH
    8800510451
    project_er@rediffmail.com

  • By rennel - Reply

    hope you can do a tutorial of how to interface microcontroller to GSM. Thank u for this. Im a beginner

  • By caniokoc - Reply

    How can I become a member of this forum so that I can fully participate. Thanks

  • By caniokoc - Reply

    Will like you to assist me in becoming good in pic programming. Mail me at aniokoc@yahoo.com

  • By caniokoc - Reply

    Am building a water level monitor, how can I make my own water sensor. Thanks

  • By caniokoc - Reply

    Hi

    Please how can I make a water sensor. Need a help

    • By Navin Datt - Reply

      Hi Caniokoc,

      I hv been using, from the last 20 yrs. simple v. low current, 9 v AC(50 HZ)sent thru’ the water to small brass screws inside the water tank as prods,-they’re v. reliable, with no corrosion or salt deposits on prods, as it happens even with small DC voltages. I can send u details of the sensors if u would help me with a “tested software” written for a water level controller, as I hv still not used a micro-controller but only other IC’s & transistors for my water level controllers.
      Regards,
      Navin Datt.

  • By Dave - Reply

    Hi
    This is brilliant a big thank you.
    Your tutorials are the best out there
    Regards
    Dave

    • By Avinash - Reply

      @Dave,

      You are Most welcome 🙂

  • By Ashok Shah - Reply

    Dear Avinash,
    Which is the tutorial next to this one ? Please provide a link.
    Regards,
    Ashok Shah

  • By Musaib Hiader - Reply

    Hello dear Avinash , first of all thanks your helping the beginners like me.. I need to ask I found the AVR tutorial link in this website ,but I couldn’t found the series of tutorials .. please guide how get through with all of the tutorials for AVR beginners.. expecting your reply soon .Thank you

  • By Abhinav - Reply

    All you need to know about PIC32 with ethernet programming in PIC32
    Add the power of ethernet to your project.
    PIC32 Tutorial series: http://bit.ly/1Pd7ytr

Leave a Reply

Your email address will not be published. Required fields are marked *


× 3 = twenty seven

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>