PIC programming in C in MPLAB with explanation

Tags


 Introduction

This page covers the programming of PIC in C language in MPLAB.

   You will find a series of tutorials that will help you in almost starting from 0 to develop applications for the PIC in C language. Each tutorial is the logical continuation of the previous. For this training, you will need:
                  Free -Software available on the Internet. This software will be presented as and when required.
                  Components -Programmateur. This is available on the website.

        Advantages of C


   For basic programming, C is interesting. It allows quickly, without major effort to develop functional programs. It also eliminates complex knowledge about the architecture of PIC. It has the advantage to easily manage loops, choices, as well as display.

        Disadvantages of C


   C is not the natural language of the microcontroller. It allows to program more intuitive. The C programming software then transforms the C lines assemblers lines directly understandable by the microcontroller. To program efficiently, it is often necessary to go to the assembly code, so it is advisable to have a solid foundation in assembler to develop consistent programs. Then I advise you to tutorials made ​​by the assembler. Courses    For all courses, we use only one type of PIC: the 16F84A. Its possibilities are interesting, it can be erased and reprogrammed multiple times, its price is low (around € 4). All this makes it one of the most used by amateur PIC.

        

Installing programs and first simulation (204Ko) version 1.3
   This tutorial will allow you to install MPLAB Version 6.3, to declare the C compiler, write a first C program to do your first simulation in C.
Architecture of a program and handling Entres / Outputs (120KB) version 2.1
   You will find here how architected a program in C. You will handle the inputs and outputs of the microcontroller (pin components) and will program a component.
Alternatives and iteration (139Ko) version 1.4
   With this booklet you will understand the concept of variable, how to create loops, make choices. 
Controlling Time with PIC (184Ko) Version 1.1
   Using this guide you will learn to manage time with PIC.
The functions, interruptions (132K) version 1 
   You will discover the notion of function, interrupt, and how to manage them.
The variables, constants, mathematical calculations (131Ko)   How to perform mathematical calculations to a PIC? You see, nothing more simple.
 

Advertisement