Category Archives: Embedded Lessons


MikroC Pro for PIC : Installation and Setup

My PIC tutorials and projects use MikroC compiler for firmware development. But I don’t think I ever posted anything on its installation and setup. Today, I am going to show how to install MikroC Pro for PIC (v4.60) on a Windows PC. First of all, download the zipped installation file from here, unzip it and run the setup program. Installation is straightforward. When you first start the MikroC compiler, it opens a LED blinking example project. You can close this project by clicking on ‘Close Project’ under Project menu.

Read more

Regulated power supply for embedded systems

Power is an important aspect of all embedded systems. Nothing works without electric power. Depending upon the type of applications, several options for power are available. For example, if the system doesn’t need to be portable, it can be powered directly from the wall source using AC adaptors. AC adaptors are cheap and easily available at any electronics store. They are used to power a bunch of electronics gadgets at home, like radios, answering machines, wireless routers, etc. They also come with mobile phones as chargers. They convert the high voltage AC in the wall socket to low voltage DC

Read more

A brief tutorial on frequency measurements

Measuring the frequency of a signal may seem to be a simple process of counting pulses, but in order to get better accuracy, few other things should be considered, such as the gating interval and the range of measurement. This tutorial, posted on the pcbheaven.com, briefly describes two typical methods of frequency measurement: Direct Frequency Measuring (DFM) and the Reverse Frequency Measuring (RFM), with their pros and cons. The shape of the incoming signal may be distorted and of varying amplitude. Therefore, some sort of signal conditioning along with a voltage limiter is required prior to the frequency counter circuit.

Read more

Lab 7: PIC Timers and Counters (Part 1)

Description PIC microcontrollers are equipped with one or more precision timing systems known as Timers. They can be used to perform a variety of time precision functions, such as generating events at specific times, measuring the duration of an event, keeping date and time record, counting events, etc. The main component of a timer module is a free running binary counter that increments for each incoming pulse. Since it runs independently, it can count pulses concurrently with the main program execution. A PIC16F688 microcontroller has two built-in hardware timer modules: Timer0 and Timer1. Today’s lab lesson will explore the functionality

Read more

Calibrating a thermistor for temperature measurements

A thermistor is a passive device that changes its resistance with temperature. If the temperature-resistance characteristic is known, it can be used as a temperature sensor by measuring the resistance, or more precisely, the voltage across it. Thermistors are classified in to two types: NTC (negative temperature coefficient) and PTC (positive temperature coefficient). A NTC thermistor decreases its resistance while the temperature rises, and a PTC does the opposite. Although the datasheet of a thermistor describes the temperature-resistance relationship, the measurement based on that is not very accurate. Therefore, you may need to calibrate it against a more accurate sensor.

Read more
« Older Entries Recent Entries »