Wednesday, February 18, 2009

Free Embedded PIC Micro-Controller Tutorial

Pic Microcontroller Projects Tutorial:
The Basic Operations of Electronic circuits and Electronic Components like Resistors, Capacitors, Leds, Oscillators, Switching operations and Transistors operations, Pull up and Pull down Resistors with microcontrollers and the Embedded C language are explained in this tutorial with the Small Electronic Circuits of Microcontroller Projects.

How to Setup your Embedded development tools
It is very easy to setup your Embedded environment but it requires Embedded development tools and its takes a little bit of time for downloading, installing your Tools and Softwares. There are only two basic tools is required to develop your Embedded Projects.

1. PIC CCS C Compiler
Pic CCS C compiler provides embedded programming environment to write the program and to compile the program and to debug the program in the easy way using C language for various PIC Microcontroller Devices and it converts C language code to Hex files Automatically. It provides very easy way of write the program.
you can Download the PIC CCS C Compiler from the below site.
http://www.ccsinfo.com/ccsfreedemo.php
Install the Downloaded PIC CCS C compiler Software to the default directory(C:\Program Files\PICC)

2. IC-Prog Prototype Programmer
IC-Prog Prototype Programmer is a software used in windows to program all types of Serial Programmable Integrated Circuits. you can Download the IC-Prog Prototype Programmer Software from the below site. http://www.ic-prog.com/index1.htm

3. JDM PIC Programmer KIT
JDM PIC Programmer is a low cost simple PIC programmer kit.
Configuring the tools:
please follow these steps to Configure the tools everytime before you start programming the PIC Microcontroller Devices.
1. Connect the JDM PIC Programmer KIT to the PC serial port using DB9F female connector.
2. Insert the PIC into the Programming kit.
3. Run the IC-Prog Prototype Programmer Software.
4. Press "F3" to select "Hardware Settings" and select "JDM Programmer" and select "Windows API" and press "ok".
5. select "Settings" under Settings select "Hardware Check" select "Enable Clock" then press "ok".
Enable Clock in the Hardware Check is used to test the Power by using LED ON/OFF in the JDM PIC Programmer KIT.

How to create your own project files

1. Run the PIC C Compiler select "File>New>Source File" and a new window opens just select "Projects" folder from C:\Program Files\PICC\ and asks you to specify File name "projectname.c". (File name is your Project File name) a Project Editor Window opens in a name "projectname.c". then you can simply write the program or copy the Tutorial Programs to the Editor Window and compile and debug the program.
2. After you compiled the program from PIC CCS C Compiler without error then copy the Project Hex file(.hex) from "C:\Program Files\PICC\Projects to the separate folder.
3. Configuring the tools.
4. Run the IC-Prog Prototype Programmer Software open the project Hex file will load the Hex codes to the IC-prog software. select "File>Open File>Projectfile.hex" then click "Program All" to burn the program to the PIC and select "verify" to verify the content of the PIC Chip with the buffer in IC-Prog. "Read All" is used to read the content of the PIC Chip.
5. After programmed the PIC Chip just remove the PIC Chip from the JDM PIC Programmer KIT and connect the PIC chip to the Real Time Project Hardware Circuits and check the output results with the expected results.

Basic Requirements of Electronic Components for Embedded PIC Microcontroller Projects Tutorial
PIC 16F84A Programmer Kit with PIC 16F84A IC
Electronic Components:
Bread Board - 1,
Leds - 8,
PushButton Micro Switch - 4,
Resistors (1/4)Watts:
10K - 4
1K - 8
Capacitors 33PF - 2
Crystal(XTAL) 4MHZ - 1
5V DC Power Supply - 1

1. LED ON/OFF with delay
In this project the PIC 16F84A Microcontroller is used to control the LED ON/OFF operations with some delays between the Led on and off with the help of Embedded C language. the basic concepts of controlling the Led and delay timings are explained in this project.

2. Disco LED with delay
In the first project "LED ON/OFF with delay" you can understand the basic concepts of controlling the Led with some delay and basics of Embedded C programming. it is very helpful to understand the second project easily. In this eight Leds are divided into 4 Alternate Leds and controlled this Leds with some delay.

3. LED Chaser with delay
With the help of above projects
LED ON/OFF with delay
Disco LED with delay
you can understand the basic things. In this project you can study how to transfer the data from one pin to other pin by using shift operators are explained.

4. Push Button To Turn ON LED
In the above three projects we worked out only with the output operations without the inputs. But in this project we will work out the same project with the inputs. Input is a Push Button Switch. Pic Microcontroller scans the pushbutton key switch every time. If the key is pressed then the Led will blink untill the key is pressed and the Led goes off if the key is released.

5. Push Button To Turn LED ON and OFF
The above project "Push Button To Turn ON LED" explains the Basic Concept of input operation how to control the Led with the help of switch. Same thing is used in this project but the Led is ON when the key is pressed and Led Keeps ON until the key is again pressed. If the key is again pressed then Led goes off and Led keeps OFF until the key is again pressed.

6. Push Button for Blinking Led
In this project the push button switch is a input and Led Blinking is a output. the PIC 16F84A is programmed to blink the Led when the push button switch is pressed and Led keeps blinking until the push button switch is again pressed to stop the blinking Led. Pull down resistor are usedin the input side to keep the input as zero in the normal conditions and to protect the PIC 16F84A from the damage.

7. Push Button for Disco Led
The Pic 16F84A is programmed for the Disco Led output when the push button switch is pressed and Disco Led starts and keeps blinking until the push button switch is again pressed to stop the Disco Led. In this project the push button switch is a input and Disco Led is a output. Pull down resistor are used in the input side to keep the input as zero in the normal conditions and to protect the Pic 16F84A from the damage.

8. Push Button for Led Chaser
This Project is same as above last three projects
Push Button To Turn LED ON and OFF
Push Button for Blinking Led
Push Button for Disco Led
In this Led Chaser is a output and PIC processor Checks for Input. If the push Button switch is Pressed means then starts the Led Chaser and keeps running Led Chaser until the push Button switch is again pressed.