Category Archives: Embedded Lessons


Lab 17: Sleep and Wake PIC microcontrollers

PIC microcontrollers’ Sleep feature is an extremely useful mechanism to minimize power consumption in battery-powered applications. In Sleep mode, the normal operation of a PIC microcontroller is suspended and the clock oscillator is switched off. The power consumption is lowest in this state. The device can be woken up by an external reset, a watch-dog timer reset, an interrupt on INT0 pin, or port-on-change interrupt. In this experiment, we will discuss how to put a PIC microcontroller into Sleep mode and compare the current consumption during Sleep mode and the normal operation mode.

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

UNI-DS6 development board for experimenting with dsPIC30F6014A

UNI-DS6 is an universal development board from mikroElektronika for experimenting with a wide range of microcontrollers including PIC, AVR, dsPIC, ARM, and 8051. I am going to use this board to educate myself about Microchip’s dsPIC Digital Signal Controllers (DSCs). The dsPIC DSCs are 16-bit high performance microcontrollers and more powerful than regular PIC devices. They are special because they combine the best features of microcontrollers with the computational capabilities of a Digital Signal Processor (DSP), and they are capable of doing complex mathematical operations involving Fourier transforms. I am going to describe briefly about the features of UNI-DS6 board

Read more

Expanding the number of I/O lines using Microchip MCP23008

A microcontroller comes with a limited number of general purpose input and output (GPIO) ports. However, some applications may require more ports than are available on the microcontroller. In such a case, GPIO expanders can be used to increase the I/O capability of the microcontroller. MCP23008 is one such device (manufactured by Microchip Technology) which provides an easy I/O expansion using 2-wire serial interface. This tutorial illustrates how to add an extra 8-bit I/O port to PIC12683 microcontroller (which has only 6 I/O pins) using MCP23008. A seven segment LED display and a tact switch will be connected to the

Read more

Lab 13: Read and Write to internal EEPROM

EEPROM (Electrically Erasable Programmable Read-Only Memory) is a type of non-volatile memory which can be programmed, erased, and re-programmed electrically while it is on the circuit board. A majority of PIC microcontrollers come with some built-in EEPROM which is a great place to store data that should not be lost when the system is powered down. A good example is a digital lock system where the access code can be stored in the EEPROM of microcontroller so that the contents remain intact even after the power supply has been removed. In my ‘Beginner’s data logger‘ project, I used the internal EEPROM

Read more
« Older Entries Recent Entries »