Category Archives: PIC Tutorials


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

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 Fixed Voltage Reference (FVR) for A/D conversion in enhanced mid-range PIC microcontrollers

The reference voltage plays a very important role in any A/D conversion. It determines both the range and the resolution (Volt/Count) of the A/D conversion. Besides, the accuracy of the conversion also depends upon how stable the reference voltage is. Usually in PIC microcontrollers, the reference voltage for A/D conversion can be selected as the supply voltage itself or provided externally through one or more I/O pins. But the new enhanced mid-range family of 8-bit PIC microcontrollers have a built-in module that generates a stable reference voltage internally. It is called Fixed Voltage Reference (FVR) where the output is very

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

How to interface MAXIM’s DS1868 digital potentiometer with a PIC microcontroller

Potentiometers find applications in many electrical devices. For example, a light dimmer uses a potentiometer to control the brightness of lamps. In amplifiers, they are used to control the output volume of the music, or change the bass level. In an adjustable power supply we see potentiometers to vary the output voltage and current. In a frequency generator, they are used to control the duty cycle and frequency of the output signal. These potentiometers are electro-mechanical transducers that convert the rotary or linear displacement into a change in resistance. This change in resistance can be used to control anything from

Read more
« Older Entries Recent Entries »