Category Archives: PIC Tutorials


Lab 5: Analog-to-digital conversion (ADC)

Description Analog-to-digital conversion (ADC) is necessary because, while embedded systems deal with digital values, their surroundings typically involve many analog signals such as, temperature, speed, pressure, the output of a microphone, etc. They all need to be converted into digital data before being processed by the microcontroller. Today, we will see how to read an external analog signal using a PIC16F688 microcontroller, and display the conversion output (a digital number) on a LCD. The input analog signal will be a varying voltage between 0-5V derived using a potentiometer. Required Theory The PIC16F688 microcontroller has a built-in 10-bit ADC with eight

Read more

Lab 3: Four bit binary counter

Description Today’s lab session is about binary counting LEDs. The binary 1 and 0 will be represented by turning LEDs on and off. You will make a 4-bit binary counter (using 4 LEDs) that counts from 0 to 15 (0000-1111 binary). The four LEDs are connected to RC0 through RC3 port pins of PIC16F688 with current limiting resistors (470? each) in series. A push button switch is connected to pin RC4 to provide input for the counter. The counter starts from 0, and increase by 1 every time the button is pressed. When the counter reaches 15 (all LEDs on),

Read more

Lab 4: Interfacing a character LCD

Description HD44780 based LCD displays are very popular among hobbyists because they are cheap and they can display characters. Besides they are very easy to interface with microcontrollers and most of the present day high-level compilers have in-built library routines for them. Today, we will see how to interface an HD44780 based character LCD to a PIC16F688 microcontroller. The interface requires 6 I/O lines of the PIC16F688 microcontroller: 4 data lines and 2 control lines. A blinking test message, “Welcome to Embedded-Lab.com”, will be displayed on the LCD screen. Required Theory All HD44780 based character LCD displays are connected through

Read more

Choosing a PIC Programmer

If you are a beginner in the world of PIC microcontrollers then you will probably have this question in your mind: Which programmer should I buy? This is an obvious question because there are tons of PIC programmers available from various vendors and if you search on the various online technical discussion forums for their reviews, everybody has his own opinion. This will confuse you more, and you will be ended up with nothing. I would suggest, just buy one that you can afford and that fulfills your need. Having said that, I won’t recommend to buy one that requires

Read more

PIC16F688 breadboard module for quick prototyping

This module is based upon the basic setup circuit for PIC16F688 that I have described in one of my PIC lessons, Getting ready for the first lab. I thought of soldering this circuit on a general purpose ptototyping board and use male headers to access the power supply pins and I/O ports of the PIC16F688 microcontroller. This will free up a lot of space on the breadboard as the ICSP header and the reset switch are transferred from the breadboard to the module. This will make prototyping on the breadboard easier and quicker. The general layout of the module is shown

Read more
« Older Entries Recent Entries »