Introduction to Mid-Range PIC Programming in C – Part 1

These are going to be a series of tutorials based on different tasks covered in.  We are going to explore as flashing LED’s , Readings Switches, switch debouncing, Driving Multiplexed seven segment display, Using internal pull-ups etc. This tutorial assumes a working knowledge of the C language. In this series of tutorial we are going to demonstrate how to program baseline PIC’s such as 12F509 and 16F506.
In first part of tutorial covers following:
•    Introduction to the Microchip XC8 compiler.
•    Digital I/O
•    Using internal pull-ulps.
•    Switch reading and debouncing.
•    Programmed delay.

XC8 Compiler
XC8 installer has to be downloaded from, irrespective to the version of MPLAB. As you run the installer, you will be asked to enter a license activation key. Unless you have purchased the commercial version, it should be blank. You can run compiler in “Free Mode” or activate an evaluation license. For this tutorial we will be using “Free Mode”. With evaluation license you get 60 days, it’s up to an individual to decide it.
This compiler supports the whole 8-bit series PIC10/12/16/18 in single edition. In “Free Mode”  it supports all 8-bit which includes baseline and mid-range PIC’s without any memory restrictions. In this mode most of the compiler optimization is off resulting generating double the size of code compare to code generated by PICC-Lite.

Related posts:

About author

This article was written by anna.share2012

anna.share2012 is a freelance writer based in Monroe, Washington. An award-winning playwright, she has contributed to Charged and iQ magazine.


Comments (1)
  1. Dana Abbadessa says - Posted: October 24, 2012

    I’m impressed, I must say. Really hardly ever do I encounter a blog that’s both educative and entertaining, and let me tell you, you have hit the nail on the head. Your thought is outstanding; the difficulty is one thing that not sufficient individuals are speaking intelligently about. I am very completely happy that I stumbled across this in my search for something referring to this.

Leave your comment

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