Getting Started with PIC Microcontroller – CCS C Compiler

You are at the right place if you are a beginner to the field of microcontrollers. In this tutorial you will learn How to Blink an LED using PIC Microcontroller. PIC is a family of microcontrollers manufactured by Microchip Technology Inc. PIC stands for Peripheral Interface Controller. It is also referred to as Programmable Interface Controller or Programmable Intelligent Computer. As all other microcontrollers PIC Microcontroller can be programmed using Assembly Language. As it is little bit difficult we prefer High...

Interfacing Servo Motor with PIC Microcontroller – MPLAB XC8

Servo Motor Servo Motor is an ordinary geared dc motor equipped with closed loop servo mechanism which uses position feedback to control exact angular position of the rotor. These are commonly used in robotic arms, legs etc. Servo Motors do not rotate continuously, their rotation is limited to fixed angles. Usually these motors have rotation limit from 90º to 180° and some special have limits 360° or more. Servo Motors usually have three wires. RED and BLACK wires are used to provide...

Interfacing LCD with PIC Microcontroller – MPLAB XC8

In this tutorial we will see How to Interface a 16x2 character LCD module with PIC 16F877A Microcontroller using MPLAB X IDE and MPLAB XC8 C Compiler. 16x2 Character LCD is a very basic and low cost LCD module which is commonly used in electronic products and projects. 16x2 means it contains 2 rows that can display 16 characters. Its other variants such as 16x1 and 16x4 are also available in the market. In these displays, each character is displayed...

Interfacing HC-SR04 Ultrasonic Sensor with PIC Microcontroller

HC-SR04 Ultrasonic Distance Sensor is a popular and low cost solution for non-contact distance measurement function. It is able to measure distances from 2cm to 400cm with an accuracy of about 3mm. This module includes ultrasonic transmitter, ultrasonic receiver and its control circuit. HC-SR04 module has 4 pins : VCC - 5V, +ive of the power supply TRIG - Trigger Pin ECHO - Echo Pin GND - -ive of the power supply TRIG and ECHO pins can be used to interface this module with a microcontroller...

Using Push Button Switch – MPLAB XC8

Push Button Switch I hope that you already go through the first tutorial of MPLAB XC8, Getting Started with MPLAB XC8 - LED Blinking. In that tutorial we learn how to use an output pin by driving an LED. In this we will learn how to read an Input pin using a push button switch. We already seen that TRIS register is used to set direction of each IO pin, ie Input or Output and PORT register is used to read...

Getting Started with MPLAB XC8 Compiler – LED Blinking

In this tutorial we will learn How to Blink an LED with PIC Microcontroller using MPAB XC8 Compiler. Recently Microchip released a series of development tools including MPLAB X IDE and MPAB XC Compilers. MPLAB X IDE is a software that runs on a computer intended to develop applications for Microchip's Microcontrollers and Digital Signal Controllers. It can be used with Windows, Mac and Linux Operating Systems. It is called an Integrated Development Environment as it provides comprehensive facilities to...

Getting Started with PIC 18F Microcontroller – MikroC

In this tutorial we will learn how to program PIC 18F Microcontrollers using MikroC Pro compiler. I hope that you already know the basics of PIC Programming using MikroC compiler. If you are a beginner to this field, please read our first tutorial Blinking LED using PIC Microcontroller - MikroC. There are a lot of advantages for PIC 18F microcontrollers compared to 16F. Some of them are given below. PIC 18F is optimized for C while PIC 16F is not. ...

Read Modify Write Problem with Mid-Range PIC Microcontrollers

RMW Problem with PIC 16F Family Microchip's mid-range PIC Microcontrollers use a sequence of operations : Read, Modify and Write to change output state of a pin. In certain circumstances RMW operations might cause unexpected behavior of outputs. You might have already experienced this issue and struggled with it as you can't find exact reason with microcontrollers unexpected behavior. Mid-Range PIC Microcontroller uses two registers, TRIS and PORT to control the direction and status of an IO pin respectively. When you try...

>