{"id":26,"date":"2010-10-02T14:06:29","date_gmt":"2010-10-02T14:06:29","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?page_id=26"},"modified":"2016-11-04T13:36:30","modified_gmt":"2016-11-04T17:36:30","slug":"embedded-lab-experiments","status":"publish","type":"page","link":"https:\/\/embedded-lab.com\/blog\/embedded-lab-experiments\/","title":{"rendered":"PIC Tutorials: Experimenting with PIC Microcontrollers"},"content":{"rendered":"<p><!--Engineering360 728x90 Ad Tag--><\/p>\n<div id=\"leaderboard1\"><script type=\"text\/javascript\">\/\/ <![CDATA[\ngoogletag.cmd.push(function() { googletag.pubads().display('\/4250\/Embedded-Lab', [728, 90], 'leaderboard1'); });\n\/\/ ]]><\/script><\/div>\n<p>One of the most popular and easy to use microcontroller families available in the market today is the Microchip \u201c<strong>PIC microcontroller<\/strong>\u201d. The following experimental PIC tutorials are intended to facilitate the learning of PIC microcontroller interfacing and programming. Each topic is started with the background theory followed by simple experiments to explain how the theory can be implemented into actual applications. I am emphasizing the use of high level language (C) for PIC programming. The C compiler used in writing the programs is <a href=\"http:\/\/www.mikroe.com\/eng\/products\/view\/7\/mikroc-pro-for-pic\/\" target=\"_blank\"><strong>mikroC Pro for PIC<\/strong><\/a> from MikroElektronika. You can download and install the demo version of this compiler that limits the size of the output HEX file to 2K. PIC16F688 and PIC16F628A microcontrollers are chosen for the most basic experiments whereas the advanced topics are discussed with PIC18F2550. I hope some of you will find these tutorials helpful for coming up to speed on PIC microcontrollers. If you have any suggestions or comments, you can email me at [<strong><em>admin (at) embedded-lab.com<\/em><\/strong>].<\/p>\n<table border=\"0\" width=\"100%\">\n<tbody>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: center; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\" width=\"180\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/pic16f688-breadboard-module-for-quick-prototyping\/img_labeledbreadboardmodule_pic16f688\/\" rel=\"attachment wp-att-726\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-726 aligncenter\" title=\"Img_LabeledBreadboardModule_PIC16F688\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/11\/Img_LabeledBreadboardModule_PIC16F688-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3><span style=\"color: #333333;\">Pre-Lab Preparation<\/span><\/h3>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/overview-of-an-embedded-system\/\">What is an Embedded System?<\/a><\/strong><\/address>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=170\">Hardware and Software requirements<\/a><\/strong><\/address>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=641\">Choosing a PIC Programmer<\/a><\/strong><\/address>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=112\">Regulated power supply for your breadboard<\/a><br \/>\n<\/strong><\/address>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=190\">Getting ready for the first lab<\/a><\/strong><\/address>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=574\">Breadboard module for PIC16F688<\/a><\/strong><\/address>\n<address style=\"text-align: left;\"><strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=1034\">Breadboard module for PIC16F628A<\/a><\/strong><\/address>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-1-flashing-led\/image_flashled_output_pic16f688\/\" rel=\"attachment wp-att-702\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-702\" title=\"Image_FlashLED_Output_PIC16F688\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/10\/Image_FlashLED_Output_PIC16F688-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3><a href=\"http:\/\/embedded-lab.com\/blog\/?p=148\"><span style=\"color: #333333;\"><strong>Lab 1: Flashing an LED<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Start with the &#8220;Hello World&#8221; project to make sure that every set up you have made is correct and working well. You will use a PIC16F688 microcontroller to flash an LED on and off.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> <a href=\"http:\/\/embedded-lab.com\/blog\/?p=238\"><strong>I\/O ports in PIC16F688<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: center; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-2-basic-digital-input-and-output\/image_digital_io_op_pic16f688\/\" rel=\"attachment wp-att-713\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-713\" title=\"Image_Digital_IO_OP_PIC16F688\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/10\/Image_Digital_IO_OP_PIC16F688-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=164\"><span style=\"color: #333333;\"><strong>Lab 2: Basic digital input and output<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Learn how to read digital inputs from a push button switch. Every time the push button is pressed, the LED will be toggled on and off. You will also learn about the bouncing characteristic of a switch, and how to take care of that.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> <a href=\"http:\/\/embedded-lab.com\/blog\/?p=238\"><strong>I\/O ports in PIC16F688<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-3-a-4-bit-binary-counter\/img_4bitcounterop_pic16f688-2\/\" rel=\"attachment wp-att-723\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-723\" title=\"Img_4bitCounterOP_PIC16F688\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/11\/Img_4bitCounterOP_PIC16F6881-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=659\"><span style=\"color: #333333;\"><strong>Lab 3: Four bit binary counter<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Four LEDs are connected to a PIC16F688 microcontroller to make a 4-bit binary counter. The counter counts the pressing of a push button. It starts from 0 and is incremented on every press. When it reaches 15, it overflows and the next output will be o again.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> <a href=\"http:\/\/embedded-lab.com\/blog\/?p=238\"><strong>I\/O ports in PIC16F688<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td align=\"center\"><!--Engineering360 300x250 Ad Tag--><\/p>\n<div id=\"tile1\"><script type=\"text\/javascript\">\/\/ <![CDATA[\ngoogletag.cmd.push(function() { googletag.pubads().display('\/4250\/Embedded-Lab', [300, 250], 'tile1'); });\n\/\/ ]]><\/script><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"0\" width=\"100%\">\n<tbody>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: center; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\" width=\"180\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-4-interfacing-a-character-lcd\/img_lcdtest_op_pic16f688\/\" rel=\"attachment wp-att-734\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-734\" title=\"Img_LCDtest_OP_PIC16F688\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/11\/Img_LCDtest_OP_PIC16F688-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=203\"><span style=\"color: #333333;\"><strong>Lab 4: Interfacing a character LCD<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">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. Learn how to include one in your microcontroller project.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory : <\/strong>Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-5-analog-to-digital-conversion-adc\/img_pic16f688_adctest_op2\/\" rel=\"attachment wp-att-879\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-879\" title=\"Img_PIC16F688_ADCTest_OP2\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/11\/Img_PIC16F688_ADCTest_OP2-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=264\"><span style=\"color: #333333;\"><strong>Lab 5: Analog-to-digital conversion (ADC)<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">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, etc. Learn how to interface analog signals with a PIC microcontroller.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> <a href=\"http:\/\/embedded-lab.com\/blog\/?p=379\"><strong>ADC channels in PIC16F688<\/strong><\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-6-seven-segment-display\/img_pic16f688_lab5_op3\/\" rel=\"attachment wp-att-987\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-987\" title=\"Img_PIC16F688_Lab5_OP3\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/11\/Img_PIC16F688_Lab5_OP3-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=971\"><span style=\"color: #333333;\"><strong>Lab 6: Interfacing a seven segment display<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Seven segment LEDs are mostly used to display decimal numbers. They are popular because they are visually attractive and easy to interface. This lab session discusses about the functioning of seven segment display modules and driving a single module with a PIC microcontroller to display numbers.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-7-timers-and-counters-part-1\/img_pic16f688_lab7_counterop\/\" rel=\"attachment wp-att-1079\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-1079\" title=\"Img_PIC16F688_Lab7_CounterOP\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/11\/Img_PIC16F688_Lab7_CounterOP-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=1042\"><span style=\"color: #333333;\"><strong>Lab 7: Timers and Counters (Part 1)<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Hardware timer modules are used in microcontroller based systems for accurate event timing and counting. This experimental tutorial describes the Timer0 module in PIC microcontrollers and it&#8217;s functionality. Two programs are written to demonstrate the timer and counter functions separately.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!--nextpage--><\/p>\n<table>\n<tbody>\n<tr>\n<td align=\"center\"><!--Engineering360 300x250 Ad Tag--><\/p>\n<div id=\"tile1\"><script type=\"text\/javascript\">\/\/ <![CDATA[\ngoogletag.cmd.push(function() { googletag.pubads().display('\/4250\/Embedded-Lab', [300, 250], 'tile1'); });\n\/\/ ]]><\/script><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #e8e8e8; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\" width=\"180\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/RS232-Pins.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-1311\" title=\"RS232 Pins\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/RS232-Pins-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=1296\"><span style=\"color: #333333;\"><strong>Lab 8: Asynchronous serial communication<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">The PIC16F628A microcontroller has a built in USART hardware that allows to communicate with a wide range of serial devices such as memory chips, LCDs, personal computers, etc. This tutorial describes how to establish a full duplex asynchronous serial link between a PIC and a PC.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/lab-9-pulse-width-modulation-pwm\/img_lab9_output3\/\" rel=\"attachment wp-att-1447\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-1447 aligncenter\" title=\"Img_Lab9_Output3\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_Lab9_Output3-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=1443\"><span style=\"color: #333333;\"><strong>Lab 9: Pulse Width Modulation (PWM) using CCP module<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">The Capture\/Compare\/PWM module in a PIC16F628A microcontroller is very versatile in function. This experiment describes the use of CCP module to generate a PWM signal to control the brightness of LED. The same principle can be extended to control the power delivered to an electronic load using the principle of PWM.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBControl.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-1548\" title=\"Img_DC_MotorHBControl\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBControl-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=1159\"><span style=\"color: #333333;\"><strong>Lab 10: DC motor control<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">DC motors provide mechanical power to microcontrollers. This experimental tutorial provides information on interfacing DC motors to PICMicro. You will learn about the classic H-bridge circuit that can control a motor in clockwise and counterclockwise direction.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/03\/TitleImage.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-2195\" title=\"TitleImage\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/03\/TitleImage-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=2086\"><span style=\"color: #333333;\"><strong>Lab 11: Multiplexing seven segment LED displays<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Multiplexing is the most common technique for interfacing multiple seven segment LED displays to microcontrollers. Read this experimental tutorial to find out how this technique works.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/04\/Output.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-2503 aligncenter\" title=\"Output\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/04\/Output-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=2478\"><span style=\"color: #333333;\"><strong>Lab 12: Basics of LED dot matrix display<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">LED dot matrices are very popular means of displaying information as it allows both static and animated text and images. This tutorial describes the basic structure of a monochrome LED dot matrix and its interface with a microcontroller to display static characters and symbols.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-2555 aligncenter\" title=\"InternalEEPROM_Title\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/05\/InternalEEPROM_Title-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=2547\"><span style=\"color: #333333;\"><strong>Lab 13: Read and Write to internal EEPROM<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">EEPROMs are a type of non-volatile memory which can be programmed and erased electrically while within the circuit. PIC16F628A microcontroller comes with some built-in internal EEPROM. This tutorial describes how to perform the basic read\/write operation to it.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/05\/I2C_Title.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-2607 aligncenter\" title=\"I2C_Title\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/05\/I2C_Title-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=2583\"><span style=\"color: #333333;\"><strong>Lab 14: Inter-Integrated Circuit (I2C) communication<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">I2C is a very popular synchronous serial communication protocol that requires only two pins for data transfer. This tutorial describes the basics of I2C protocol and how to connect multiple I2C devices on a common bus.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/05\/ScrollMessage_Title.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-2662\" title=\"ScrollMessage_Title\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/05\/ScrollMessage_Title-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=2661\"><span style=\"color: #333333;\"><strong>Lab 15: Scrolling text message on LED dot matrix display<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">This is the continuation of Lab 12 and you will learn how to display a scrolling text message on an LED dot matrix. The matrix used is of size 8&#215;16 (128 LEDs in total).<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td><script type=\"text\/javascript\">\/\/ <![CDATA[\ngoogle_ad_client = \"pub-3251335376149574\"; \/* Embedded-Lab_Tutorial_336x280, created 11\/8\/10 *\/ google_ad_slot = \"6139626489\"; google_ad_width = 336; google_ad_height = 280;\n\/\/ ]]><\/script><script src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\" type=\"text\/javascript\">\/\/ <![CDATA[\n\n\/\/ ]]><\/script><\/td>\n<td><script type=\"text\/javascript\">\/\/ <![CDATA[\ngoogle_ad_client = \"pub-3251335376149574\"; \/* Embedded-Lab_Tutorial_336x280, created 11\/8\/10 *\/ google_ad_slot = \"6139626489\"; google_ad_width = 336; google_ad_height = 280;\n\/\/ ]]><\/script><script src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\" type=\"text\/javascript\">\/\/ <![CDATA[\n\n\/\/ ]]><\/script><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #e8e8e8; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\" width=\"180\">\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/07\/InterruptTitle.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-3198\" title=\"InterruptTitle\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/07\/InterruptTitle-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=3180\"><span style=\"color: #333333;\"><strong>Lab 16: Understanding interrupts<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Interrupts are powerful concept in embedded systems for controlling events in a time-critical environment. This tutorial first describes the interrupt system in general and then illustrates how it is handled in PIC micrcontrollers.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/08\/SleepModeCurrent.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-3371\" title=\"SleepModeCurrent\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/08\/SleepModeCurrent-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=3237\"><span style=\"color: #333333;\"><strong>Lab 17: Sleep and Wake PIC microcontrollers<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">PIC microcontrollers\u2019\u00a0<strong>Sleep<\/strong> feature is an extremely useful mechanism to minimize power consumption in battery-powered applications. Read this tutorial to learn how to put a PICMicro into sleep and wake it up with an WDT time-out.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/08\/KeyPadTitle.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-3444\" title=\"KeyPadTitle\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/08\/KeyPadTitle-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=3428\"><span style=\"color: #333333;\"><strong>Lab 18: Matrix keypad interfacing<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">Matrix keypads are very common input devices in embedded systems. They have simple architecture and are easy to interface. This tutorial describes two different approaches of reading input data from a 4\u00d74 (16 keys) matrix keypad interfaced to a PIC microcontroller. The pressed key information is displayed on a character LCD. The microcontroller used in this experiment is PIC16F1827.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/11\/MusicNoteCktSetUp.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-3969\" title=\"MusicNoteCktSetUp\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/11\/MusicNoteCktSetUp-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=3967\"><span style=\"color: #333333;\"><strong>Lab 19: Play musical notes<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">A PIC microcontroller can be programmed to play musical notes of a song tune by bit-banging one of its I\/O pins high and low to generate square waves corresponding to the note frequencies. This experiment describes how to do it. The microcontroller used in this experiment is PIC16F1827, which plays the notes of the popular &#8220;Happy birthday to you&#8221; tune.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td><!--Engineering360 728x90 Ad Tag--><\/p>\n<div id=\"leaderboard1\"><script type=\"text\/javascript\">\/\/ <![CDATA[\ngoogletag.cmd.push(function() { googletag.pubads().display('\/4250\/Embedded-Lab', [728, 90], 'leaderboard1'); });\n\/\/ ]]><\/script><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #e8e8e8; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\" width=\"180\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2012\/01\/GLCDTitle.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4314\" title=\"GLCDTitle\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2012\/01\/GLCDTitle-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=2398\"><span style=\"color: #333333;\"><strong>Lab 20: Interfacing a Graphical LCD (GLCD)<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">The use of a graphical LCD (GLCD) drastically changes the look of your project. It provides more freedom for presenting data than the HD44870 based character LCDs. This tutorial will help you to get one in your next project.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2012\/04\/ServoTitle.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4674\" title=\"ServoTitle\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2012\/04\/ServoTitle-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td style=\"border: 1px solid #eaeaea; padding: 6px; text-align: left; vertical-align: middle; background-color: #ffffff; letter-spacing: 0pt; word-spacing: 0pt;\">\n<h3 style=\"text-align: left;\"><a href=\"http:\/\/embedded-lab.com\/blog\/?p=4653\"><span style=\"color: #333333;\"><strong>Lab 21: Servo motor control<\/strong><\/span><\/a><\/h3>\n<p style=\"text-align: left;\">A servo motor is a special geared DC motor equipped with an electronic circuit for controlling the direction of rotation, as well as the position, of the motor shaft. In this lab session, we will first explore what a servo motor consists of and how it works and then illustrate how to interface it with a PIC microcontroller.<\/p>\n<p style=\"text-align: left;\"><strong>Required Theory :<\/strong> Provided in the article<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>One of the most popular and easy to use microcontroller families available in the market today is the Microchip \u201cPIC microcontroller\u201d. The following experimental PIC tutorials are intended to facilitate the learning of PIC microcontroller interfacing and programming. Each topic is started with the background theory followed by simple experiments to explain how the theory can be implemented into actual applications. I am emphasizing the use of high level language (C) for PIC programming. The C compiler used in writing the programs is mikroC Pro for PIC from MikroElektronika. You can download and install the demo version of this compiler<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-26","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/pages\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":178,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/pages\/26\/revisions"}],"predecessor-version":[{"id":12432,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/pages\/26\/revisions\/12432"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}