Department of Electrical & Computer Engineering (ECE)
North South University
Course Code: 331, Section: 5,6 (Noon)
Course Title: Microprocessor Interfacing & Embedded System
Pre Final Assignment, Summer 2019
Name:
Student ID and section:
Answer All
1. Answer all the questions given below. [10]
(a) Consider the following 8086 interfacing problem. [1+1+1+1+1]
The LED array connected to Port A will light up if the input string is a Palindrome
Ex. of Palindrome: Input String- "abba" ; Output: String is palindrome
Input String- "abbc" ; Output: String is not palindrome
(i) Construction of the logic circuit to access 8255A
(ii) Initialization of the control registers for the designated operation
(iii) Creation of the string variables
(iv) Comparison between the input string and reversed string
(v) Lighting up the LED array
Hints: Use LEA, SI and DI to access and compare the input and reversed strings
(b) Write answer of T or F for each question given below [1+1+1+1+1]
(i) Move string instructions are used to copy an array from one location to another location
(ii) There are two 8 bit timers in 8051 microcontroller
(iii) Timers can only be used for creating delay loops but not for counting
(iv) The MOVSB instruction tells the assembler to be moved string as words; the MOVSW
implies the string is to be moved as bytes.
(v) CMPSB compares two bytes in given addresses and sets the flag accordingly
2. Answer all the questions given below
(a) Explain how to access and configure individual bit as input for 8051 application.
[2.5+2.5]
(b) Consider the following 8051 interfacing problem. Crystal frequency: 11.059MHz.The
relay coil is to be energized at an interval of 10 ms. Use timer routine to implement the
operation. [1+1+1+1+1]
i) Initialize TMOD for timer 0 , mode 1 operation
ii) Initialize TH0 and TL0 for 10 ms delay
iii) Construct the delay loop with appropriate timer flag setting
iv) Access and configure relevant pin as needed
v) Call back delay loop from the main function as needed