cse 2 marks_

advertisement
SNS COLLEGE OF ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
TWO MARK QUESTIONS AND ANSWERS
SUBJECT: MICROPROCESSORS & MICRO CONTROLLERS
CLASS
: IV SEM CSE
SUB CODE: EC6504
SECTION: A &B
PART – A
Introduction
1. What is a Microprocessor?
Microprocessor is a program-controlled device, which fetches the instructions from
memory, decodes and executes the instructions. Most Micro Processors are single- chip
devices.
2.What is Stack Pointer?
Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the
address of the top of the stack.
3.What is Program counter?
Program counter holds the address of either the first byte of the next instruction to be
fetched for execution or the address of the next byte of a multi byte instruction, which has
not been completely fetched. In both the cases it gets incremented automatically one by
one as the instruction bytes get fetched. Also Program register keeps the address of the
next instruction.
4.Which Stack is used in 8085?
LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored
information can be retrieved first.
5.What happens when HLT instruction is executed in processor?
The Micro Processor enters into Halt-State and the buses are tri-stated.
6.What is meant by a bus?
A bus is a group of conducting lines that carries data, address & control signals.
7..What is Tri-state logic?
Three Logic Levels are used and they are High, Low, High impedance state. The
high and low are normal logic levels & high impedance state is electrical open circuit
conditions. Tri-state logic has a third line called enable line.
8. Name different addressing modes?
Immediate, Direct, Register, Register indirect, Implied addressing modes.
9.What is clock frequency for 8085?
3 MHz is the maximum clock frequency for 8085.
10.What are input & output devices?
Keyboards, Floppy disk are the examples of input devices. Printer, LED / LCD display,
CRT Monitor are the examples of output devices.
11. Why crystal is a preferred clock source?
Because of high stability, large Q (Quality Factor) & the frequency that doesn’t drift with
aging. Crystal is used as a clock source most of the times.
12.Why 8085 processor is called an 8 bit processor?
Because 8085 processor has 8 bit ALU (Arithmetic Logic Review). Similarly 8086
processor has 16 bit ALU.
13.What does microprocessor speed depend on?
The processing speed depends on DATA BUS WIDTH.
14.What is the disadvantage of microprocessor?
It has limitations on the size of data. Most Microprocessor does not support floatingpoint operations.
15.What is meant by LATCH?
Latch is a D- type flip-flop used as a temporary storage device controlled by a timing
signal, which can store 0 or 1. The primary function of a Latch is data storage. It is used
in output devices such as LED, to hold the data for display.
16.What is interrupt?
Interrupt is a signal send by external device to the processor so as to request the
processor to perform a particular work.
17.What is cache memory?
Cache memory is a small high-speed memory. It is used for temporary storage of data &
information between the main memory and the CPU (center processing unit). The cache
memory is only in RAM.
18.What is a compiler?
Compiler is used to translate the high-level language program into machine code at a
time. It doesn’t require special instruction to store in a memory, it stores automatically.
The Execution time is less compared to Interpreter.
19.What is flag?
Flag is a flip-flop used to store the information about the status of a processor and the
status of the instruction executed most recently
20.What is stack?
Stack is a portion of RAM used for saving the content of Program Counter and general
purpose registers.
UNIT – I 8086
Part - A
1. What are the flags in 8086?









Carry flag
Parity flag
Auxiliary carry flag
Zero flag
Overflow flag
Trap flag
Interrupt flag
Direction flag and
Sign flag.
2. What are the various interrupts in 8086?
Maskable interrupts, Non-Maskable interrupts.
3. What is meant by Maskable interrupts?
An interrupt that can be turned off by the programmer is known as Maskable interrupt.
4. What is Non-Maskable interrupts?
An interrupt which can be never be turned off (ie.disabled) is known as Non-Maskable
interrupt.
5. What is the Maximum clock frequency in 8086?
5 Mhz is the Maximum clock frequency in 8086.
6. What are SIM and RIM instructions?
SIM is Set Interrupt Mask. Used to mask the hardware interrupts. RIM is Read Interrupt
Mask. Used to check whether the interrupt is Masked or not.
7. Which is the tool used to connect the user and the computer?
Interpreter is the tool used to connect the user and the tool.
8. What is the position of the Stack Pointer after the PUSH instruction?
The address line is 02 less than the earlier value.
9. What is the position of the Stack Pointer after the POP instruction?
The address line is 02 greater than the earlier value.
10. What are the different functional units in 8086?
Bus Interface Unit and Execution unit, are the two different functional units in 8086.
11. Which Segment is used to store interrupt and subroutine return address
registers? Stack Segment in segment register is used to store interrupt and
subroutine return address registers.
12. Which Flags can be set or reset by the programmer and also used to control the
operation of the processor?
Trap Flag, Interrupt Flag, Direction Flag.
13. What does EU do?
Execution Unit receives program instruction codes and data from BIU, executes these
instructions and store the result in general registers.
14. What are the addressing modes of 8086?
 Immediate addressing mode
 Direct addressing mode
 Register addressing mode
 Register indirect addressing mode
 Indexed addressing mode
 Register relative addressing mode
 Based indexed addressing mode
 Relative based indexed addressing mode
 Intra segment direct mode
 Intra segment indirect mode
 Inter segment direct mode
 Inter segment indirect mode
15. What are the types of instructions in instruction set of 8086?






Data copy / Transfer instructions
Arithmetic and Logical instructions
Branch instructions
Machine control instructions
Flag manipulation instructions
String instructions
16. List some functions of BIU?
Sends address of the memory or I/O
Fetches instructions from memory
Reads data from port / memory
Writes data into port / memory
Supports instruction queuing
Provides address relocation facility
17. Define assembler directives?
There are some instructions in the assembly language program which are not a part of
processor instruction set. These are instructions to assembler and are referred as pseudo
operations or assembler directives.
18. List some features of 8086?






16 bit microprocessor
Has a 16 bit data bus, 20 bit address bus
Can generate 16 bit I / O address
Provides fourteen 16 bit registers
Has multiplexed address and data bus
Can operate in minimum and maximum mode
19. Define 80186
80186- 16 bit processor. It has more built in hardware units such as three timers, two
Dma controllers, one interrupt controller and pheripheral & memory select logic.
20. Give the significance of
advanced processors
Processors
80186
80286
80386
80486
Pentium
16 bit Processor
16 bit processor, protected virtual
address
32 bit processor
32 bit processor
64bit data bus & 32bit addres
21. What are the 8086 interrupt types
Dedicated interrupts
Type 0: Divide by zero interrupt
Type 1: Single step interrupt
Type 2:Non maskable interrupt
Type 3: Breakpoint
Type 4: Overflow interrupt
Software interrupts Type 0-255
22. What is interrupt service routine
While the CPU is executing a program an interrupt breaks the normal sequence of
execution of instructions & diverts its execution to some other program. This program to
which the control is transferred is called the interrupt service routine.
23. What is hardware interrupt?
An 8086 interrupt can come from any one of three sources. One sources is an external signal
applied to the nonmarkable interrupt(NMI) input in or to the interrupt (INTR) input pin. An
interrupt caused by the signal applied to one of these input is referred to as a hardware
interrupt
24. What is software interrupt?
The interrupt caused due to execution of interrupt instruction is called software interrupt.
25. How is the physical address calculated? Give an example.
The physical address, which is 20-bits long is calculated using the segment and offset
registers, each 16-bits long. The segment address is shifted left bit-wise four times and offset
address is added to this to produce a 20 bit physical address.
Eg: Segment address - > 1005H
Offset address - > 5555H
Segment address - > 1005H - > 0001 0000 0000 0101
Shifted by 4 bit position - > 0001 0000 0000 0101 0000
Offset address - > + 0101 0101 0101 0101
Physical address - > 0001 0101 0101 1010 0101
155A5
Part – B
1. Draw the block diagram of 8086 Microprocessor and explain? (12)
2. Explain the architecture of Intel 8086 with the help of a block diagram? (12)
3. Describe the sequence of event that may occur during the different T state in the
opcode fetch machine cycle of 8086?
(8)
4. List out the maskable and non maskable interrupts available in 8086? (6)
5. Write short notes on addressing memory.
(6
6. Explain the minimum mode of operation of 8086. (12)
7. Write notes on addressing input and output devices? (6)
8. Design an 8086 based system in minimum mode containing 64kb of EPROM
and64kb of RAM
(12)
9. Give the functions of NMI, BHE and TEST pins of 8086? (4)
10. Explain in detail about 8086 memory banks and associated signals for byte and
word operations.
(6)
11. Classify the addressing modes of 8086 in detail?
12. Give the operation of the following 8086 instructions: AAS, SHL, CWD, STI
13. Explain about procedures and their types?
14. Describe about the flags available in flag register of 8086?
15. Write a program in 8086 to move N number of bytes from one location to another?
16. Write an assembly language program to add two 2-digits BCD Number? (4)
17. Explain the instruction set of 8086?
(10)
18. Write notes on status flag?
(6)
19. Explain the similarities diff b/w subtract and compare instructions in 8086
20. Write an assembly language program to convert on array of ASCII code to
corresponding binary (hex) value. The ASCII array is stored starting from 4200H.The
first element of the number of elements in the array.
(8)
21. Write an ALP to Add two 8 bit numbers? (4)
22. How do the instructions of 8086 is classified based on their function and word length?
Give an example?
(8)
23. Explain the 8086 Bit Manipulation instructions with an example for each. (6)
24. Write an 8086 program to convert BCD Data to Binary Data. (8)
25. Explain the Relative addressing mode and the implied addressing mode with its
syntax. Use an example. (8)
26. Give brief introduction to advanced processors with its supporting components.
UNIT –2 8086 SYSTEM BUS
Part - A
1. Define instruction pipelining?
The 8086 architecture has a 6 byte instruction queue that prefetches the instructions
from memory and stores the instructions in the queue. This results in a faster execution of
instructions. This scheme is known as instruction pipelining.
2. State the operation of minimum mode 8086 system?
The 8086 microprocessor can be operated in minimum mode by connecting
MN /
MX pin to logic1. In this mode all control signals are given by the microprocessor chip
itself. There is only a single microprocessor in minimum mode system.
3. Describe about the maximum mode 8086 system?
In maximum mode, the 8086 is operated by connecting the MN / MX pin to ground.
The processor drives the status signals S1, S2 and S3. Another chip called bus controller
drives the control signals using the status information.
4. Differentiate refresh cycle from memory read cycle?
 Memory address is not provided by the CPU address bus, it is generated b y
refresh counter.
 Unlike memory read cycle, more than one memory chip can be enabled at a
time so as to reduce the number of total memory refresh cycles.
 Data is not allowed to appear on the system data bus during refresh.
 Memory refresh is an independent regular activity initiated and carried by the
refresh mechanism.
5. What are the two methods of interfacing general I / O devices?
 I / O mapped I / O
 Memory mapped I / O
6. What is multi microprocessor system?
Multiprocessing is the use of two or more central processing units (CPUs) within a
single computer system. The term also refers to the ability of a system to support more
than one processor and/or the ability to allocate tasks between them.In order to
enhance the speed of operation, an appropriate system involving several
microprocessors connected using a certain topology and is known as the multi
microprocessor architecture.
7. List some configurations for physical interconnections between the processors?
 Star configuration




Loop configuration
Complete interconnection
Regular topologies
Irregular topologies
8. Define an operating system?
An operating system is an important program that resides in the computer
memory and acts as an interface between the user or an application program and the
system resource.
9. What are the exceptions that are masked and detected by 8087?






Invalid operation
Overflow
Underflow
Zero divide
Denormalized operand
In exact result
10. Categorize the instructions supported by 8087?






Date transfer instructions
Arithmetic instructions
Compare instructions
Transcendental instructions
Constant returning instructions
Coprocessor control operations
11. Differentiate between tightly coupled and loosely coupled configurations?
o In a tightly coupled configuration, the 8089 shares the system bus and
memory with the host CPU using the RQ / GT pins
o In a loosely coupled configuration, 8089 has its own local bus and
communicate with the host using the bus arbiter and controller.
12. What are the three basic bus access control and arbitration scheme? (or )What
are the schemes for establishing priority in order to resolve bus arbitration
problem?
There are three basic bus access control and arbitration schemes
1. Daisy Chaining 2. Independent Request 3. Polling
13. List the advantages of loosely coupled systems over the tightly couples systems?
 More number of CPUs can be added in a loosely coupled system to improve the
system performance.
 System structure is modular and hence easy to maintain and trouble shoot.
 Fault in a single module does not lead to a complete system break down.
 It is more fault tolerant due to independent processing modules.
 More suitable to parallel applications due to its modular organization.
14. Define Coprocessor:
A coprocessor is a computer processor used to supplement the functions of the
primary processor (the CPU). Operations performed by the coprocessor may be floating
point arithmetic, graphics, signal processing, string processing, encryption or I/O
Interfacing with peripheral.
14. Give the functions of coprocessor
instructions, do input/output operations, manage memory, and so on.
instructions and handle all other operations aside from the coprocessor functions.
-purpose computer, but
carries out only a limited range of functions under the close control of a supervisory
processor.
15. Define system bus timing.
Timing diagram of 8086 bus cycles includes general bus operation, memory & I/O
read cycle and memory & I/O write cycle in minimum mode operation. memory & I/O
read cycle and memory & I/O write cycle in maximum mode operation. Interrupt
acknowledgement, bus request, bus grant timing in minimum and maximum mode
operation.
16. What are the three basic multiprocessor configuration that 8086 can support?
1. Coprocessor configuration
2. Closely coupled configuration
3. Loosely coupled configuration
17. What is I/o Programming
I/O devices controlled either directly or indirectly by processor. DIRECT: In and out
: 8 bit or 16 bit contents of portA into AL, 8 bit or 16 bit contents of AL into Port A,
INDIRECT: In AX, DX or In AL, DX. OUT, DX, AX or OUT DX, AL.
18. State the significance of LOCK signal in 8086.
If 8086 is working at maximum mode, there are multiprocessors are present. If the
system bus is given to a processor then the LOCK signal is made low. Processors after the
use of the system bus again the LOCK signal is made high. That means it is ready to give the
system bus to any processor.
19. What is the function of MN/MX pin?
The logic level at MN/MX pin decides whether processor operates in minimum or
maximum mode.
21. What are the uses of AD15 – AD0 lines?
AD15 – AD0 are time multiplexed memory I/O address and data lines. Address
remains on the lines during T1 state, while data is available on data bus during T2- T4
states. These lines are active high and float to a tristate during interrupt acknowledge
and local bus hold acknowledge cycles
22.What is the operation performed when TEST input is low ?
When the TEST input is low, execution will continue, else, the processor remains in an
idle state.
24. What is the purpose of clock input ?
The clock input provides the basic timing for processor operation and bus control
activity. The range of frequency varies from 5MHz to 10MHz.
25.What happens when a high is applied to RESET pin?
When a high is given to RESET pin, the processor terminates the current activity
and starts executing from FFFF0H. It must be active for atleast four clock cycles.
26.What is the function of the BHE signal in 8086?
BHE signal means Bus High Enable signal. The BHE signal is made low when
there is Some read or write operation is carried out. ie. Whenever the data bus of the
system is busy i.e. whenever there is some data transfer then the BHE signal is made
low.
Part – B
1.
2.
3.
4.
5.
Describe about the 8086 signals?
Explain the operation of 8086 in minimum mode?
Describe about the maximum mode operation of 8086?
Write an essay on the numeric processor 8087?
Write in detail about the I / O processor 8089?
6. Explain the two types of configuration with neat block diagram
7. Evaluate system Bus timing with neat block diagrm
8. Describe in brief the two types of system available in 8086 with its pin features
9. Enumerate I/O programming by its major input and output operation
10. . Explain multiprogramming by comparing multiprocessing
11. Deduce the concept of system bus structure
12. Discuss about the multiprocessor configurations of 8086.
13. . Explain the basic bus access control and arbitration schemes used in multiprocessor
system or Explain the basic bus access control and arbitration schemes used in
loosely coupled multiprocessor system.
14. Illustrate various topologies with different interfacing examples.
15. Write a brief note on 8086 base loosely coupled system configuration
16. Evaluate closely coupled system configuration in detail.
UNIT – 3
I / O INTERFACING
Part – A
1. What are the modes of operation of 8255?
 BSR Mode
 IO Mode
- Mode 0
- Mode 1
- Mode 2
2. List the steps in the general algorithm for ADC interfacing?
o Ensure the stability of analog input applied to the ADC.
o Issue start of conversion (SOC) pulse to ADC.
o Read end of conversion (EOC) signal to mark the end of conversion process.
o Read analog data output of the ADC as equivalent digital output.
3. List the six modes of operation of 8253?
 Mode 0 (Interrupt on terminal count)
 Mode 1 (Programmable monoshot)
 Mode 2 (Rate generator)
 Mode 3 (Square wave generator)
 Mode 4 (Software triggered strobe)
 Mode 5 (Hardware triggered strobe)
4. List the command words of 8259A?
 Initialization command word &
 Operation command word
5. What are the operational modes of 8279?
 Input (Keyboard) mode &
 Output (Display) mode
6. What are three modes of data transmission?
Simplex
Half duplex &
Full duplex
7. List the transfer modes of 8237?
 Single transfer mode
 Block transfer mode
 Demand transfer mode
 Cascade mode
 Memory to memory transfer
8. List the commands that can be executed by 8237?
 Clear First / Last Flip flop
 Clear Mask Register
 Master Clear Command
9. List the salient features of Mode0 of 8255?
 Two 8 bit ports ( Port A and Port B ) and two 4 bit ports ( Port C upper and lower) are
available. The two 4 bit ports can be combinedly used as third 8 bit port.
 Any port can be used as an input or output port.
 Output ports are latched. Input ports are not latched.
 A maximum of 4 ports are available so that overall 16 I / O configurations are
possible.
10. State the features of 8255 in Mode1?
 Group A and Group B are available for strobed data transfer.
 Each group contain one 8bit data I / O port and one 4 bit control / data port.
 8bit data port can be either used as input or output port.
 Out of 8bit portC, PC0 – PC2 are used to generate control signals for port B,
PC3 – Pc5 are used to generate control signals for port A. PC6, PC7 may be
used as independent data lines.
11. State the salient features of Mode2 of 8255?
o Single 8 bit port in group A is available
o 8bit port is bidirectional and a 5bit control port is available.
o 3 I / O ports are available at port C, PC2 – PC0
o Inputs and outputs are both latched.
o 5 control bits of portC (PC3 – PC7) is used for generating / accepting handshake
signals for the 8bit data transfer on portA.
12. Give the applications of I/O interface
1. Traffic Light Control
2. LED and LCD Display
3. Alarm Controller
13. Define D/A and A/D interface
The analog to digital converter is treated as an input device by the microprocessor that
sends an initializing signal to the ADC to start the analog to digital data conversion
process. The Digital to Analog Converters (DAC) convert binary numbers into their
analog equivalent Voltages.
14. What is the output modes used in 8279?
8279 provides two output modes for selecting the display options.
1. Display Scan In this mode, 8279 provides 8 or 16 character-multiplexed displays
those can be organized as dual 4-bit or single 8-bit display units.
2. Display Entry 8279 allows options for data entry on the displays. The display data
is entered for display
15.What are the modes used in keyboard modes?
1. Scanned Keyboard mode with 2 Key Lockout.
2. Scanned Keyboard with N-key Rollover.
3. Scanned Keyboard special Error Mode.
4. Sensor Matrix Mode
16. What are the modes used in display modes?
1. Left Entry mode In the left entry mode, the data is entered from the left side of the
display unit..
2. Right Entry Mode In the right entry mode, the first entry to be displayed is entered on
the rightmost display.
17. Give the operating modes of 8259a?
(a) Fully Nested Mode (b) End of Interrupt (EOI) (c) Automatic Rotation
(d) Automatic EOI Mode (e) Specific Rotation (f) Special Mask Mode
(g) Edge and level Triggered Mode (h) Reading 8259 Status (i) Poll command
(j) Special Fully Nested Mode (k) Buffered mode (l) Cascade mode
18. Give the different types of command words used in 8259.
The command words of 8259A are classified in two groups 1. Initialization command
words (ICWs) 2. Operation command words (OCWs)
19. What are the modes of operations used in 8253?
Each of the three counters of 8253 can be operated in one of the following six modes
of operation.
1. Mode 0 (Interrupt on terminal count) 2. Mode 1 (Programmable monoshot)
3. Mode 2 (Rate generator) 4. Mode 3 (Square wave generator)
5. Mode 4 (Software triggered strobe) 6. Mode 5 (Hardware triggered strobe)
20. What is memory mapping?
The assignment of memory addresses to various registers in a memory chip is called as
memory mapping
21.What is I/O mapping?
The assignment of addresses to various I/O devices in the memory chip is called as I/O
mapping.
Part – B
1.
2.
3.
4.
5.
Describe about the programmable interval timer 8253?
Explain the interfacing of programmable interrupt controller 8259.
Write in detail about the keyboard / display controller 8279?
Discuss in detail parallel communication interface
Discuss about the DMA transfers and operations?
6. Explain about the programmable DMA interface 8237.
7. Explain the block diagram and the functions of each block of the 8251 USART
(Programmable Communication Interface).
8. Discuss how memory chips and I/O devices are interfaced to a microprocessor.
9. Evaluate the procedure for serial communication interface.
10. Illustrate traffic light controller with its interfacing procedure and programming
UNIT – 4 MICROCONTROLLERS
Part – A
1. State the disadvantages of microprocessor based system design?
 Overall system cost is high as compared to microcontroller based system.
 A large size PCB is required for assembling all the components, resulting in an
enhanced cost of the system.
 Overall product design requires more time.
 Physical size of the product is big and it is not handy.
2. What are the advantages of microcontroller based system design?
 As the peripherals are integrated into a single chip, overall system cost is very low.
 Product is of small size and is very handy.
 System design requires little efforts to trouble shoot and maintain.
 System is more reliable.
 Microcontrollers with on chip ROM provide a software security feature.
3. Define a microcontroller?
Integrating a microprocessor along with I / O ports and minimum memory in a single
package, with peripheral, a programmable timer to make a self sufficient device is called the
microcontroller.
4. List the I / O ports available in 8051?
 Port0
 Port1
 Port2
 Port3
5. List the register set of 8051?
Accumulator, B, PSW, P0, P1, P2, P3, IP, IE, TCON and SCON.
6. Specify the special function register formats of 8051?
Programmable status word
Timer mode control register
Timer control register
Serial port control register
Power control register
7. Give the five sources of interrupts of 8051?
o External interrupts INT0, INT1
o Timer interrupts TIMER0, TIMER1
o Serial port interrupt (TI)
8. List the addressing modes supported by 8051?
 Direct addressing
 Indirect addressing
 Register instructions
 Register specific ( Register implicit)
 Immediate mode
 Indexed addressing
9. Define direct addressing of 8051?
The operands are specified using the 8bit address field in the instruction format.
Ex: MOV R0,89H
89H is the address of a special function register TMOD.
10. Discuss about the indirect addressing of 8051?
The 8bit address of an operand is stored in a register and the register instead of the
8bit address is specified in the instruction.
Ex: ADD A,@R0
11. Write about the register instructions of 8051?
In this addressing mode, the operands are stored in the registers R0 – R7 of the
selected register bank.
Ex: ADD A, R7
12. Write about the register specific instructions of 8051?
In this type of instructions, the operand is implicitly specified using one of the
registers. Some of the instructions always operate on a specific register.
Ex: RLA – Rotate left the accumulator
13. What are the types of register set available in 8051?
 Bit addressable registers
 Byte addressable registers
14. List the registers available in 8051?
8051 has twenty one 8bit, bit addressable registers.
Bit addressable registers – A, B, PSW, P0, P1, P2, P3, IP, IE, TCON & SCON
Byte addressable registers – SP, DPH, DPL, TMOD, TH0, TH1, TL0, TL1, SBUF, PCON.
15.State the function of SBUF and SCON register.
SBUF is an SFR register which can be written to, so as to hold the next data byte to be
transmitted. Also it can be read from to get the latest data byte received by the serial port.
SBUF is thus effectively two registers: one for transmitting and one for receiving. The SCON
(Serial Control) register is an SFR register, used for configuring and monitoring the serial
port status.
16.Give the alternate functions for the port pins of port3?
RD WR T1 T0 INT1 INT0 TXD RXD
RD – Read data control output. WR – Write data control output.
T1 – Timer / Counter1 external input or test pin. T0 – Timer / Counter0 external input or test
pin. INT1- Interrupt 1 input pin.
INT 0 – Interrupt 0 input pin.
TXD – Transmit data pin for serial port in UART mode.
port in UART mode.
RXD - Receive data pin for serial
17. Specify the single instruction, which clears the most significant bit of B register of 8051,
without affecting the remaining bits.
Single instruction, which clears the most significant bit of B register of 8051, without
affecting the remaining bits is CLR B.7.
18.State the function of the pins PSEN and EA of 8051.
PSEN : PSEN stands for program store enable. In 8051 based system in which an
external ROM holds the program code, this pin is connected to the OE pin of the ROM.
EA : EA stands for external access. When the EA pin is connected to Vcc, program fetched
to addresses 0000H through 0FFFH are directed to the internal ROM and program fetches to
addresses 1000H through FFFFH are directed to external ROM/EPROM. When the EA pin is
grounded, all addresses fetched by program are directed to the external ROM/EPROM.
Part – B
1. With neat sketch explain the architecture of 8051 microcontroller. (16)
2. Draw the Pin Diagram of 8051 and explain the function of various
3. signals. (16)
4. List the various Instructions available in 8051 microcontroller. (16)
5. Explain the memory structure of 8051 (16)
6. Explain the I/O port structure of 8051. (16)
7. Draw the pin configuration of 8051 and explain each pin.
8. Explain the instruction set of 8051. (16)
9. Compare Microprocessor and Microcontroller.(6)
10. Draw the format of SCON register. Explain different bits in it. (16)
11. Write an assembly language program to find “Fibonacci Series” of “N” given term.
(16)
12. Write about the operational features of 8051?
13. Describe about the memory and I / O addressing by 8051?
UNIT V
Interfacing Micro Controller
Part – A
1.What is the use of stepper motor?
A stepper motor is a device used to obtain an accurate position control of rotating
shafts. A stepper motor employs rotation of its shaft in terms of steps, rather than
continuous rotation as in case of AC or DC motor.
2.What is Key bouncing?
Mechanical switches are used as keys in most of the keyboards. When a key is
pressed the contact bounce back and forth and settle down only after a small time delay
(about 20ms). Even though a key is actuated once, it will appear to have been actuated
several times. This problem is called Key Bouncing
3. Write the function of crossbar switch?
The crossbar switch provides the inter connection paths between the memory module and
the processor. Each node of the crossbar represents a bus switch. All these nodes may be
controlled by one of these processors or by a separate one altogether.
4. What is the function of DPTR register?
The data pointer register (DPTR) is the 16 bit address register that can be used to fetch any 8
bit data from the data memory space. When it is not being used for this purpose, it can be
used as two eight bit registers , DPH and DPL.
5 Mention the four modes of timer operation.
Mode0. mode1, mode2 and mode3.
6. What are the timers available in 8051?
Each 16 bit timer is accessed as two separate 8 bit registers : Low byte register(TL) and
High byte
register (TH).
7. List any applications of microcontroller
8. What is meant by mode0 in timer.
In this mode serial enters &exits through RXD, TXD outputs the shift clock.8 bits
are transmitted/received:8 data bits(LSB first).The baud rate is fixed at 1/12 the
oscillator frequency.
9. What is the job of the TMOD register?
TMOD (timer mode) register is used to set the various timer operation modes . TMOD
is dedicated to the two timers (Timer0 and Timer1) and can be considered to be two
duplicate 4 bit registers, each of which controls the action of one of the timers
10. Define mode3 in timer.
In this mode,11 bits are transmitted(through TXD)or received(through RXD):a start
bit(0), 8 data bits(LSB first),a programmable 9th data bit ,& a stop bit(1). The baud rate in
Mode3 is variable. In all the four modes, transmission is initiated by any instruction that
uses SBUF as a destination register. Reception is initiated in Mode0 by
the condition RI=0& REN=1.Reception is initiated in other modes by the incoming start bit
if REN=1.
11. Define mode2 in timer.
In this mode 11 bits are transmitted(through TXD)or received (through RXD):a start
bit(0), 8 data bits(LSB first),a programmable 9th data bit ,& a stop bit(1).ON transmit the
9th data bit (TB* in SCON)can be assigned the value of 0 or 1.Or for eg:, the parity bit(P,
in the PSW)could be moved into TB8.On receive the 9th d ata bit go in to the RB8 in
Special Function Register SCON, while the stop bit is ignored. The baud rate is
programmable to either 1/32 or 1/64 the oscillator frequency.
12. What are the alternate functions of Port 3 in 8051 microcontroller?
P3.0-RXD
P3.1-TXD
P3.2-INT0
P3.3-INT1
P3.4-T0
P3.5-T1
P3.6-WR
P3.7-RD
13. What is the function of SM2 bit present in SCON register in 8051?
14. If a 12 Mhz crystal is connected with 8051, how much is the time taken for the count
in timer 0 to get incremented by one?
Baud rate = oscillator frequency/12 = (12 Χ 106) / 12
=1 Χ 106 Hz
T = 1/f
= 1 /(1 Χ 106 )
= 1 μ sec
15. What is the advantage of microcontroller over microprocessor?
Part – B
1.
2.
3.
4.
5.
Explain the 8051 mode 0 and mode 1 timer operating modes.
Explain the 8051 mode 2 timer operating mode.
Write about the memory interfacing.
Explain in detail about the timers/counters in 8051.
Explain in the detail the process involved in the design of traffic light controller with
example.
6. Discuss about Interrupt Programming.
7. Explain the process of the Direct Memory Access (DMA) and the functions of
various elements of the 8237.
8. Explain with a neat sketch how microcontrollers and microprocessors can
be used for the stepper motor control application and also write an assembly language
program for stepper motor control.
9. Explain the procedure of interfacing D/A and A/D converter circuit.
10. Deduce the principle of LED and LCD interfacing techniques
11. Explain the functions of each bit of SCON and PCON registers
12. Explain the baud rates of serial communication in 8051
13. Explain IP and IE registers
.
Download