Category: MCU Programming

PIC Tutorial 7

So far, we have made the PIC flash an LED on and off. Then we were able to interact with our PIC by adding a switch, and so altering the flash rate.  The only problem...

PIC Tutorial 5 – Subroutines

Subroutines A subroutine is a section of code, or program, than can be called as and when you need it. Subroutines are used if you are performing the same function more than once, for example...

PIC Tutorial 4 – Delay Loops

Delay Loops There is one slight drawback to our flashing LED program. Each instruction takes one clock cycle to complete. If we are using a 4MHz crystal, then each instruction will take 1/4MHz, or 1uS to...

Good Programming Techniques

Before we get to the nitty gritty of programming the PIC, I think now is a good time to explain some good programming techniques. If you type a ; (semicolon) anywhere in your program,...

Introduction to PIC Microcontroller

Introduction Welcome to the start of the PIC Tutorial. These pages will take you form the basic structure of the device, right through to programming methods and techniques. Also, there will be suggestions on how...