Ilovepdf Merged
Ilovepdf Merged
/Seat No_______________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE- SEMESTER–VI (NEW) EXAMINATION – WINTER 2024
Subject Code:3160914 Date:20-11-2024
Subject Name:Microprocessors and Microcontrollers
Time:02:30 PM TO 05:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
Marks
Q.1 (a) State the difference between RISC and CISC architecture 3
(b) What is the size of address and data bus in 8085? Are they unidirectional or 4
bidirectional? Show, how a 2K memory can be interfaced with 8085?
(c) Draw and explain architectural block diagram of 8085 microprocessor 7
Q.2 (a) Give the function of RS0 and RS1 bits in PSW register of 8051 3
(b) State the significance of PC and DPTR register of 8051 4
(c) Draw and explain timing diagram of MVI instruction of 8085 7
microprocessor
OR
(c) Draw and explain the internal RAM structure of 8051. Show register banks 7
and bit addressable area of 8051
Q.4 (a) A certain instruction requires two machine cycles for execution. If the clock 3
frequency is 11.0592 MHz determine the time required to execute the
instruction
(b) What is the significance of GATE bit in TMOD register? 4
(c) Give the format of TCON register and explain the function of each bit. 7
OR
Q.4 (a) Give difference between simplex, half duplex and full duplex transmission 3
(b) Write an assembly language program for 8051 to transfer the letter “A” 4
serially at 4800 baud continuously. Assume XTAL = 11.0592 MHz
(c) Write a C program to alternately display 55H and AAH on P1 port with 7
some delay
Q.5 (a) Give interrupt vector table of 8051. Discuss their priorities 3
(b) Discuss the format of IE register and explain the function of each bit 4
(c) Draw and explain how 8051 can be connected to external 8K RAM. Which 7
ports are used for address and data lines?
OR
Q.5 (a) What is meant by pipelining? How it affects execution speed? 3
(b) Discuss the format CPSR register in ARM. State the different operating 4
modes of the processor.
(c) What is stepper motor? State some of its applications. Draw and discuss 7
how 8051 can be interfaced with stepper motor?
*******************
Enrolment No./Seat No_____________
MARKS
Q.1 (a) State the size of address and data bus in 8085. Explain how they are 03
multiplexed?
(b) State the difference between Van Neumann and Harvard architecture 04
(c) Draw and discuss the timing diagram of MVI instruction of 8085 07
microprocessor
OR
(c) Write an ALP to separate out positive, negative and zero numbers in an 07
array in external memory starting from 3000H. The array is 10 bytes long.
Store the count of positive, negative and zero numbers in internal RAM
location 30H, 31H and 32H
Q.3 (a) It is required to select register bank 3 in 8051. Explain how it can be 03
done?
(b) If A = (17)10 and B = 3, what will be the data in registers A and B when 04
the following instructions are executed (i) MUL AB (ii) DIV AB. What
will be status of OV flag in both the cases?
(c) Draw and explain the internal structure of P0 and P1 in 8051 07
OR
Q.3 (a) Draw the internal RAM structure of 8051 03
(b) Explain the following instructions of 8015 giving examples 04
(i) CJNE (ii) XRL
(c) Draw and explain the format of TCON and TMOD register. State the 07
function of each and every bit
Q.4 (a) Assume that Timer 1 is operating in mode 2 and the count loaded in timer 03
is F3H. After how much time, timer overflow flag TF1 will get set?
Assume XTAL = 10 MHz
(b) Write an 8051 C program to toggle all the pins of port 1 continuously 04
with some delay
(c) Write an assembly language program to transmit the message “GTU” 07
serially at 9600 baud, 8 bit data, 1 stop bit. Do this continuously
OR
Q.4 (a) Explain SCON and SBUF registers of 8051 03
(b) Write an 8051 C program to toggle pin P1.5 every 50 ms. Use XTAL = 04
11.0592 MHz. Use Timer 0 in mode 1 to generate the delay
(c) Explain IE and IP registers of 8051. State the priorities of interrupts. If IP 07
contains 08H, will the default priorities change? Discuss.
Q.5 (a) How many general-purpose registers are available in ARM in user mode? 03
Also explain the function of SP, PC and LR registers in ARM.
(b) Draw how 4 × 4 matrix keyboard is interfaced with 8051 04
(c) Explain how LCD can be interfaced with 8051? Discuss the commands 07
that are required to be given to initialize the LCD. Write an ALP to
display “YES” on first line of LCD
OR
Q.5 (a) Explain the difference between RET and RETI instruction 03
(b) Explain CPSR format in ARM 04
(c) Explain how external 8K ROM can be interfaced with 8051? Draw the 07
connection diagram. Also discuss the function of ALE signal.
***********
Seat No.: ________ Enrolment No.___________
Marks
Q.1 (a) Explain basic differences between CISC and RISC 03
processor.
(b) Write one instruction each using the following addressing 04
modes.
a. Immediate
b. Register
c. Register indirect
d. Direct
1
(b) Explain how interrupt priority can be changed using IP 04
register. Also explain the default priorities assigned to
interrupts in 8051 microcontroller.
(c) Write an 8051 program to transfer WELCOME serially at 07
9600 baud rate(8 bit data and 1 stop bit) continuously.
OR
Q.4 (a) Explain the bit contents of IE register. 03
(b) Give comparison between Asynchronous and Synchronous 04
serial data transfer
(c) Explain SCON register in 8051 microcontroller. 07
Q.5 (a) Draw and explain 8051 connection to external RAM (8K x 03
8)
(b) List the features of ADC 0804 04
(c) Interface a DAC to 8051 microcontroller and write an 07
assembly language program to generate triangular wave
using DAC interface.
OR
Q.5 (a) List the vector addresses of various interrupts in ARM 03
processor.
(b) Draw an interfacing diagram to interface 4 x 4 matrix 04
keyboard with 8051.
(c) Discuss how the speed and direction of DC motor can be 07
controlled using microcontroller.
.
2
Seat No.: ________ Enrolment No.___________
MARKS
Q.1 (a) Give answer to below questions 03
(1) Which machine cycles are used to execute the instruction MOV B, M ?
(2) The addressing mode of MOV A,@R1 instruction is ___________.
(3) Which timer and mode are used for serial communication?
(b) List out differences between Microprocessor & Microcontroller. 04
(c) Draw the architecture block diagram of 8085 and explain flag register in detail. 07
Q.3 (a) Explain the difference among MOV, MOVC and MOVX instructions. 03
(b) Draw the TMOD register and write down the steps to program one of the timers in 04
mode1 for generating specific time delay.
(c) Write a program to generate 50Hz frequency signal on Pin 2.3 with the crystal 07
frequency of 11.0592MHz using Timer 0.
OR
Q.3 (a) Explain PSW register of 8051 in detail. 03
(b) List out different conditional jump instructions and explain any two with example. 04
(c) Write a program to find maximum number from a block of five, 8-bit numbers 07
stored from the memory location 30h and store the result at 40h memory location..
Q.4 (a) Explain the difference between RLC A & RRC A instruction. 03
(b) List out different assembler directives and explain any two in detail. 04
(c) Write an assembly language program to convert 8-bit two-digit BCD number 07
system into hexadecimal number system.
OR
Q.4 (a) What is the use of SMOD bit in PCON register? 03
(b) Draw and explain SCON register for serial communication. 04
(c) Write a C program to generate a ramp waveform at port P1 using software delay. 07
1
Q.5 (a) What is the use of Interrupt priority (IP) register? How one can change the interrupt 03
priority?
(b) What is the use of MAX232 IC in serial communication? Explain the difference 04
between MAX232 and MAX233 IC.
(c) Draw and explain the interfacing of common anode 7 segment display with 8051. 07
OR
Q.5 (a) Draw and explain each bit of Current program status register of ARM processor. 03
(b) Interface matrix keyboard with 8051. 04
(c) Write a program to transmit a message “Best of Luck” serially at 9600 baud rate 07
continuously using serial communication. Crystal Frequency :-11.0952MHz.
*************
2
Seat No.: ________ Enrolment No.___________
Q.2 (a) Explain the function of following pins in 8085 µp: HLDA & HOLD 03
(b) Illustrate how address/data lines AD0-AD7 are de-multiplexed in 8085 04
µp?
(c) A byte is stored in external memory location 2005H. Write an 8051 µc 07
assembly language program to count number of 0’s and 1’s in. Draw
flowchart.
OR
(c) Draw and explain timing diagram of instruction STA 2000H of 8085 µp. 07
Q.3 (a) Explain 8051 program status word (PSW) register in brief. 03
(b) Discuss various addressing modes of 8051 microcontroller assembly 04
language programming.
(c) Write a 8051 assembly language program to generate a square wave of 07
1.5 kHz frequency at P2.0 using Timer 0 in Mode 1 with crystal frequency
of 12 MHz.
OR
Q.3 (a) Explain editor, assembler, compiler and linker 03
(b) Explain all the bits of TCON register. 04
(c) Explain the Interrupt facility of 8051 microcontroller using IE and IP 07
register. Also mention the internal priority of Interrupt and their vector
locations.
Q.4 (a) Write C program to get bit P1.0 and send it to P2.1 after inverting it. 03
(b) Explain interfacing of DC motor using H-bridge circuit with 8051 04
microcontroller.
(c) Write an 8051 program in embedded C to blink the LED connected to pin 07
P1.5 at a suitable delay interval.
OR
Q.4 (a) C programming is more preferred over assembly programming for 8051 03
µc. Justify your answer with proper reason.
(b) Explain interfacing of 8051 with ADC 0808. 04
(c) What is an assembler directive? Give at least four examples of assembler 07
directives and explain function of each in brief.
1
Q.5 (a) Explain basic differences (1) Van neuman and Harvard architecture (2) 03
CISC and RISC.
(b) How baud rate can be set in 8051 microcontroller for serial 04
communication?
(c) Explain and Differentiate between the following instructions of 8051 07
microcontroller.
(i) SWAP and XCHG (ii) MOVX and MOVC
(iii) Bit level ANL and byte level ANL
OR
Q.5 (a) Explain advantages of IDE in program development. 03
(b) Write a short note on available data types in embedded C. 04
(c) Explain every step of the following program and also calculate the 07
frequency of the square wave generated at the end of program execution.
(assume crystal frequency = 11.0592MHz)
MOV TMOD, #20H
MOV TH1, #4H
SETB TR1
L1 : JNB TF1, L1
BACK: CPL P1.5
CLR TF1
SJMP BACK
*************************
2
Seat No.: ________ Enrolment No.___________
Q.2 (a) What is the function of following pins in 8085: HOLD, READY & 03
RESET OUT
(b) Draw and explain in brief timing diagram for instruction MVI A, 32h. 04
(c) List various processing modes of ARM processors with classification 07
and explain complete ARM register set.
OR
(c) Write assembly language program for 8051 μc to count number of 0’s 07
and 1’s in a byte stored in external memory location C500H. Draw
flowchart.
Q.4 (a) Differentiate between SJMP, AJMP and LJMP for 8051 μc 03
programming.
(b) How baud rate can be set in 8051 microcontroller for serial 04
communication?
(c) Explain the role of SBUF & SCON registers in serial transfer in 8051. 07
OR
Q.4 (a) List out steps in executing an interrupt for 8051 μc. 03
(b) Explain IE register in brief. 04
1
(c) Write a C program using interrupts to make timer 0 to generate a square 07
wave of 5 KHz frequency on P0.1. Assume XTAL =11.0592 MHz.
*************