Tutorial: Building cool projects with MCUs (Part 3)

Tutorial: Building cool projects with MCUs (Part 3) As we proceed onto the third portion of this microcontroller tutorial, let’s first revisit what we have accomplished thus far. In Part 1, we defined what a microcontroller actually was. I wanted to get everybody on-board (no pun intended) for this, so I started from scratch. Feel free to jump back there if you need a refresher. Then in Part 2, we looked at ...

Read more

A brief overview of Allegro ACS712 current sensor. Part 2 – Interface the sensor with a PIC microcontroller

In the first part of this discussion, the features of ACS712 device were briefly discussed. Now we will use that theory to implement the ACS712 sensor to make a simple DC current meter. The analog output voltage from the sensor is measured through an ADC channel of the PIC16F1847 microcontroller. A voltage to current conversion equation will be derived and implemented in the firmware of the PIC microcontrol ...

Read more

PIC12F675 external interrupt code and Proteus simulation

This post provides the external interrupt code for PIC12F675 microcontroller (e-g when you need to control servo motor which has position encoder, with your PIC microcontroller). As we know, PIC12F675 microcontroller has one GP2/INT pin, which can be used to service external interrupts. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the 'Downloads' se ...

Read more

Interfacing16X2 LCD with PIC Microcontroller

In this session we will see how to interface 16×2 LCD to PIC18F4550 microcontroller which is of family PIC18F. You can get information of 16×2 LCD in the session How to Interface 16X2 LCD with 8051 Microcontroller Features of PIC18F4550: PIC18F4550 belongs to the PIC18F family; PIC18F4550 is an 8bit microcontroller and uses RISC architecture. PIC18F4550 has 40 pins in PDIP (dual in line package) and 44 pin ...

Read more

Voltage programmable simple logic device using PIC12F675

Description Here's another daft yet interesting PIC12F675 idea I came up with. When I wanted to show someone how logic gates worked I could only find a NAND gate which wasn't very handy for demonstrating AND's OR's, NOR's and ExOR's.  I also wanted to have a play with the A/D converter on the 12F675 so I came up with the idea of a PIC that could function as a single 2-input logic element.   The logic functi ...

Read more

Lecture 45 : PIC Serial Communication using Serial Peripheral Interface (SPI)

Objective To establish serial communication between two PIC16F877A microcontrollers Description In this experiment, 8-bit digital input is applied at Port-B to one of the PIC16F877A microcontroller which acts as a master in serial communication. The input value is transmitted by the master serially via Serial Peripheral Interface (SPI) to the second PIC16F877A microcontroller, which acts as a slave. The sla ...

Read more

How to Program a PIC Microcontroller to Build a Project

The recent trends in the advanced technology are helpful in developing most advanced electronic gadgets. Most of  these electronic devices are developed using microcontrollers. The microcontroller is an electronic component, which is programmed to perform various control operations. There are various kinds of microcontrollers available, such as 8051, AVR, ARM, and PIC microcontrollers, etc., which are progr ...

Read more

Interfacing with UART of PIC microcontroller

This post provides the solution for using the PIC controller UART interface (e-g to connect PIC controller with PC using serial adapter). Complete code and simulation can be downloaded from the 'Downloads' section at the bottom of this post. The following figure shows the result of simulation of PIC UART in Proteus7.6. In the main function UART is intialized by calling the function InitUART (defined in the ...

Read more

TD-USB-02 interface with touchpad sensor board and WinAmp interface using PIC18F2550

TD-USB-02 interface with touchpad sensor board and WinAmp interface. This is an example USB project showing how to interface a touchpad sensor (the AD7142ACPZ) with a standard XP/Vista computer. The TD-USB-02 board with a PIC18F2550 communicates with: the PC: USB 2.0 through a mini-B connector. the touchpad sensor board: SPI over 8-wire flatcable. PC WinAmp application controls (start/stop, next/previous tr ...

Read more

Interfacing DS1307 to PIC Microcontroller with C code and Circuit Diagram

This tutorial will help you to interface DS1307 RTC with PIC16F877 Microcontroller. The project is compiled in CCS Compiler and simulated with Proteus. The Real Time Clock is interfaced with PIC controller via I2C. I2C is a 2 wire communication protocol. I2C is used for moving data from one device to another simply and quickly. It is a serial, synchronous, Bi-Directional protocol, the data is synchronised   ...

Read more
Scroll to top