You are on page 1of 9

MICROPROCESSOR AND MICROCONTROLLER

SEMESTER-IV
YEAR: II

UNIT V
MICROCONTROLLER
PART A

1. What is meant by microcontroller?

A microcontroller is a device which contains the microprocessor with integrated


peripherals like memory, serial ports, parallel ports, timer/counter, interrupt controller .

2. List the advantages of microcontroller. (AU-NOV’07)

The advantages of microcontroller are:


1. As the peripherals are integrated into a single chip ,
the overall system cost is very low.
2. Size of the product is very small compared to the microprocessor based system.
3. System design requires very little efforts and is easy to maintain.
4. As the peripherals are integrated with a microprocessor ,
the system is more reliable.
5. All these features are available in a 40 pin package as in an 8-bit processor.
6. Though a microcontroller may have internal memory & I/O ports may
be interfaced externally, if required.

3. What is PSW?

Program Status Word (PSW) is the set of flags contains the status information and
is considered as one of the special function registers.

4. What is stack pointer (SP)?

Stack Pointer (SP) is a 8- bit wide register and is incremented before the data is
stored into the stack using push or call instructions. It contains 8-bit stack top address.
The stack may be defined anywhere in the on-chip 128 byte RAM.

5. What is the function of DPTR register? (AU-JUN’07) (AU- NOV’08)

The function of data pointer is a 16-bit register which contains a higher byte
(DPH) and the lower byte (DPL) of a 16-bit external data RAM address. It has been
allotted two addresses in the special function register bank for its two bytes DPH
and DPL.

6. What is a serial data buffer?


Serial data buffer is a special function register and it initiates serial transmission
when byte is written to it and if read, it reads received serial data. It internally contains
two independent register. One is a transmit buffer which is necessarily a parallel-in
serial-out register. The other is called receive buffer which is serial-in parallel-out
register.

7. What is the use of timing and control unit?

Timing and control unit is used to drive all the necessary timing and control
signals required for the internal operation of the circuit. It also derives control signals
that are required for controlling the external system bus.

8. What is the purpose of using instruction register?

Instruction register is used for the purpose of decoding the opcode of an


instruction to be executed and gives information to the timing and control unit
generating necessary signals for the execution of the instruction.

9. Give the purpose of ALE/PROG signal.

The purpose of address latch enable (ALE/PROG) output pulse indicates that the
valid address bits are available on their respective pins.

10. What is PSEN signal?

Program store enable is an active-low output signal that acts as a strobe to read
the external program memory. This goes low during external program memory
accesses.

11. What are the functions of port 0 pins in 8051?

The functions of port o pins in 8051 are:


(i) Port 0 pin act as an 8-bit bidirectional bit addressable I/O port.
(ii) Port 0 acts as multiplexed address/data lines during external memory access, i.e.
when EA is low and ALE emits a valid signal.
(iii) In case of controllers with on-chip EPROM, port 0 receives code bytes during
programming of the internal EPROM.

12. What is TCON?


TCON is a timer/counter control register. Some of the bits of this register are
used to turn the timers on or off. This register also contains interrupt control flags for
external interrupts INT0 and INT1.

13. What are the power saving modes of operation?

The two power saving modes of operation are,


1. Idle mode
Power down mode

14. What is idle mode and how this mode is terminated?

In the idle mode, the oscillator continues to run and the interrupt, serial port and
timer blocks are active but the clock to the processor is disabled. The processor status
is preserved. This mode can be terminated with a hardware interrupt or hardware reset
signal. After, this processor resumes program execution from where it left off.

15. What is power down mode and how this mode is terminated?

In power down mode, the on-chip oscillator is stopped. All the functions of the
controller are held maintaining the contents of RAM. The only way to terminate this
mode is hardware reset. The reset redefines all the SFRs but the RAM contents are left
unchanged.

16. What is the clock frequency of timer?

The clock frequency of timer is 1/32 th of the controller operating frequency.


The controller operating frequency is 12MHz to 16MHz.

17.Give the priority level of the interrupt sources.

The priority level of the interrupt sources are,

Interrupt Source Priority within a level


IE0 (External INT0) Highest
TF0 (Timer 0) “
IE1 (External INT1) “
TF1 (Timer1) “
RI=TI (Serial Port) Lowest

18. List the addressing modes of 80851 microcontroller? (AU-NOV’07)


The six addressing modes available in 8051 are,
1. Direct addressing
2. Indirect addressing
3. Register addressing
4. Register Specific (Register Implicit)
5. Immediate addressing
6. Indexed addressing

19. What is immediate addressing?

In this addressing mode, an immediate data, i.e. a constant is specified in


the instruction after the opcode byte.
Example: ADD A, #100

20. What is indirect addressing mode?

In this mode of addressing, the 8-bit address of an operand is stored in a register


and the register, instead of 8-bit address, is specified in the instruction. The register R0
and R1 of the selected bank of registers or stack pointer can be used as address registers
for storing 8-bit addresses. The address register of 16-bit addresses can only be data
pointer.
Example: ADD A,@R0

21. Write program to load accumulator, DPH and DPL using 8051.

MOV A,#30
MOV DPH,A
MOV DPL,A

22. Write a program to subtract two 8-bit numbers and exchange the digits
using 8051.

MOV A,#9F
MOV R0,#40
SUBB A,R0
SWAP A

23. What is watch dog timer (WDT)?


The Watch Dog Timer is a dedicated timer to take care of system malfunction.
It can be used to reset the controller during software malfunction, which is referred to
as “hanging”. A microcontroller will have facility for enabling or disabling the WDT.

24. Mention few differences between microprocessor and microcontroller.


(AU-APR’08)(AU-NOV’06)

The differences between microprocessor and microcontroller are,

S.NO MICROPROCESSOR MICROCONTROLLER


1. It is concerned with rapid It is concerned with rapid
movement of code and data movement of code and data
between external memory and within the controller.
processor.
2. The microprocessor will have few The microcontroller will have
bit manipulating instructions. large number of bit manipulating
instructions.

3. The microprocessors are The microcontrollers are used for


generally used for designing designing dedicated applications
general purpose systems. in specific systems.

4. It has single memory map for data It has separate


and code.
5. Less number of pins are More number of pins are
multifunctioned. multifunctioned.

25. Draw the format of PSW in 8051. (AU-NOV’07)

D7 D6 D5 D4 D3 D2 D1 D0

C
Y CY AC F0 RS1 RS0 OV - P –

Carry Flag
AC – Auxiliary Carry Flag
F0 - Flag 0 is available to the user for general purpose.
RS1 – Register bank selector bit 1.
RS0 – Register bank selector bit 0.
OV – Overflow Flag
P - Parity flag
26. How does the status of EA pin affect the access to internal and external
program memory? (AU-APR’08)

27. State the difference between RET and RET1 instruction in 8051. (AU-APR’08)
28. Differentiate RRA and RCA instruction in 8051 microcontroller. (AU-NOV’06)

29. List the interrupts of 8051 micro controller. (AU-JUN’07)

The interrupts of 8051 micro controller are:


1. External interrupt 0 : IE0 : 0003H
2. Timer interrupt 0 : TF0 : 000BH
3. External interrupt 1 : IE1 : 0013H
4. Timer Interrupt 1 : TF1 : 001BH
Serial Interrupt
5. Receive interrupt : RI : 0023H
6. Transmit interrupt: TI : 0023H

30. What are register banks in 8051 microcontroller? (AU-JUN’07)

The register banks in 8051 microcontroller are RS0 and RS1

RS1 RS0 Bank selection

0 0 Bank 0

0 1 Bank 1

1 0 Bank 2

1 1 Bank 3

31. What are the addressing modes supported by 8051? (AU- NOV’09)

The addressing modes supported by 8051 are:


1. Register addressing
2. Direct byte addressing
3. Register indirect addressing
4. Immediate addressing
5. Register specific
6. Index

32. Write an 8051program to divide two 8-bit number. (AU- NOV’09)

Program to divide two 8-bit number:


MOV A, # 90
MOV B, # 20
DIV AB

33. What do you mean by Indirect Addressing Mode? (AU- NOV’08)

In indirect addressing mode R0 and R1 of each register bank


can be used as an index or pointer register.

34. What is the function of DPTR register? (AU-JUN’07) (AU- NOV’08)


35. How many interrupt sources are available in 8051? What are they?
(AU-NOV’07)
36. Write short description on register bank registers and their uses.
(AU-NOV’07)

1. There are four register banks numbered 0 to 3 and each consists


of eight registers named R0 to R7.
2. Each register can be addressed by name or by its RAM address.
3. Only one register bank is in use at a time.
4. Register banks when not selected can be used as general purpose RAM.

37. How does 8051 differentiate between the external and internal
program memory? (AU-APR’08)

38. List the features of 8051? (AU-JUN’06)

The features of 8051 microcontroller are:


1. The 8051 microcontroller is an 8-bit microcontroller initially
developed by INTEL in the year 1980.
2. Single supply +5 volt operation using HMOS technology.
3. 4096 bytes program memory on chip(not on 8031)
4. 128 data memory on chip.
5. Four register banks.
6. Two multiple mode,16-bit timer/counter.
7. Extensive boolean processing capabilities.
8. 64 KB external RAM size
9. 32 bidirectional individually addressable I/O lines.
10. 8 bit CPU optimized for control applications.

39. State the function of DSR and DTR pins in 8251. (AU-JUN’06)
40. What is jump range in 8051? (AU-JUN’07)
42. Draw the format of timer mode control register. (AU-NOV’07)

PART B

1. Draw and discuss the internal architecture of 8051. (AU-NOV’06)


(AU-JUN’07) (AU-APR’08) (AU-NOV’08)
2. Explain the signal pin description of 8051. (AU-NOV’06) (AU-MAY’08)
3. Draw and discuss the formats and bit definitions of the SFR registers.
(AU-JUN’07) (8)
4. Explain the different type of addressing mode of 8051 with example.
(AU-NOV’07) (8)
5. Write short notes on Memory and I/O addressing. (AU-JUN’07)
6. Write short notes on interrupt of 8051. (AU- NOV’08) (8)
7. Write a program to find the number of positive and negative numbers
in a given array. (AU-APR’08) (6)
8. Discuss any two applications of microcontroller. (AU-APR’08) (16)
9. Discuss in detail about the register set of 8051. (AU-NOV’07) (10)
10. Describe the use of the following signals: (AU-NOV’07) (6)
(1) PSEN
(2) EA
(3) PORT1
11. Design a micro controller 8051 based length measurement system.
(AU-NOV’07) (16)
12. Discuss in detail about 8051 based stepper motor control. (AU-JUN’07)
13. Show how the 8051 can be used to control the operation of an elevator system.
Assume the elevator is to operate between three floors. Show the hardware interface
and the required 8051 program. (AU- NOV’09) (16)
15. Explain the instruction set of 8051. (AU- NOV’08) (8)
16. How many addressing modes are available in 8051? Explain them with
examples. (AU-NOV’07) (8)
17. Tabulate the program control instructions of 8051 and explain any five of them.
(AU-NOV’07) (8)
18. With a neat sketch, explain the internal working of 8051 with its signal
descriptions. (AU-NOV’07) (16)
19. Write short notes about the following in relevance to 8051. (AU-NOV’07) (16)
(i) Memory addressing
(ii) External I/O addressing
(iii) Interrupts.

20. Discuss the register set of 8051 and also discuss how memory and I/O
addressing is done in 8051. (AU-APR’08) (16)
21. How do you interface a stepper motor to a controller? Give the necessary
hardware and software functional blocks. (AU-NOV’07) (8)
22. Code a program to rotate stepper motor continuously using 8051.
(AU-NOV’07) (8)
23. Explain the operational features of 8051. (AU-JUN’06) (16)
24. Describe the memory and I/O addressing of 8051. (AU-JUN’06) (16)
25. Explain the interrupt structure of 8051. (AU-JUN’07) (8)
26. Write short notes on SFR and Timers. (AU-JUN’07) (8)

You might also like