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 installer has to be downloaded from www.microchip.com, 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.