Professional Documents
Culture Documents
Experiment 1 Microp
Experiment 1 Microp
PHILIPPINES
COLLEGE OF ENGINEERING
Electronics Engineering Department
Microprocessor Systems, Lab.
Experiment No. 1
I.
II.
GENERATING AN OUTPUT
OBJECTIVES
Upon the completion of this lab, you should be able to:
III.
MATERIALS
Hardware:
IV.
PICKIT 2
USB cable
LED
Connecting wires
PIC16F877A
METHODOLOGY
1. Set up the Software
Open the Proton IDE.
Click ton File New.
Type the program below:
Experiment 1
Generating Output
Blinking Lights
Device 16F877A
Declare XTAL 4
Symbol LED = PORTB
DelayMS 500
TRISB = %00000000
While 1 =1
While-Wend
LED = $FF
DelayMS 1000
Turn LEDs on
Delay for 1 second
LED = $00
DelayMS 1000
Wend
Click on the button Compile Only (F9) located at the upper left
of the Proton IDE or you can simply press F9 on your
keyboard.
A window (Save as) will appear asking you where you would
like to save your files. It is convenient to create a new folder
for the generated files by the compiler.
A hex file would be generated if the compiler doesnt detect
any error.
If an error is detected within your program, it will be shown in
the results window located below the screen of the Proton IDE.
V.
RESULTS
The experiment had required us to generate an output using
PICkit3 and LED. But our group had decided to use PICkit2 instead
because it almost has the same characteristics as PICkit3 but with
cheaper price. But the PICkit2 is not complete so we assembled the
slot for the pic16f877a and the LEDs. After making it, we created
the program for the blinking lights. And after the program is saved,
it must be compiled and loaded into the microcontroller so that it
will execute the program loaded. In performing the experiment, all
of the devices must be connected properly so that you may not
encounter any problems in executing program. Also, the
connections in the microcontroller must be in proper place so that
the destruction of pic16f877a will be avoided.
VI.
CONCLUSION
The experiment wants to show the basic syntax used in PIC
programming and how it operates. It also gave ideas to each user
on how to be familiar to the programming environment. It also
helped them to generate outputs by compiling the made program
and then importing it to the compiler in order for the PICkit to
perform the given instructions by the code. Also, the users have
chosen to use PICkit2 instead of PICkit3, but still, the program used
and the syntaxes are still the same. Using the Proton IDE, the
program is successfully compiled and imported to the PICkit and the
output is shown through the LED.
VII.
GROUP MEMBERS
Group No. 5
DAMGO, JOHN CARLOS M.
JUNIO, GENER D.
MAMARIL, JOHN JERIC R.
MATIENZO, RONALYN N.
NATABIO, GESSEL S.