Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

COLLEGE OF ENGINEERING ARANMULA

EC 305 MICROPROCESSORS AND MICROCONTROLLERS


MODEL EXAMINATION NOVEMBER 2017
Time :3hr Max.Marks:100
PART A
Answer two questions,question no:III compulsory
1. a)Write short note on various control and status signals of 8085 (5)

b)Draw the block diagram and explain the architecture and operation of 8085 (10)

II a).Explain various addressing modes of 8085 with example. (4)

b).Explain different classification of instructions in 8085. (6)

c)Compare between 8086,80286,80386 and 80486 in tabular form. (5)

KTU NOTES
III a)Draw the pin configuration of 8085 and explain the function of each signal.

b)Draw the block diagram of 8255 and its interfacing with 8085 in detail .
(7)

(8)

PART B

Answer two questions,question no:III compulsory

I a) b)Write short note on various interrupts of 8051. (5)

b) Draw the architecture and explain the functions of each block 8051 microcontroller

in detail (10)

II a)Explain the organization of TMOD and TCON register in 8051 timer/counter. (5)

b)Write a program to generate a wave shown in figure given below at P1.5 in mode 1

timer 0 of 8051. (10)

To get more study materails download KTU NOTES app


10ms 3ms

III a)Draw the pin configuration of 8051 and explain functions of each pin (7)

b)Explain serial communication in 8051 and discuss about various modes of serial

communication in detail. (8)

PART C

Answer two questions,question no:III compulsory

I. a)With neat block diagram explain how an LCD module can be interfaced to a 8051

module frm 8051.


KTU NOTES
module .Also write an assembly language program to send a sample data to the LCD

(20)

II a)Explain the features of PIC 18 family of microcontrollers. (10)

b)Write a short note on FLASH program memory of PIC 18 family of microcontrollers.

(10)

III a) With a neat diagram explain how an ADC can be interfaced to 8051. (8)

b)Write a short note on compare mode CCP module PIC 18 microcontrollers. (12)

To get more study materails download KTU NOTES app


Answer Key

1. a)Functions of each control signal :1 mark each

KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


I b)Block diagram :8 mark

KTU NOTES

Explanation:7 marks

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


II a) Addressing Modes

• Immediate

• Direct

• Indirect

• Register

• Register Indirect

II b) Classification of Instruction Set

 Data Transfer Instruction

 Arithmetic Instructions

 Logical Instructions

 Branching Instructions

KTU NOTES
 Control Instructions

Data Transfer Instructions

 These instructions move data between registers, or between memory and registers.

 These instructions copy data from source to destination.

 While copying, the contents of source are not modified.

Arithmetic Instructions

 These instructions perform the operations like:

 Addition

 Subtract

To get more study materails download KTU NOTES app


 Increment

 Decrement

Addition

 Any 8-bit number, or the contents of register, or the contents of memory location can be

added to the contents of accumulator.

 The result (sum) is stored in the accumulator.

 No two other 8-bit registers can be added directly

Eg:ADD B

Subtraction

 Any 8-bit number, or the contents of register, or the contents of memory location can be

subtracted from the contents of accumulator.

KTU NOTES
 The result is stored in the accumulator.

Eg:SUB B

Increment INR B

Decrement :DCR B

Logical Instructions

 These instructions perform logical operations on data

stored in registers, memory and status flags.

 The logical operations are:

 AND

 OR

To get more study materails download KTU NOTES app


 XOR

 Rotate

 Compare

 Complement

Branching Instructions

 The branching instruction alter the normal sequential flow.

 These instructions alter either unconditionally or conditionally

EG:jump,call etc

Control Instructions

 The control instructions control the operation of microprocessor

EG:NOP,HLT

IIc) KTU NOTES

To get more study materails download KTU NOTES app


III

a)

KTU NOTES

To get more study materails download KTU NOTES app


III b)

KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES
PART B

Ia)

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


I

KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

Ib)

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

1Ia)

To get more study materails download KTU NOTES app


II b)If using 22 MHZ clock,then clock period=.546microseconds

So to get time delay of 10 ms,divide by 0.546microseconds

Let that be the count value n=18315 cycle

65536-18315=47221=b875H

Similarly for 3ms,value=EA8AH

MOV TMOD,#01H

L1: MOV TL0,#75h

MOV TH0,#B8Hh

SETB P1.2

KTU NOTES

ACALL DELAY

MOV TL0,#8Ah

To get more study materails download KTU NOTES app


MOV TH0,#EAh

CLR P1.2

ACALL DELAY

SJMP L1

DELAY: SETB TR0

AGAIN:JNB TF0,AGAIN

CLR TR0

CLR TF0

RET

IIIa)

KTU NOTES

To get more study materails download KTU NOTES app


IIIb)
KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


PART C

Ia)

KTU NOTES

To get more study materails download KTU NOTES app


Calls a time delay before sending next data/command ;P1.0-P1.7 are connected to LCD data pins D0-
D7 ;P3.5 is connected to RS pin of LCD ;P3.4 is connected to R/W pin of LCD ;P3.3 is connected toE
pin of LCD.

ORG 00H
MOV A,#38H ; LCD 2 lines, 5x7 matrix
ACALL COMNWRT ; call command subroutine
ACALL DELAY ; give LCD some time
MOV A,#0EH ; display on, cursor on
ACALL COMNWRT ; call command subroutine
ACALL DELAY ; give LCD some time
MOV A,#01 ;clear LCD
ACALL COMNWRT ;call command subroutine
ACALL DELAY ;give LCD some time
MOV A,#06H ;shift cursor right
ACALL COMNWRT ;call command subroutine
ACALL DELAY ;give LCD some time
MOV A,#86H
ACALL COMNWRT
ACALL DELAY
KTU NOTES ;cursor at line 1, pos. 6
;call command subroutine
;give LCD some time
MOV A,#’Y’ ;display letter Y
ACALL DATAWRT ;call display subroutine
ACALL DELAY ;give LCD some time
MOV A,#’E’ ;display letter E
ACALL DATAWRT ;call display subroutine
ACALL DELAY ;give LCD some time
MOV A,#’S’ ;display letter S
ACALL DATAWRT ;call display subroutine
AGAIN: SJMP AGAIN ;stay here
COMNWRT: ;send command to LCD
MOV P1,A ;copy reg A to port 1
CLR P3.5 ;RS=0 for command
CLR P3.4 ;R/W=0 for write

To get more study materails download KTU NOTES app


SETB P3.3 ;E=1 for high pulse
ACALL DELAY ;give LCD some time
CLR P3.3 ;E=0 for H-to-L pulse
RET
DATAWRT: ;write data to LCD
MOV P1,A ;copy reg A to port 1
SETB P3.5 ;RS=1 for data
CLR P3.4 ;R/W=0 for write
SETB P3.3 ;E=1 for high pulse
ACALL DELAY ;give LCD some time
CLR P3.3 ;E=0 for H-to-L pulse
RET
DELAY:
MOV R3,#50 ;50 or higher for fast CPUs
HERE2: MOV R4,#255 ;R4 = 255
HERE: DJNZ R4,HERE ;stay until R4 becomes 0
DJNZ R3,HERE2
RET
END

IIa)
KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


IIb)

KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


IIIa)

KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

IIIb)

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app


KTU NOTES

To get more study materails download KTU NOTES app

You might also like