Category Archives: Embedded Labs


Lab 20: Interfacing a KS0108 based Graphics LCD (Part 2)

In the first part of this tutorial, we discussed about Winstar’s WDG0151-TMI GLCD module, which is a 128×64 pixel monochromatic display built with KS0108B and KS0107B compatible display controllers. The module was interfaced to a PIC16F887 microcontroller and a test program was written in C to demonstrate how to implement the KS0108 instruction set in the firmware of PIC to activate display pixels on the screen. We wrote our subroutine programs that would turn the GLCD on, move the display location to a specified row and column, and draw a pixel at a given coordinates. You might have realized it

Read more

Connecting multiple tact switches on a single input pin of a microcontroller

Normally one tact switch requires one digital input pin of a microcontroller. Some designs implement keypad style multiplexing to get multiple switches on fewer inputs. However, there exist other techniques that allow you to connect many switches on a single input pin of a microcontroller. This tutorial demonstrates one such technique as applied to PIC12F683 microcontroller. In this example, there are four LEDs and four tact switches connected to the PIC12F683 microcontroller. While each LED is controlled through an individual I/O pin, the four switches are connected to one ADC input pin of the PIC12F683 microcontroller.

Read more

Lab 19: Play musical notes

We have discussed in the past experiments how to use a PIC microcontroller to do a variety of things from flashing an LED to driving a motor, etc. Today, we will see how to play notes of a song with a PIC microcontroller. Musical notes are simply sound waves of particular frequencies. If the frequency of a note is known correctly, a microcontroller can be programmed to play the note by generating a square wave (of the same frequency) signal at one of its I/O pins. The signal must be fed to a speaker to listen to the sound. Here,

Read more

DIY plug-in modules to make microcontroller breadboarding easier

Breadboards are a great tool for prototyping and testing electronics circuits. Here I am sharing with you some plug-in modules that I once made to make my breadboarding life easier. I have used these modules many times in the PIC experiments described in this blog. These modules  serve very common functions that are required in most microcontroller circuits. Their use not only reduces the number of wire connections on breadboard, but also expedites prototyping and makes debugging of the circuit easier.

Read more

Amicus18: Arduino-style platform for PIC fans

Arduino needs no introduction; it is an easy-to-use yet powerful open source embedded system development platform that has gained huge amount of popularity in past few years, specially among hobbyists. The standard hardware consists of an 8-bit Atmel AVR processor with on-board headers providing access to its I/O pins. The processor is pre-programmed with a serial bootloader that simplifies the uploading of user programs to the on-chip flash memory without the need of any external programmer. Because of its low cost, user-friendly software development environment (open-source C/C++ like programming platform), rich set of libraries, and tons of resources available online,

Read more
« Older Entries