[PDF] [PDF] MP Lab Manualpdf - MS Engineering College

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 1 Laboratory Session-1: Write-up on Microprocessors, 8086 Functional block diagram, Pin diagram 



Previous PDF Next PDF





[PDF] DEPARTMENT OF COMPUTER SCIENCE - Gopalan Colleges

LAB MANUAL - 15CSL48 Dept of CSE Dept of CSE Laboratory Session-1: Write-up on Microprocessors, 8086 Functional block diagram, Pin diagram and



[PDF] Department of Computer Science & Engineering LAB MANUAL 4th

15CSL48 - Microprocessor Lab Manual – Software Part 2 All rights reserved DX- Data register 9 What are the different pointers and index registers in 8086?



[PDF] MICROPROCESSORS AND INTERFACING

LABORATORY MANUAL (FOR CSE III Year- I Sem) MPI Lab manual ECE, MRCET 1 MICROPROCESSOR LAB EXECUTION PROCEDURE Aim: To Write and execute an Assembly language Program (ALP) to 8086 processor to



[PDF] Microprocessor Lab Manual - SRM University

Course Title : MICROPROCESSOR INTERFACING LAB Prepared By S KIRUTHIKA DEVI (A P(O G), Department of Computer Science and Engineering)



[PDF] Microprocessors Lab Manual

Developing Assembly Language Programs and Executing using For our lab you have to put all 8086 assembler commands inside this folder The T command executes one or more instructions at either the current CS:IP location or at



[PDF] CSE - Prasad V Potluri Siddhartha Institute of Technology

EMBEDDED SYSTEMS LAB Microprocessor 8086 1 Introduction source program the assembler produces the binary code for each instruction and inserts



[PDF] Microprocessor Lab 5138 - SITTTR,Kerala

The programming model of the 8086 through the Core2 is considered to be program visible because its registers are used during application programming and 



[PDF] Download Front Pages MPI Lab Manual CSE

assembly language for 8086 microprocessor and to assemble and execute them using TASM software and Lab reports will consist of your program listing 6



[PDF] MP Lab Manualpdf - MS Engineering College

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 1 Laboratory Session-1: Write-up on Microprocessors, 8086 Functional block diagram, Pin diagram 

[PDF] microprocessor 8086 lab programs with explanation

[PDF] microprocessor 8086 lab programs with flowchart

[PDF] microprocessor 8086 notes pdf

[PDF] microprocessor 8086 notes pdf download

[PDF] microprocessor 8086 notes pdf free download hindi

[PDF] microprocessor 8086 pin diagram description pdf

[PDF] microprocessor 8086 practical

[PDF] microprocessor 8086 programming tutorial pdf

[PDF] microprocessor 8086 programs with explanation pdf

[PDF] microprocessor 8086 programs with flowchart

[PDF] microprocessor 8086 textbook pdf free download

[PDF] microprocessor and assembly language lecture notes

[PDF] microprocessor and assembly language notes pdf

[PDF] microprocessor and microcontroller lab manual

[PDF] microprocessor and microcontroller lab manual for ece free download

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 1

M S ENGINEERING COLLEGE

Navarathna Agrahara, Sadahalli Post, Bangalore -562110

Microprocessor and Microcontroller Lab

17CSL48

INSTRUCTION MANUAL

(As per Choice Based Credit System (CBCS) Scheme - 2017)

Department of Computer Science

Engineering

(NAAC Accredited and an ISO 9001:2008 Certified Institution) (Affiliated to Visvesvaraya Technological University Belgaum and approved by AICTE, New Delhi) NAVARATHNA AGRAHARA, SADAHALLI POST, BANGALORE- 562 110, Tel: 080-3252

9939, 3252 957

Prepared By:

Prof. Nagayya S Hiremath

Assistant Professor

Department of CSE, MSEC

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 2 Course objectives: This course will enable students to

To provide practical exposure to the students on microprocessors, design and coding knowledge on 80x86 family/ARM.

To give the knowledge and practical exposure on connectivity and execute of interfacing devices with 8086/ARM kit like LED displays, Keyboards, DAC/ADC, and various other devices.

Description:

Demonstration and Explanation hardware components and Faculty in-charge should explain

8086 architecture, pin diagram in one slot. The second slot, the Faculty in-charge should explain

instruction set types/category etc. Students have to prepare a write-up on the same and include it in the Lab record and to be evaluated. Laboratory Session-1: Write-up on Microprocessors, 8086 Functional block diagram, Pin

diagram and description. The same information is also taught in theory class; this helps the

students to understand better. Laboratory Session-2: Write-up on Instruction group, Timing diagrams, etc. The same information is also taught in theory class; this helps the students to understand better. Note: These TWO Laboratory sessions are used to fill the gap between theory classes and practical sessions. Both sessions are evaluated as lab experiments for 20 marks.

SYLLABUS

Laboratory Code: 17CSL48 IA Marks 40

Number of Lecture Hours/Week Exam Marks 60

01 I + 02 P

Total Number of Lecture Hours 40 Exam Hours 03

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 3

Experiments:

Develop and execute the following programs using 8086 Assembly Language. Any suitable assembler like MASM/TASM/8086 kit or any equivalent software may be used.

Program should have suitable comments.

The board layout and the circuit diagram of the interface are to be provided to the student during the examination. Software Required: Open source ARM Development platform, KEIL IDE and Proteus for simulation

Software Programs: Part A

1. Design and develop an assembly language program to search a key element X in a list of

n 16-bit numbers. Adopt Binary search algorithm in your program for searching.

2. Design and develop an assembly program to sort a given set of -bit numbers in

ascending order. Adopt Bubble Sort algorithm to sort given elements.

3. Develop an assembly language program to reverse a given string and verify whether it is a

palindrome or not. Display the appropriate message.

4. Develop an assembly language program to compute nCr using recursive procedure. Assume that n and r are non-negative integers.

5. Design and develop an assembly language program to read the current time and Date from the system and display it in the standard format on the screen.

6. To write and simulate ARM assembly language programs for data transfer, arithmetic and logical operations (Demonstrate with the help of a suitable program).

7. To write and simulate C Programs for ARM microprocessor using KEIL (Demonstrate with

the help of a suitable program) Note: To use KEIL one may refer the book: Insiders Guide to the ARM7 based microcontrollers, Hitex Ltd.,1st edition, 2005

Hardware Programs: Part B

8. a. Design and develop an assembly program to demonstrate BCD Up-Down Counter (00-99) on the Logic Controller Interface. b. Design and develop an assembly program to read the status of two 8-bit inputs (X & Y) from the Logic Controller Interface and display X*Y.

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 4

9. Design and develop an assembly program to display messages FIRE and HELP

alternately with flickering effects on a 7-segment display interface for a suitable period of time. Ensure a flashing rate that makes it easy to read both the messages (Examiner does not specify these delay values nor is it necessary for the student to compute these values).

10. Design and develop an assembly program to drive a Stepper Motor interface and rotate the motor in specified direction (clockwise or counter-clockwise) by N steps (Direction and N are specified by the examiner). Introduce suitable delay between successive steps. (Any arbitrary value for the delay may be assumed by the student).

11. Design and develop an assembly language program to a. Generate the Sine Wave using

DAC interface (The output of the DAC is to be displayed on the CRO). b. Generate a Half Rectified Sine waveform using the DAC interface. (The output of the

DAC is to be displayed on the CRO).

12. To interface LCD with ARM processor-- ARM7TDMI/LPC2148. Write and execute

programs in C language for displaying text messages and numbers on LCD

13. To interface Stepper motor with ARM processor-- ARM7TDMI/LPC2148. Write a program

to rotate stepper motor

Study Experiments:

1. Interfacing of temperature sensor with ARM freedom board (or any other ARM microprocessor board) and display temperature on LCD

2. To design ARM cortex based automatic number plate recognition system

3. To design ARM based power saving system

Course Outcomes: after studying this course, Students will be able to Learn 80x86 instruction sets and gins the knowledge of how assembly language works. Design and implement programs written in 80x86 assembly language Know functioning of hardware devices and interfacing them to x86 family Choose processors for various kinds of applications

Graduate Attributes

1. Engineering Knowledge

2. Problem Analysis

3. Modern Tool Usage

4. Conduct Investigations of Complex Problems

5. Design/Development of Solutions

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 5

Conduction of Practical Examination

1. All laboratory experiments (all 7 + 6 nos) are to be included for practical examination.

2. Students are allowed to pick one experiment from each of the lot.

3. Strictly follow the instructions as printed on the cover page of answer script

4. PART A: Procedure + Conduction + Viva: 08 + 35 +07 (50)

5. PART B: Procedure + Conduction + Viva: 08 + 35 +07 (50)

Introduction to 8086 and Microsoft assembler

8086 Internal Block diagram

8086 is a 16-bit processor having 16-bit data bus and 20-bit address bus. The block diagram of

8086is as shown. (Refer figures 1A & 1B). This can be subdivided into two parts; the Bus Interface

Unit (BIU) and Execution Unit (EU).

Bus Interface Unit: The BIU consists of segment registers, an adder to generate 20 bit address and

instruction prefetch queue. It is responsible for all the external bus operations like opcode fetch, mem

read, mem write, I/O read/write etc. Once this address is sent OUT of BIU, the instruction and data bytes are fetched from memory and they fill a 6-byte First in First out (FIFO) queue.

Execution Unit:

The execution unit consists of: General purpose (scratch pad) registers AX, BX, CX and DX; Pointer registers SP (Stack Pointer) and BP (Base Pointer); index registers source index (SI) & destination

index (DI) registers; the Flag register, the ALU to perform operations and a control unit with

associated internal bus. The 16-bit scratch pad registers can be split into two 8-bit registers. AX AL,

AH; BX BL, BH; CX CL, CH; DX DL, DH.

Fig: Block Diagram

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 6

Assembly Language Development Tools:

1. EDITOR:

Its system software (program) which allows users to create a file containing assembly instructions and statements. Ex: WordStar, DOS Editor, Norton Editor Using the editor, you can also edit/delete/modify already existing files. o While saving, you must give the file extension as .asm.

Follow the AL syntax while typing the programs

Editor stores the ASCII codes for the letters and numbers keyed in. o Any statement beginning with semicolon is treated as comment. When you typed your entire program, you have to save the file on the disk. This file is called source file, having an .asm extension. The next step is to convert this source file into a machine executable .obj file.

2. ASSEMBLER:

An assembler is system software (program) used to translate the assembly language mnemonics for instructions to the corresponding binary codes. An assembler makes two passes thro your source code. On the first pass, it determines the displacement of named data items, the offset of labels etc., and puts this information in a symbol table. On the second pass, the assembler produces the binary code for each instruction and inserts the offsets, etc., that is calculated during the first pass. The assembler checks for the correct syntax in the assembly instructions and provides appropriate warning and error messages. You have to open your file again using the editor to correct the errors and reassemble it using assembler. Unless all the errors are corrected, the program cannot be executed in the next step.

The assembler generates two files from the source file; the first file, called the object file having an extension .obj which contains the binary codes for instructions and information

about the addresses of the instructions. The second file is called list file with an extension .lst. This file contains the assembly language statements, the binary codes for each instruction, and the offset for each inst. It also indicates any syntax errors or typing errors in the source program. Note: The assembler generates only offsets (i.e., effective addresses); not absolute physical addresses.

3. LINKER:

Its a program used to join several object files into one large object file. For large programs, usually several modules are written and each module is tested and debugged. When all the modules work, their object modules can be linked together to form a complete functioning program.

The LINK program must be run on .obj file.

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 7

The linker produces a link file which contains the binary codes for all the combined modules. The linker also produces a link map file which contains the address information about the linked files.

The linker assigns only relative addresses starting from zero, so that this can be put anywhere in physical primary memory later (by another program called locator or loader). Therefore,

this file is called reloadable. The linker produces link files with.exe extension. Object modules of useful programs (like square root, factorial etc.) can be kept in a library, and linked to other programs when needed.

4. LOADER:

Its a program used to assign absolute physical addresses to the segments in the .exe file, in the memory. IBM PC DOS environment comes with EXE2BIN loader program.

The .exe file is converted into .bin file.

The physical addresses are assigned at run time by the loader. So, assembler does not know about the segment starting addresses at the time program being assembled.

5. DEBUGGER:

If your program requires no external hardware, you can use a program called debugger to load and run the .exe file.

A debugger is a program which allows you to load your object code program into system memory, execute the program and troubleshoot or debug it. The debugger also allows you to look at the contents of registers and memory locations after you run your program.

The debugger allows you to change the contents of registers & memory locations and rerun the program. Also, if facilitates to set up breakpoints in your program, single step feature,

and other easy-to-use features. If you are using a prototype SDK 86 board, the debugger is usually called monitor program. We would be using the development tool MASM 5.0 or higher version from Microsoft Inc. MASM stands for Microsoft Macro Assembler. Another assembler TASM (Turbo Assembler) from Borland Inc., is also available.

How to Write and execute your ALP using MASM?

Steps to be followed:

1. Type EDIT at the command prompt (C :\> \MASM\). A window will be opened with all the

options like File, Edit etc., In the workspace, type your program according to the assembly language syntax and save the file with a .asm extension. (say test.asm)

2. Exit the Editor using File menu or pressing ALT + F + X.

3. At the prompt, type the command MASM followed by filename.asm (say, test.asm). Press Enter key 2 or 3 times. The assembler checks the syntax of your program and creates .obj

file, if there are no errors. Otherwise, it indicates the error with line numbers. You have to correct the errors by opening your file with EDIT command and changing your instructions. Come back to DOS prompt and again assemble your program using MASM command. This

Mp and Mc Lab(17CSL48)

MSEC CSE Dept, Prepared By Nagayya S Hiremath Page 8 has to continue until MASM displays 0 Severe Errors. There may still be Warning Errors.

Try to correct them also.

4. Once you get the .obj file from step 3, you have to create the.exe file. At the prompt, type

the command LINK followed by filename.obj (say, test.obj) and press Enter key. (Note that you have to give the extension now as .obj and not as .asm). If there are no linker errors, linker will create .exe file of your program. Now, your program is ready to run.

5. There are two ways to run your program.

a) If your program accepts user inputs thro keyboard and displays the result on the screen, then you can type the name of the file at the prompt and press Enter key. Appropriate messages will be displayed.

b) If your program works with memory data and if you really want to know the contents of registers, flags, memory locations assigned, opcodes etc., then type CV test (file name) at the prompt. Another window will be opened with your program, machine codes, register contents etc., Now, you also get a prompt > sign within CV window. Here you can use d command to

display memory contents, E command to enter data into memory and g command to execute your program. Also, you can single step through your program using the menu options. In many ways, CV (Code View) is like Turbo C environment. Once you are familiar with the architecture and basics of assembly language tools, you can start typing and executing your program.

Instructions for Laboratory Exercises:

1. The programs with comments are listed for your reference. Write the programs in observation

quotesdbs_dbs17.pdfusesText_23