0% found this document useful (0 votes)
58 views5 pages

Practical No.15

The document outlines a practical exercise for developing a program in assembly language to move and exchange data between different locations using a microcontroller. It details the required apparatus, programming steps in Keil MicroVision5, software simulation in Proteus, and hardware simulation using a Mini Pro programmer. Additionally, it includes safety precautions to follow during the development process.

Uploaded by

gundirishi41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views5 pages

Practical No.15

The document outlines a practical exercise for developing a program in assembly language to move and exchange data between different locations using a microcontroller. It details the required apparatus, programming steps in Keil MicroVision5, software simulation in Proteus, and hardware simulation using a Mini Pro programmer. Additionally, it includes safety precautions to follow during the development process.

Uploaded by

gundirishi41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ELTR-363 Microcontroller Programming and Applications

Practical No.15
DEVELOP A PROGRAM TO MOVE AND EXCHANGE DATA BETWEEN
DIFFERENT LOCATIONS IN ASSEMBLY LANGUAGE. SIMULATE IT IN
SOFTWARE AND HARDWARE.

APPRATUS REQUIRED:
• Desktop Computer/Laptop
• Software Keil 5 for programming
• Software Proteus 8.0 for simulation
• Software Mini pro programmer for programmer I.C
• RIMS Microcontroller Trainer DEV-2763E
• Connecting Wires
• Power Supply

PROCEDURE:
1. PROGRAMMING:

• Open the software Keil MicroVision5.


• Go to the project and click new vision project.
• Give the name of project and save on the required location.
• Go to the Atmel and select IC AT89C51 and click ok.
• Go to the file and click new.
• Write the program in assembly language.
; This code is for a microcontroller of the 8051 family.
ORG 00H

MOV P3, #00H

MOV P1,#00H

LOOP:

MOV A, #53H

MOV B, #6AH

MOV P1, A

MOV P3, ACALL DELAY A

MOV P1, B

MOV P3, B

ACALL DELAY

XCH A, B ; my exchange instruction for whole values as XCH

M Mujahid ELT-2K22-402 DAE Electronics GCT Multan


ELTR-363 Microcontroller Programming and Applications

MOV P3, A

ACALL DELAY

MOV P3, B

ACALL DELAY

MOV A, #53H

MOV R0, #6AH ; Initialize R0 for indirect addressing

XCHD A, @R0 ; my exchange instruction for lower nibble values as XCHD

MOV P1, A

ACALL DELAY

MOV P1, R0

ACALL DELAY
LJMP LOOP
DELAY:
MOV R1, #64H
AG:
MOV R2, #78H
SR:
MOV R3, #1EH
DJNZ R3, $
DJNZ R2, SR
DJNZ R1, AG
RET
END

Save the files as last name with .asm extension

• Go to the target 1 and right click on the “Source group ON” and select the “Add Exiting file to the
source group 1”
• Select the file of type “asm” and then select asm file
• Right click on Target 1 and then click on “Option for Target 1…”
• Change the frequencies on 12MHz and in output options click on “create HEX File” and press
“OK”
• Right click on the: Target 1”and click on “Build Target”

M Mujahid ELT-2K22-402 DAE Electronics GCT Multan


ELTR-363 Microcontroller Programming and Applications

2. SOFTWARE SIMULATION:
I took required components from library and made connections as per circuit required. I loaded hex
file of above program in the circuit and run the circuit. I observed the working.

M Mujahid ELT-2K22-402 DAE Electronics GCT Multan


ELTR-363 Microcontroller Programming and Applications

3. Hardware Simulation:

• Open the software Mini Pro Programmer.


• Insert the I.C Atmel AT89C51 in Microcontroller socket.
• Erase the I.C.
• Blank the I.C.
• Load HEX file into I.C.
• Verify the programmer loaded.
• Now insert the I.C in Ziff socket on the trainer.
• Make connection according to circuit.
• Turn on trainer and observe output as required.

M Mujahid ELT-2K22-402 DAE Electronics GCT Multan


ELTR-363 Microcontroller Programming and Applications

SAFETY PRECAUTION:
• During program development in Kiel file name and project name should be same.
• I.C should be inserted properly in Mini Pro programmer as well as in trainer in right direction.
• Power supply should not be applied directly to I.C carefully.
• Hold I.C in hand / in such a way that pins of I.C should not bend.

M Mujahid ELT-2K22-402 DAE Electronics GCT Multan

You might also like