Author Archives: R-B

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), it will reset to 0 on the next press of the button.

Required Theory

You should be familiar with the digital I/O ports of PIC16F688 and their direction settings. If you are not, read Digital I/O Ports in PIC16F688. Read previous lab session (Lab 2: Basic digital input and output) to learn about reading inputs from a push button.
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 14 pins: 8 data pins (D0-D7), 3 control pins (RS, E, R/W), and three power lines (Vdd, Vss, Vee). Some LCDs have LED backlight feature that helps to read the data on the display during low illumination conditions. So they have two additional connections (LED+ and LED-), making altogether 16 pin. A 16-pin LCD module with its pin diagraam is shown below.

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 a parallel or serial port. I also don’t recommend to try building the free PIC programmer circuits available on the internet. Most of them are based on either serial or parallel port which are disappearing from the modern desktops and laptops. Even if you do have those in your computer they may not work because those circuits rely on specific voltage and current requirements from the computer ports. At the end, you will be frustrated.

iCP01 USB PIC Programmer from iCircuit Technologies

Read more

Digital oscilloscope using Atmega32 and GLCD

This project describes how to make a digital oscilloscope using an Atmega32 microcontroller and a graphics LCD. The GLCD used has 64*128 pixel dots (GDM12864A with KS0108 processor) and the AVR runs at 16 MHz using an external crystal oscillator.

To enhance the speed further, it uses an external A/D converter chip, ADC0820. The sampling rate is 650K samples per second. The maximum range of frequency display is 60 KHz. The input impedance of the oscilloscope is about 1 M? and the voltage range of input signal is ± 0.01 – 250V.

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 below. It is followed by the circuit diagram.

Read more

« Older Entries Recent Entries »