Expt 1 (LED)
Expt 1 (LED)
Theory:
LED is a semiconductor device used in many electronic devices, mostly used for signal
transmission /power indication purposes. It is very cheaply and easily available in a variety of
shape, color, and size. The LEDs are also used for design message display boards and traffic
control signal lights etc.
Interfacing Diagram:
1
JP10 connector Details:
Procedure:
1. Open KEIL tool chain by double clicking a ‘keil uvision5’ icon.
2. Select New Project from ‘Project’ in menu bar.
3. Choose the destination where you want to store the project.(Create a new folder).
4. Double click on the folder and give the name for your project file as *.uv3(extension
it will take by default). Click on OK.
5. Select the Microcontroller P89V51RD2. Click on OK.
6. It asks that “copy standard startup code”. Click on ‘Yes’. It will show target folder on
left.
7. Now click to ‘File’ menu and ‘New’ file, and type your code in the Text window.
8. After writing your code save this source file with proper extension, i.e. “*.c”
9. Right click on Source group 1 & click on Add existing file, then select your file and
add it.
10. Now click on the ‘Project’ in menu bar and ‘Options for target ‘Target 1’’ .
11. Change the crystal frequency to 11.0592MHz, after that click on “output “option.
12. Here select the option that “create hex file”. Then click on ‘Ok’ you will return on the
main program.
13. After that click on the “build” icon very near to compile icon. After that click on
Rebuild icon this is near to build icon. Ensure that it shows zero error.
14. Now your *.hex file is created in your project folder.
15. .Connect given AC cable from VSET-51INTIG kit to the AC mains.
16. Connect VSET51INTIG Demo kit to PC using either USB or DB9 Connector.
17. Turn ON power supply. Ensure that power LED on Target board is ON.
18. Download hex file using SSTEasyIAP11F BOOT Strap Loader Software into
Target board by using following steps.
a. Click on SSTEasyIAP11F BOOT Strap Loader Software icon.
b. Click on “DetectchipRS232” and select ‘Detect target MCU for Firmware1 1.1F
and RS232 Configuration.’
c. Select the device as SST89E/V516RD2.Click on ‘OK’
d. Select COM Port only remaining parts keep as it is and click on ‘Detect MCU’(To
know COM Port Please Right click on ‘My computer’ icon available on Desktop
of your PC. Go to Manage-Device Manager-Ports. Now check and note down the
assigned Port to Prolific USB-to-Serial COM Port (COMxx)).
e. After that click on OK. And please, press the RESET Button on 8051INTIG
Trainer kit.
2
f. To download the file click on download then following window appears. Click on
Browse and select the ‘.hex’ file then click ‘OK’.
g. After that following window appears click on ‘Yes’. Press RESET Button on
8051INTIGTrainer kit. 8051 Microcontroller starts executing a new code.
h. Connect JP1 to JP10 using FRC cable.
i. Press Reset switch (RST_SW) to start execution program.
Conclusion:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
3
Program
#include <REGX51.H>
void ldelay(void);
void main(void)
while(1)
DATAPORT = 0xff;
ldelay();
DATAPORT = 0x00;
ldelay();
void ldelay(void)
unsigned int i;