Check Order Status  |   FAQ  |   Shopping Cart  |  Login  |  Register As Member   | 
 
Home  |   Our Product  |   Training  |   Forum  |   Project DIY  |   About Us  |   Contact Us  
  PR 1 - LED Blinking
More about Project DIY...
Buy Project Set 1
L.E.D. Blinking

Just 3 simple steps
1. Get the components on hand and plug them up
2. Install MPLAB in order to compile your own source code.

3. Get ready a programmer and download your program into a PIC.


The most efficient way to learn PIC is hand-on!
We strongly recommend that you can get your own a set of electronic components that needed in building a circuit for this project. View components list.

You can start plug in the electronic components on the protoboard you bought. Protoboard is a fundamental tool for beginner to develop their mini project, where no permanent soldering required. By referring to the schematic below, you are able to blink the LEDs if no technical error occurred.


If you are a beginner that not familiar with this kind of schematic, dun worry. We have prepared a circuit diagram [click to enlarge] that easy for you to plug the components.


We have preprogrammed a simple coding for LED blinking into the PIC16F84A. Thus, the LEDs should blink when you plug in battery.


In order to give the LEDs blink in different ways, you have to install MPLAB for changing your programming code. MPLAB is a software provided by Microchip for user to write a program and compile it into hex file.

Here we provide some sample source code in assembly language for you to learn more about programming. We tried to include as much of comments as possible in the sample code for your ease to understand the coding. You are welcome to throw your questions in our forum. Many people are willing to share their knowledge in the forum.

How to setup MPLAB :

a. Install MPLAB IDE

b. Open the MPLAB program



c. Open the PR1_1.asm file that you download from Cytron website



d. After editing the program, save it at desktop.



e. Click configure>select device

f. Select PIC 16F84A, then click ok.



g. Click Project > Quickbuild pr1_1.asm



h. Now, you are compiling your program into hex file. Hex file is the file that need for programmer to burn into PIC.

i. If no error occurred, MPLAB will auto generate a hex file at the location you put your asm file.



After obtain the hex file, the last step would be downloaded the hex file (your source code) into your PIC. I assumed that you already get a PIC programmer from us by the time you bought the electronic components. The Cytron L4128D-02 PIC programmer is a relatively low cost programmer that most suitable for students.

Let’s follow the simple steps below to accomplish your project development!

a. Open the IC Prog folder that u have download from Cytron’s website, then double click the IC icon.



b. Choose the port as Com 1, and slide the delay bar to 1 as shown above



c. If you are using window XP, you will see a few of errors occur. Stay cool, just click ‘ok’.



d. Then you go to Setting>Option>misc and click the Enable NT/2000/XP driver. After install the driver, if the errors still occur, do not panic! Please go to Setting> Clear Setting, and repeat the previous steps until it is success.



e. After plug the serial port to your CPU and PIC onto the L4128D programmer correctly, you can start to program it. Before you start, make sure you are choosing your desire device (PIC 16F84A) at the upper column.



f. Open your file Hex file that you have compiled just now.



g. Go to Command>Program All to start burning your program into the PIC.



h. Easy and simple steps. You have successfully download your program into PIC by yourself!




With these three simple steps, you are now able to develop what ever project you prefer using PIC microcontroller. We try to upload some support material from time to time to facilitate you mastering PIC microcontroller easier. Hope you enjoy!

We have prepared you a set of materials to troubleshoot the problems or errors you may face in developing the project. You are most welcome to issue those problems you met in our forum. Our experts are ready to answer you!


Buy Project Set 1

 
 


Last Update: 01 August 2008
Cytron Technologies Sdn Bhd [755563-V]