2 Test
2 Test
MARKS
Date 16/05/2023 Embedded C Programming (20EC43P) 30
Time 9:30 to 10:50 Semester 4th MONTH/YEAR MAY-2023
am
Name of course coordinator: RESHMA M
Answer one full question from each sections
SECTION-1
1.A) Define Microprocessor and Microcontroller(or)
Microcontroller:-
A microcontroller is a highly integrated chip that contains a CPU, scratch pad RAM, special and
general purpose register arrays, on chip ROM/FLASH memory for program storage, timer and
interrupt control.
Micprocessors:
A microprocessor is a computer processor that incorporates the functions of a central processing unit
on a single integrated circuit (IC), or at most a few integrated circuits.
The microprocessor is a multipurpose, clock driven, register based, digital integrated circuit that
accepts binary data as input, processes it according to instructions stored in its memory, and
provides results as output.
When the on chip 4k ROM is not sufficient to store program, external ROM chip can be used.
PORT0 provide lower 8 bit address A0-A7 and PORT2 provides higher 8 bit A8-A15. PORT0 is
used to carry both address and data bits.
ALE pin of 8051 is used to indicate whether bits present on PORT0 are pertaining to address
or data.
A latch IC 74LS373 is used to hold lower bytes of address provides by port0 when ALE=1.
EA(External Access) pin must be connected to ground to access external ROM is illustrate in
figure
1. Immediate addressing mode:- In this mode immediate data is a part of the instruction. And
the immediate data is preceded by “#” sign.
Ex-MOV A,#20H
2. Register addressing mode.:- In this mode data is available in one of the register available
in 8051 that register name is specified in the instruction.
EX- MOV A,R3;
3. Direct addressing mode:- In this mode the address of the memory location where the data is
stored is part of the instruction.
EX- MOVR3,22H;
4. Register indirect addressing mode:- In this mode 2 register R0 and R! are used as
memory pointers to hold the address pf the memory location where the data is stored.
EX- MOV A,@RO
5. Indexed addressing mode:- This mode is used to access data in ROM. This mode is used
to access data elements of look up table enteries located in ROM spaces.
a. EX- MOV A,@A+DPTR
Comments:-
Ex c=a+b;/*
ANL A,#15H;
MOV R4,A;
END
2.B) 2.B)Analyse the following code indicate what is the result and in
which register the result would the result would be stored.
Assume 50h-02h, and 52=03h.
ORG 0000H
MOV A,50H;
MOVB,52;
MUL AB;
MOV R1,A;
MOV R2,B;
END
SECTION-3
3)Develop an 8051 Assembly Language program to move a block of
data within internal Ram.
3)Develop an 8051 Assembly Language program to convert packed
BCD to unpack BCD.