Monthly Archives: July 2011


In-Circuit Debugging of PIC microcontrollers

An In-Circuit Debugger (ICD) is a very powerful and effective tool for real-time debugging of a microcontroller-based system at hardware level. It allows you to run, halt and single step the program while the target microcontroller is embedded in the actual circuit. Once halted, the program variables, Special Function Registers (SFRs), RAM and EEPROM locations can be examined and modified in real-time, thus assists the designer in debugging the firmware and hardware together. In this article, I am going to describe the In-Circuit Debugging technique in PIC microcontrollers, and demonstrate the debugging procedure with a test project using the PIC16F887 microcontroller. Although the operation of

Read more

Atmega8 measures ambient temperature and relative humidity using HSM-20G sensor

In one of my previous posts, I discussed about Sensirion’s SHT11 and SHT75 sensors, which are capable of measuring both temperature and relative humidity. They are digital sensors and provide fully calibrated digital outputs for temperature and relative humidity. I also illustrated how to interface those sensors with a PIC microcontroller. Shawon Shahryiar from Dhaka, Bangladesh shared this project with us where he describes a method of interfacing the HSM-20G sensor to Atmega8 for measuring the ambient temperature and relative humidity. Unlike Sensirion’s SHT series, this is an analog sensor that converts the two ambient parameters into standard output voltages.

Read more

Lab 16: Understanding Interrupts

Interrupts are powerful concept in embedded systems for controlling events in a time-critical environment. In a typical embedded system, the embedded processor (microcontroller) is responsible for doing more than one task (but can do only one at a time). For example, let’s say in a programmable digital room thermostat, the microcontroller is assigned to monitor the room temperature, turn the AC or heater ON and OFF, control the LCD display, and respond to any new temperature setting from the user. Out of these the first three tasks are non-time-critical and are executed continuously in sequence one after the other, within

Read more

Using TC74 (Microchip) thermal sensor for temperature measurement

The TC74 chip is a serially accessible, digital temperature sensor from Microchip Technology that acquires and converts temperature information from its onboard solid-state sensor with a resolution of 1°C. The temperature is available as an 8-bit digital word stored in its internal temperature register, which is accessible through a 2-wire I2C compatible serial bus. This tutorial describes how to use the TC74 sensor with a PIC microcontroller to measure the surrounding temperature.

Read more

Voltage monitor for car’s battery and its charging system

My 2010 Equinox has got every feature that a modern automobile should have. However, one thing that I personally find missing is the real-time monitoring of voltage across the car’s battery terminals. This may not seem to be that important but one of the most common reasons for a car battery failure is the faulty charging system. If the charging system is not working properly, the battery will not get the proper charging voltage (about 13.8 V for 12V battery) across its terminals and it could go flat. This project is about making a simple electronic voltage monitor system for

Read more
« Older Entries