PIC Microcontroller MikroC Tutorials.
MikroC is the best compiler for beginners as it provides a lot of built in libraries. A beginner can do projects without knowing more about hardware.

Using Interrupt with PIC Microcontroller

Introduction

Interrupt is the one of the most powerful feature in embedded applications. Almost all the real time applications are implemented using Interrupts. So what is an Interrupt...?? As the name suggests Interrupts are special events that requires immediate attention, it stops a microcontroller/microprocessor from the running task and to serve a special task known as Interrupt Service Routine (ISR) or Interrupt Handler. Suppose you are at home, taking coffee. Suddenly your mobile phone rings. You stop taking coffee and answer the call. When you have...

PIC to PIC Communication using UART

Introduction

PIC to PIC communication will be needed in some embedded applications. We have two options to transmit data through transmission lines. Parallel Transmission Serial Transmission

Parallel Transmission

Parallel Data Transmission In parallel communication an entire byte of data is transmitted at a time. That is each bit has dedicated line. Thus for 8-bit data transfer we need 8 dedicated lines as shown above.

Serial Transmission

Serial Data Transmission In Serial Transmission only one bit of a byte is transmitted at a time. There is only one communication line,...

Expanding Output Pins of a PIC Microcontroller through Multiplexing

Imagine that you want to control 100 LED's with a PIC Microcontroller. No PIC Microcontroller with a DIP package having that many IO lines. This article explains two ways to expand output pins of a Microcontroller through multiplexing. Here we are using Time Division Multiplexing to expand output pins. The first method is by using D-Latch and second method is by using Serial in Parallel Out Shift register. In this tutorial we demonstrate the working by using 64 LEDs.

Using D Flip-Flop and Decoder

74574...

Expanding IO Ports of PIC Microcontroller using MCP23S17

Usually a microcontroller comes with a limited number of IO ports called General Purpose Input Output (GPIO) ports. But some applications require more IO ports than that available on a microcontroller. In these cases we can use IO Port Expanders to increase the IO capability of a microcontroller. MCP23017 and MCP23S17 are two such 16 bit IO expander with Serial Interface  manufactured by Microchip. MCP23017 uses high speed I2C interface while MCP23S17 used high speed SPI interface. MCP23S17 In this tutorial...

Generating PWM with PIC Microcontroller using CCP Module

PWM is a technique used to generate analog output signal using digital signals. It is commonly used to control average power delivered to a load, motor speed control, generating analog voltage levels and for generating analog waveforms. CCP Modules are available with a number of PIC Microcontrollers. CCP stands for Capture/Compare/PWM. Using PWM module is far more easier and cost effective than using extra chips for PWM generation.  MikroC Pro for PIC Microcontroller provide built-in library for PWM which makes our...

DC Motor Speed Control using PWM with PIC Microcontroller

I already posted about Interfacing DC Motor with PIC Microcontroller. In our robotics applications we may have to control the speed of the DC Motor. In this tutorial we will see how to control the speed of a DC Motor using Pulse Width Modulation (PWM). By using PWM we can easily control the average power delivered to a load and by thus we can easily control the speed of the DC...

Interfacing Relay with PIC Microcontroller

A relay is an electromagnetic switch which is used to switch High Voltage/Current using Low power circuits. Relay isolates low power circuits from high power circuits. It is activated by energizing a coil wounded on a soft iron core. For detailed working of relay please visit this page. A relay should not be directly connected to a microcontroller, it needs a driving circuit. A relay should not be connected directly to a microcontroller due to...

Interfacing Ultrasonic Distance Sensor : ASCII Output with PIC Microcontroller

In some of our projects, we may want to measure the distance of an object from a point. Ultrasonic Distance Sensors are the best sensor which provides stable, accurate, precise, non-contact distance measurements from 2cm to 4m. Ultrasonic Sensors can be used to measure distance between moving or stationary objects. Being very accurate and stable, these devices find large number of applications in robotics fields. For example it can be used as an excellent replacement for IR sensors in  a Micromouse. In...

>