0% found this document useful (0 votes)
16 views2 pages

Understanding 8051 Microcontroller Basics

The document contains 18 questions about the 8051 microcontroller. It covers topics like the architecture, memory organization, ports, interrupts, and assembly language programming of the 8051 microcontroller.

Uploaded by

anupjenny
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Understanding 8051 Microcontroller Basics

The document contains 18 questions about the 8051 microcontroller. It covers topics like the architecture, memory organization, ports, interrupts, and assembly language programming of the 8051 microcontroller.

Uploaded by

anupjenny
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Question Bank – Module 2

1. Differentiate between microprocessor and microcontroller.


2. Describe the function of Program status word (PSW) in 8051 microcontroller.
3. Explain the architecture of 8051 microcontroller.
4. Explain the RAM memory organization of 8051microcontroller using a schematic
diagram. Also list the 8051 Special function registers and its functions.
5. Explain about the Addressing Modes of 8051 microcontroller with examples.
6. Illustrate the complete memory organisation of 8051 microcontroller.
7. How 8051 instructions are classified? Write two examples for each type.
8. What is stack? Explain the role of stack in program execution during a CALL
instruction.
9. Explain about the ports of 8051 and also illustrate the Port 0 circuit read and write
operation.( meaning: - input and output operation)
10. Explain the ‘Rotate’ instructions used in 8051 microcontroller.
11. List out various interrupts of 8051. Discuss the order of priority and Show the vector
address [ROM locations] of different interrupts.
12. What is meant by an Interrupt? Explain how an ISR is executed.

TRACE KTU
13. Explain the special function registers IE and IP.
14. What is the difference between RET and RETI instruction.
15. Differentiate between Machine cycle and Instruction cycle in 8051 microcontroller.
16. Write an assembly language program for generating a square wave at port pin P0.2
with 66% duty cycle.
17. Assume a switch is connected to pin P17. Write an ALP for 8051 microcontroller to
monitor its status and send two messages to port P0 continuously as follows:
a. If SW=0 send “N”
b. If SW=1 send “Y”.
18. Write the operations happening in the following instructions:
 ADD A, 56H
 XCHD A, @R1
 DJNZ R6, LABEL
 DIV AB
 XRL A, #0FFH
 JB P1.2 LABEL
 SWAP A
 MOVC A, @A+DPTR
 PUSH
 JZ relative_address
 XCH A, R7
 DA A
 CJNE @Ro, #35H, relative_address
 MOVX A, @DPTR
 ACALL address
 CPL A

TRACE KTU

Common questions

Powered by AI

'Rotate' instructions in the 8051 microcontroller (RL, RLC, RR, RRC) are used to shift the bits of the accumulator to the left or right. RL rotates accumulator bits left, and RR rotates right, without affecting the carry flag. RLC and RRC rotate left and right, respectively, with the carry flag being part of the rotation, useful for bit manipulation and certain arithmetic operations .

When an interrupt occurs in the 8051 microcontroller, the current state is saved on the stack, the program counter is set to the interrupt vector address, and the appropriate ISR is executed. On completion, the RETI instruction is used to return control to the point where the interrupt occurred, restoring the program counter and execution state .

The PSW in the 8051 microcontroller is a special function register that holds the current status of the arithmetic logic unit, including carry, auxiliary carry, and overflow flags. It also indicates the current register bank selections and parity of the accumulator, playing a crucial role in decision-making structures in programming .

The RAM in the 8051 microcontroller is divided into three main areas: lower 128 bytes, upper 128 bytes, and special function registers (SFRs) space. The lower 128 bytes are used for general-purpose RAM, the upper 128 bytes are indirectly addressable, and the SFRs are used to control I/O ports and special features. SFRs such as IE (Interrupt Enable) and IP (Interrupt Priority) manage interrupt control and priority, respectively .

IE (Interrupt Enable) is a special function register that enables or disables interrupts, controlling global and individual interrupt enable settings. IP (Interrupt Priority) allows prioritization of interrupts by assigning high or low priority to each interrupt source, ensuring critical operations are serviced first. Together, they manage interrupt processing effectively, ensuring responsive and orderly execution .

During a CALL instruction in the 8051, the return address is pushed onto the stack. Execution jumps to the called subroutine, and once complete, RET or RETI instructions pop this address off the stack to resume execution at the original location. This mechanism maintains correct execution sequencing and allows for nested subroutines .

The RET instruction returns to the calling routine by popping the address from the stack into the program counter. RETI, however, not only returns from the subroutine or ISR but also clears the interrupt system in the hardware, signaling that the interrupt handling is complete .

Instructions in the 8051 microcontroller are classified into categories such as data transfer (e.g., MOV, XCH), arithmetic (e.g., ADD, SUBB), logic (e.g., ANL, ORL), control transfer (e.g., SJMP, CJNE), and boolean instructions (e.g., CLR C, CPL bit). Each category serves different operations, from moving data to conditional jumps and logical operations .

The 8051 microcontroller supports several addressing modes: immediate (e.g., MOV A, #05h), register (e.g., MOV A, R0), direct (e.g., MOV A, 30h), register indirect (e.g., MOV A, @R0), and code memory (e.g., MOVC A, @A+DPTR). Each mode specifies different ways of accessing data, either directly, by referencing an address, or through registers .

Microprocessors are designed to execute central processing unit (CPU) tasks, focusing on computations and operations in computers, without built-in memory or peripherals. In contrast, microcontrollers are designed for embedded applications with integrated CPU, memory (RAM/ROM), and input/output peripherals on a single chip, facilitating control over specific devices or systems .

You might also like