ASSIGNMENT 1
Short Question Type:
1 How many ports are present in 8051 and by default these ports are output or input?
2 What is the starting address of the SP and where the 1st data element in the stack going to be stored?
3 If 16MHz signal is connected to the XTAL1 pin, then calculate the time period of the each cycle.
4 Describe the PSW of 8051?
5 What is the default register bank in the 8051? If we want to change to other bank what instruction can perform this task, explain?
6 What is the meaning of the term DB, ORG, END and EQU related to the 8051 assembly language programming?
7 A given 8051 has 7FFFH as the address of its last location of on-chip
8 Write a program to save registers A and B on R3 and R5 of bank 2, respectively.
9 Name any three special function registers of 8051.
10 What is the size of the stack memory in 8051 and what is the size of the stack pointer register?
11 Give the address location of RAM assigned to various register banks in 8051 microcontroller.
12 What is the difference between 8031 and 8051 microcontrollers?
13 What is the advantage in using EQU directive to define a constant value? How many bytes are set aside by each of the following directives in 8051 microcontroller? (a) ASC_DATA: DB “1234” (b) MY_DATA: DB “ABC 1234”
Long Question Type:
1. In the 8051 MCU, each interrupt service routine (ISR) is allocated 8 bytes of program area. Describe how you can implement an ISR that requires more than 8 bytes.
2. Explain the RAM structure of a 8051 MCU and also the use of register banks.
3. It is desired to generate a square wave on P1.2 of 8051 microcontroller. Assuming XTAL=11.0592MHz, determine the highest square wave frequency that can be generated using Mode 1 programming of the timer of 8051 microcontroller.
4. Write an assembly language program for 8051 to find the sum of the values 78H, F5H and E2H. Put the sum in registers R0 ( low byte ) and R5 ( high byte ). (5)
5. Write an assembly language program for 8051 microcontroller to create a square wave of 50% duty cycle on bit 0 of port 1? (5)
6. What are the addressing modes of 8051? Give examples.
7. Write an assembly language program for 8051 microcontroller to copy the value 55H into RAM memory locations 40H to 45H using
a. Direct addressing mode
b. Register indirect addressing mode without a loop.
c. With a loop
8. Given below a sample program written for 8051. What will the contents of the accumulator after the execution of the following instruction?
MOV A, #CDH
RR A
CPL A
SWAP A
No comments:
Post a Comment