MICROPROCESSOR AND MICROCONTROLLER



PART-A
UNIT -I


1. Define microprocessor?
         A  microprocessor  is  a  multipurpose,  programmable,  clock-driven,  register –based electronic  device  that  reads binary  instructions  from  a  storage  device  called  memory . Accepts  binary  data  as  input  and  processes  data  according  to  instructions,  and  provides result as output. 

2. Explain the function of ALE  in the 8085 architecture? (or) How address and data lines are demultiplexed?
     The ALE  signal  goes  high  at  the  beginning  of  each  machine  cycle indicating  the  availability  of    the  address  on  the  address  bus,  and  the  signal  is  used  to  latch  the  low-order  address  bus(A0-A7)  by demultiplexing the address/data bus(AD0-AD7),which are multiplexed.

3.What is the function of HOLD and HLDA?
HOLD- It indicates when another device is requesting the use of address and data bus(like DMA controller).
HLDA(Hold Acknowledge)- It indicates that HOLD request has been received. After the removal of HOLD request the HLDA goes low.

4. What is the purpose of READY and TRAP pins in 8085 Microprocessor?
READY- It is used to interface slow speed peripherals with microprocessor.
TRAP- Vectored and non-maskable hardware interrupt.

5.List the operations performed by IO/M in 8085.
   Memory Read, Memory Write ,I/O Read, I/O Write are the operations performed by IO/M in 8085.

6.Differentiate between Memory mapped  I/O and I/O mapped I/O.

S.NO
Memory mapped I/O
       I/O mapped I/O
1.
It is treated as memory location
It is not treated as memory location
2.
No special instructions are needed to access the I/O devices
It requires special instructions like IN, OUT to access I/O devices
3.
Microprocessor can access 1 MByte  memory locations or I/O ports
Microprocessor can access 64 KByte  memory locations or I/O ports
4.
It requires 20 address lines
It requires 16 address lines
5.
MEMR, MEMW signals can be used to access I/O devices
IOR , IOW signals are used
6.
It is suitable for small system
It is suitable for large system


7.If a 6Mhz crystal is connected with 8085, how much is the time taken by 8085 to complete opcode fetch cycle and memory read cycle?
Clock frequency = crystal frequency / 2
 = 6 Mhz/2
 =3Mhz
One T-state = 1/ clock freq
        =1/(3Χ106)
        = 0.333μsec 
Time for opcode fetch cycle = 4 Χμs 0.33= 1.332 μsec
Time for memory read cycle= 43Χ 0.33=0.999 μsec



8.Write the operation carried out when 8085 executes DAD rp instruction and which flag is affected?
DAD-  means  DOUBLE ADDITION. It is used to perform addition of two 16 bit data.
  [HL]= [HL]+ [rp]
The contents of rp pair is added with the HL content and the result is stored in HL pair register.
On execution of this instruction only carry flag (CY) is affected


9.What are the flags available in 8085?
S
Z

AC

P

CY

  
S- sign flag
Z-Zero flag
AC- Auxiliary carry flag
P-Parity flag
CY- Carry flag

10.Specify the five control signals commonly used by the 8085 MPU.

1. RD-Read signal
2.WR- Write signal
3.READY- Ready signal
4.ALE- Address Latch Enable
5.CLK OUT –Clock Out Signal

11.What is the difference between Opcode and Operand?
Opcode is the part of an instruction that identifies a specific operation.
Operand is a part of an instruction that represents a value on which the instruction acts.
    Example:                        MVI A ,18H
                  MVI A  is Opcode  and  18 H   is Operand.

12.List some of the logical instructions in 8085.
ANA B, ORA B, XRA B, CMA, STC.

13.What is Stack and Subroutine?
Stack -It is a reserved area of the memory in the RAM , where temporary information may be stored.
Subroutine-It is a group of instructions written from the main program to perform a function that occurs repeatedly in the main program.

14.Why address bus is unidirectional?
It is a 16 bit communication line(A0-A15).It is used to indicate the location of data . Since the data flows from MPU (microprocessor unit) to Peripheral devices,  the address bus is unidirectional.

15.Why data bus is bi-directional?
     The microprocessor has to fetch (read) the date from memory or input device for processing and after processing , it has to store (Write ) the data to memory or output device. Hence the data bus is bi-directional. i.e. data flow from the MPU (microprocessor unit )to peripherals or peripherals to MPU.

16.What is fetch and execute cycle?
  The fetch cycle is executed to fetch the opcode from memory.
  The Execute cycle is executed to decode the instruction and to perform the work instructed by the instruction.

17.What are the difference between PUSH and POP instruction?
S.NO
PUSH
POP
1.
Push register pack onto stack
Pop off stack to register pair
2.
The contents of the register pair designated in the operand are copied into the stack. The SP is decremented and the contents of the high order register are copied into that location.
The contents of memory location pointed out by the SP register are copied into the low order register of the operand.


18.What is an interrupt?
Interrupt is a signal send by an external device to the processor so as to request the processor to perform a particular task or work.


19.What are the different machine cycles available in 8085 microprocessor?
Opcode fetch, Memory Read , Memory write , I/O Read, I/O write , Interrupt acknowledge cycle , Bus idle cycle.

20.Define (a)Instruction Cycle (b) M/C Cycle (c) T-state
Instruction cycle : Time required to complete the execution of an instruction. One instruction cycle consists of 3 to 6 machine cycles.
Machine cycle: Time required to complete one operation of accessing memory or I/O device.One machine cycle consists of 3 to 6  T-states.
T-State: The portion of the operation performed in one clock period.

21.What is the function of SID and SOD pins in 8085?
SID(Serial Input Data) line can be input to the most significant bit of the accumulator.
SOD(Serial Output Data) line can be used to output the most significant bit of the accumulator.

22.Name the vectored and Non-vectored interrupts of 8085 system.
Non -vectored interrupts  : INTR
Vectored interrupts             : TRAP , RST 7.5 , RST 6.5 , RST 5.5 

23. How many machine cycles are needed to execute LHLD and XCHG instructions?
LHLD : 5 machine cycles (16 T states)
XCHG : 1 machine cycle (4 T states)

24.What are the types of instruction for 8085 microprocessor?
 Data transfer instruction, Arithmetic instruction , Logical and rotate  instruction, branch instruction , stack instruction , I/O and Machine control instruction.

25.What are the addressing modes for 8085 microprocessor?
Immediate addressing mode ,Direct addressing mode, register addressing mode, register indirect addressing mode, and Implied addressing mode.

26.What is the function performed by  SIM and RIM instructions?
SIM (Set Interrupt Mask)- It is a multipurpose instruction and used to implement the 8085  interrupts(RST 7.5,
 6.5 ,5.5) and serial data output.
RIM(Read Interrupt Mask)-It is used to read the status of interrupts (RST 7.5 , 6.5 , 5.5) and to read serial data
 input bit.

27.What is the significance of XCHG and SPHL instructions?
XCHG : H ßàD      Exchanges the contents of H with D and L with E registers.
              L ßàE
SPHL : SP ß HL          It copies the contents of HL pair into the stack.

28.Which are the instructions that affect the sequence flow of an 8085 assembly program?
Branch instructions are used to change the sequence of program execution either  conditionally or unconditionally.
Example : JMP address , J(condition) address, CALL address, CALL (condition) address, RET, RET(condition), RST n.

29.What is a  two byte instruction?
In a two byte instruction , first  byte specifies the operation code and the second byte specifies  the operand.
Example :   MVI A, 18 H
MVI A,  is OPCODE and 18 H is OPERAND.

30.Compute the execution time of instruction LDA 2050H if the T state duration  is 2 μ s?
For LDA, Number of T-state =13
Execution Time is = 13 Χ2 μ s = 26 μ s .

31.What are the classifications of instruction set according to word size?
    One byte instruction , Two byte instruction ,  and Three byte instruction.



32.Let accumulator content is  9AH and CY=1. What will be the content of CY after RRC instruction is executed?
0
0
0
0
1
0
0
1

1
 Before execution


1
0
0
0
0
1
0
0
1
After execution

33.What are the Processor control instructions?
Machine control instructions are used to control the operation of processor.
EI, DI, NOP, HLT, SIM,  RIM are the Processor control  instructions.

34.What is EI and DI instruction?
EI( Enable Interrupt)-  When this instruction is executed , the interrupts are Enabled.
DI(Disable Interrupt)-  When this instruction is executed , the interrupts are Disabled.

35.What is Immediate and Implied Addressing mode?
In  Immediate addressing mode , the data(operand) is specified  within the instruction itself.
Example: MVI A, 18 H
In Implied addressing mode, the instruction itself specifies the meaning with  no operands .
Example : STC (Set the Carry flag)

36. What are the two compare instructions available in 8085?
1.CMP register ( compare reg with accumulator)
Example:   CMP B
2.CMP  data (compare accumulator with immediate data)
Example: CMP 24H

37. What is an ALU?
 The operations performed by ALU of 8085 are Addition, Subtraction, Logical AND, OR, Exclusive OR, Compare Complement,  Increment, Decrement and Left I Right shift

38. If  the  8085  adds  87H  and  79H,  specify  the  contents  of  the  accumulator  and  the
status of the S, Z, and CY flag?
The sum  of 87H and 79H =100H. Therefore, the accumulator will have 00H,  and  the flags will be S =0, Z = 1, CY = 1.

39. Write down the control and status signals?
Two Control signals and three status signals
Control signals : RD and WR
Status signals : IO/M, S0, S1

40. Give the difference between JZ and JNZ?
JZ change the program sequence to the location specified by the 16-bit address if the zero  flag is set .
JNZ change the program sequence to the location  specified by the 16-bit address if the zero  flag is reset.

41. What is CALL instruction?
CALL instruction change the sequence to the location of a subroutine

42. What is a three-byte instruction?
In a three-byte instruction, the first byte sp ecifies the Opcode, and the following two bytes specifies the 16- bit address.

43. What is an IN instruction and OUT instruction?
IN is a 2-byte instruction. It accepts data from the input port specified in the second byte.
OUT is a 2-byte instruction. It sends the content of the accumulator to the output port specified in the second byte.

UNIT-II

1.What is pipelining?
Fetching the next instruction while the current instruction executes is called pipelining.

2.What are the signals involved in memory bank selection in 8086 microprocessor?
Entire memory is divided into two memory banks : bank0 and bank1. Bank0 is selected only when A0 is zero and Bank1 is selected only when BHE is zero .A0 is zero for all even addresses. So bank0 is usually referred as  even addressed memory  bank.BHE is used  to access higher order memory bank , referred to as odd addressed memory bank.

3.How clock signal is generated in 8086? What is the maximum internal clock frequency of 8086?
The crystal oscillator in 8284 generates a square wave signal at the same frequency as the crystal . The maximum internal  clock frequency of 8086 is 5Mhz

4.What is the use of MN/MX signals in 8086?
It is used to operate the microprocessor in two operating modes i.e. maximum and minimum mode. The minimum mode is  used for small systems with a single processor and maximum mode is for medium size to large systems, which include two or more processors.

5.How many data lines and address lines are available in 8086?
Address lines= 20 bit address bus
Data lines= 16 bit data bus

6.What information is conveyed when Qs1 and Qs0 are 01?
Qs1 and Qs0 are output signals that reflect the status of the instruction queue. When Qs1 and Qs0 are 01 , then queue has first byte of an opcode.

7.What is the addressing mode of MOV AX, 55H (BX) (SI) ?
MOV AX, 55H (BX) (SI) – Base Indexed memory addressing mode.

8.What happened in 8086 when DEN =0 and DTR=1 ?
This signal informs the transceivers that the CPU is ready to send data.

9.What is the use of Instruction Queue in 8086 microprocessor?
The queue operates on the principle of first in first out(FIFO). So that the execution unit gets the instruction for execution in the order they fetched .Feature of fetching the next instruction while the current instruction is executing is called pipelining which will reduce the execution time.

10.What are the signals used in 8086 maximum mode operation?
Qs1 ,Qs0, s0 ,s1, s2, LOCK, RQ/GT1,  RQ/GT0 are the signals used in 8086 maximum mode operation.

11.Write the size of physical memory and virtual memory of 8086 microprocessor.
Physical addresses are formed when the left shifted segment base address is added to the offset address. The combination of segment register base addresses and offset address is the logical address in memory.
Size of physical memory=220=1MB
Size of virtual memory=216=64 KB

12.List the advantages of using segment registers in 8086.
·         It allows the memory addressing capacity to be  1MB even though the address associated with individual instruction is only 16-bit.
·         It facilitates use of separate memory areas  for program , data and stack.
·         It allows the program to be relocated which is very useful in multiprogramming.

13.What are the segment registers of 8086?
CS- Code segment,  DS-Data segment,  ES-Extra segment,  SS- Stack segment.
14.Explain the BHE and LOCK signals of 8086
BHE (Bus High Enable): Low on this pin during first part of the machine cycle indicates that at least one byte of the current transfer is to be made on higher byte AD15-AD8.
LOCK: This signal indicates that an instruction with a LOCK prefix is being executed and the bus is not to be used by another processor.

15.Name any four flags of 8086.
Auxiliary carry flag(AF), Carry flag(CF), Direction flag(DF), Interrupt flag(IF), Overflow flag(OF), Parity flag)PF),
Sign flag(SF), Trap flag(TF), Zero flag(ZF).

16.How the physical address for fetching the next instruction to be executed, is obtained in 8086?
The physical address is obtained by appending four zeros to the content present in CS register and then adding the content of IP register with the  above  value .
For example, assuming the content of
CS = 1200 H
IP = 0345 H
CS= 0001 0010 0000 0000 0000
                 0000 0011 0100 0101
       ------------------------------------
       0001 0010 0011 0100 0101 –          Physical address=12345 H

17.If  the execution unit generates effective address of 43A2 H and the DS register contains 4000 H. What will be the physical address generated by the BIU? What is the Maximum Size of the data segment?
 Effective address  =   43A2  H
Physical address    =  40000 H
                            -------------
                                443A2 H

Maximum size of DS = 216 = 64 KB































UNIT –III

1.Mention the function of SI and DI registers.
SI: Source Index
It is used to hold the index value of source operand (data) for string instructions.
DI: Destination Index
It is used to hold the index value of destination operand (data) for string instructions .It is used for single stepping through a program.

2.Name any  8 processor control instructions.
CLC, WAIT, CMC, HLT, STC, LOCK, STD, NOP.

20.What is meant by software interrupt in 8086?
The software interrupts are program instructions. These instructions are inserted at desired locations in a program. While running a program , if a software interrupt is encountered then the processor executes an interrupt service routine (ISR).

3.What is the function of TF,DF ,IF in 8086?
TF: It is used for single stepping through a  program. In the mode, the 8086 generates an internal interrupt after execution of each instruction.
DF: It is used to set direction in string operation.
IF: It is used to receive external  maskable interrupts through INTR pin. Clearing IF, disable these interrupts. 

22.What is operation carried out when 8086 executes the instruction MOVSB ?
MOVSB – Move String Byte
[[DI]] ß [[SI]]
Move 8 bit data from memory location addressed by SI segment in DS location to addressed by DI in segment ES.

If DF (Direction Flag)  =  0, SI  is incremented  by 1.
                                       =  1, SI  is decremented by 1.
4.What is the operation carried out When 8086 executes the instruction MOVSW ?
MOVSW – Move String  Word.
This instruction transfers a word from the source string (addressed by SI) to the destination string (addressed by DI) and update SI and DI to point to the next string element.


5.What are the difference between 8085 and 8086?
s.no
8085
8086
1
8 bit microprocessor
16 bit microprocessor
2.
216 memory locations
210 memory locations
3.
Sequential facility
Pipelined architecture available
4.
Low  speed
High speed

6.State the functional units available in 8086?
BIU- Bus Interface Unit
EU- Execution Unit

7.State the modes in which 8086 operates?
Minimum mode
Maximum mode.






UNIT-IV
  1. What is the purpose for the 8255 PPI?

The 8255A is a widely used, programmable, parallel I/O device.It can beprogrammed to transfer data under various conditions, from simple I/O to interrupt I/O.

2. List the operating modes of 8255A PPI?
Two 8-bit ports (A and B)
Two 4-bit ports (Cuand CL)
Data bus buffer
Control logic

3. Specify the bit of a control word for the 8255, which differentiates between theI/O mode and the BSR mode?
BSR mode D7= 0, and I/O mode D5 = 1

4. Write the input/output feature in Mode 0 for the 8255A PPI?
Outputs are latched
Inputs are not latched
Ports do not have handshake or interrupt capability

5Write down the output control signals used in 8255A PPI?
♦OBFoutput Buffer Full
♦ACKAcknowledge
INTR  Interrupt request
INTE Interrupt Enable

6. What is the use of mode 2 in 8255A PPI?
This mode is used primarily in applications such as data transfer betweentwo computers or floppy disk controller interface

7.List the major components of 8279 keyboard /display interface?
♦ Keyboard section
Scan section
Display section
MPU interface9.

8.What is the purpose for scan section in Keyboard interface?
The scan section has a scan counter and four scan lines. These scan linescan be decoded using a 4-to-16 decoder to generate 16 lines for scanning.

9.What is USART?
USART is an integrated circuit.It is a programmable device ;its functionand specifications for serial I/O can be determined by writing instructions in itsinternal registers .


10.Define Baud?
The rate at which the bits are transmitted is called Baud



11. Define parallel-to-serial conversion?
In serial transmission, an 8-bit parallel word should be converted in to astream of eight serial bits. This is known as parallel-to-serial conversion

12.Define serial-to-parallel conversion?
In serial reception, the MPU receives a stream of eight bits and it isconverted in to 8-bit parallel word. This is known as serial -to- parallel conversion.


13. Define simplex transmission?
In simplex transmission, data are transmitted in only one direction.Example: transmission from a microcomputer to a printer.

14. What is transmitter section in USART?
The transmitter section accepts parallel data from the MPU and convertsthem in to serial data. It has two registers. A buffer register and an output register

15. Write an instruction for serial output data?
MVI A, 80H ;Set D7 in the accumulator = 1RAR ;Set D6 = 1SIM

16. List the major components of 8251A programmable communication inteface?

Read/Write control logic
Three buffer registers
Data register
Control registertransmission receiver
Data bus buffer
Modem control

 17.Write the steps necessary to initialize a counter in write operations?
Write a control word into the control register
Load the low-order address byte
Load the high order byte

18.Give the various modes of 8254 timer?
Mode 0: interrupt or terminal count
Mode 1: Rate generator
Mode 3:square wave generator
Mode 4: software triggered strobe
Mode 5:hardware triggered strobe

19. What is read back command in 8254 timer?
The Read- Back Command in 8254 allows the user to read the count andthe status of the counter.















UNIT-V
1.What is Microcontroller?
Microcontroller incorporates all the features that are found in microprocessor with the added features of in-built ROM, RAM, Parallel I/O, Serial I/O, counters and clock circuit to make a micro computer system on its own.

2.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

3.What is the function of SM2 bit present in SCON register in 8051?
·         SM2  enables the multiprocessor communication  feature in modes 2 and 3. If SM2 = 1, RI will not be activated if the received 9th data bit (RB8) is 0.
·         In  mode  1, if SM2 = 1, RI will not be activated if a valid stop bit was not received.
·         In mode 0, SM2 should be 0.

4.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 Χ  10Hz
                         T  = 1/f
                             = 1 /(1 Χ  106  )
                             = 1 μ sec

5.What is the advantage of microcontroller over microprocessor?
·         The overall system cost is low , as the peripherals are integrated in a single chip.
·         The size is very small
·         The system is easy to troubleshoot and maintain.
·         If required additional RAM , ROM and I/O ports may be interfaced.
·         The system is more reliable.

6.What is  the function of IP register in 8051?
The IP register is used to set high priority  to one or more interrupts in 8051.
-
-
-
PS
PT1
PX1
PT0
PX0
Setting a bit to 1 makes  the corresponding interrupt to have high priority and setting a bit to 0 makes the corresponding interrupt to have  low priority.

7.What is the importance of special function registers(SPF) in 8051?
The 8051 operations that do not use the internal  128 byte RAM address from 00 H to 7F H are done by a group of special  internal registers  called SPFs(Special  Function Registers) Which  have address between 80 H and FF H.

8.Define baud rate.
Baud rate is used to indicate the rate at which data is being transferred .
Baud rate = 1/Time for a bit cell.
.
9.Name the interrupts of 8051 microcontroller.
External interrupt-0 ,  External interrupt-1,Timer-0  interrupt, Timer-1  interrupt, and serial port interrupt.

10.Name any 4 additional hardware features available in 8051 when compared to  microprocessor.
ROM ,RAM ,Parallel  I/O , Serial I/O , Counters, and a clock circuit are available.

11.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.

12.What are  the features of 8051 microcontroller?
·         8 bit CPU with registers A and B
·         16 bit PC and DPTR
·         8 bit PSW
·         Internal ROM of 4KB
·         Internal RAM of 128 bytes
·         Two 16 bit timers and counters: T0 and  T1
·         Two external and three internal interrupts
·         32 input / output pins  arranged as four 8 bit ports :Port0, port1, port2 and port3.
·         Control registers are: TMOD, TCON, SCON ,PCON ,IP and  IE.

13.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

14.List any applications of microcontroller
·         Industrial control (process control)
·         Motor  speed control(stepper motor control)
·         Peripheral devices(printer)
·         Stand alone devices(colour Xerox machine)
·         Automobile applications(power steering)
·         Home applications (washing machine)

15.What are the bits available in TMOD register?
GATE
C/T
M1
M0
GATE
C/T
M1
M0
TIMER 1
TIMER 0
       
                            M1               M0                   Mode
                           0                   0                       0  (13 bit Timer Mode)
                                0              1                       1  (16 bit Timer Mode)
                                1              0                       2  (8 bit auto reload)
                                1              1                       3  (split Timer Mode)
   GATE: Gating control when set
    C/T   : Timer or counter selection ; 1= counter , 0= Timer.

16.What are the timers  available  in 8051?
·         Timer 0
·         Timer 1
 Each 16 bit timer is accessed as two separate 8 bit registers : Low byte register(TL) and High byte register (TH).

17.Explain the instruction : SWAP
   SWAP instruction works only on the accumulator (SWAP A) . It swaps the lower nibble and higher nibble .The lower 4 bits are put into the higher 4 bits  and the higher 4 bits are put into the lower 4 bits.
 E.g.- SWAP A                                                           
ACC
1111 0000
0000 1111
                                         Before execution :                  
                                          After  execution  :    

                       
18.What are the external hardware interrupts in 8051?
 INT0 - External  hardware  interrupt 0
 INT1 - External  hardware  interrupt 1





19.What is the interrupt priority in 8051 ? and write its vector address
   PRIORITY
SEQUENCE INTERRUPTS
ADDRESS
Highest priority   -  External interrupt   -0   (INT 0)    -            0003 H
                             Timer  interrupt      - 0   (TF 0)      -            000B H
                                  External  interrupt  -1    (INT 1)    -        0013 H
                             Timer  interrupt      - 1   (TF 1)      -            001B H
Lowest priority   -  serial  communication  (RI,TI)      -            0023 H

                          



20.What is key debouncing?
When a key  press is found, the microcontroller waits for at least 10ms before it accepts the key as input. It is called as key debouncing.


21.Explain the PUSH and POP instruction in 8051?
PUSH   direct:       (sp)   ß (SP) + 1
                          ((SP))ß (direct)
The SP is incremented by 1. The content of the indicated register is then copied to the internal RAM location addressed by  SP.
POP direct  :   (direct) ß ((SP))
                             (SP)  ß (SP) – 1
The content of the internal RAM location addressed by SP is read , and SP is decremented by one . The value is then transferred to the directly addressed byte indicated.


22.How does 8051 differentiate between the external and internal program memory?
S.NO
EXTERNAL PROGRAM MEMORY
INTERNAL PROGRAM MEMORY
1
EA  pin is high
EA  pin is grounded
2.
PSEN signal is activated
PSEN is grounded
3.

8051 can address up to 64 KB of External program
memory   
4KB  of internal  program memory is available
4.

Accessible by only direct and indirect addressing   
modes
Accessible by  all addressing modes


23.What is the maximum frequency of the clock signal that can be counted by 8051 counter?
The maximum frequency of the clock signal is 1/12th of the oscillator frequency.

24.What are the two memory address pointers  in 8051 microcontroller?
Program counter and Data Pointer are the two memory address pointers in 8051. The program instruction bytes are fetched from the locations in memory that are addressed by the PC. The DPTR register is made up of two 8 bit registers named DPH and DPL, which are used to furnish memory address for internal and external code  access and external data access.

25.Give the PSW setting for register bank 2 as default bank in 8051 microcontroller.
7
6
5
4
3
2
1
0
CY
AC
FO
RS1
RS0
OV
-
P


By setting  RS1= 1  and  RS0 = 0, register bank 2 can be selected.

26. What  is the difference between timer and counter operation in 8051?
The timer counts the internal clock pulses whose frequency  is  1/12th of oscillator frequency .
The counter counts the internal clock pulses which are given through T0 pin (for counter 0) and                                 T1 pin (for counter 1) of 8051.




27.What happens in power down mode of 8051 microcontroller?
The memory  locations of power down RAM can be maintained through a separate small battery backup supply so that the content of these RAM can be preserved during power failure conditions.

28.When 8051 is reset,  all interrupts are disabled. How to enable these interrupts?
Each of the interrupts  sources can be individually enabled or disabled by setting or clearing a bit in the Special Function Register IE . IE also has a global disable bit, which disables all interrupts at once.

29.What is nested interrupts?
The 8051 is executing an ISR for servicing an interrupt and another interrupt occurs. If the new coming interrupt is high priority then only it can interrupt the previously occurred low priority interrupt. These are called nested interrupts.

30.Give steps to program 8051 for serial data  transfer.
The 8051 has a serial data communication circuit that uses register  SBUF to hold data. Register SCON controls data communication , register PCON controls data rates, and  pins RXD (P3.0) and TXD(P3.1) connect to serial data network.

 31.What are the difference between a microprocessor and microcontroller?
S.NO
MICROPROCESSOR
MICROCONTROLLER
1.
It has one or two types of bit handling instructions
It has many  bit handling instructions.
2.
No SFRs are available.
SFRs are available.
3.
ROM ,RAM ,Parallel I/O , Serial I/O , Counters and a clock circuit are not available.
ROM ,RAM ,Parallel I/O , Serial I/O , Counters and a clock circuit are available.
4.
Microprocessor based system requires more hardware.
Microprocessor based system requires less hardware.
5.
Microprocessor based system is more flexible for design.
Microprocessor based system is comparatively less flexible for design.


32.What is the significant of GATE  in TMOD control register?
It  is OR gate enable bit which controls RUN/STOP of timer  1/0.
Timer/ Counter is  enabled while  TR 1/0 in TCON is set and signal on external interrupt INT1/0 pin is high.
Cleared to 0 by program to enable timer  to run , if bit TR1/0 in TCON is set.

33.How  does the status of EA pin affect the access to internal and external program memory?
EA- Enable  Interrupt bit. Cleared to 0 by program to disable all interrupts , set to 1 to permit individual interrupts to be enabled by their enabled bits . It is set to access data from external memory or else it is grounded for internal memory operations.

34.What is the asynchronous data transmission format of 8051 serial port?
                           Receiver samples data in centre  of bit time

1
2
3
4
5
6
7
8
Idle state

                    
            Start bit    ßà                         Data Bits                                 Minimum of one stop bit
                Bit time = 1/f                              t  à

35.What are the register banks in 8051 microcontroller?
34 general  purpose or working registers in which A and B hold results of math and logical operations. The other 32 are arranged as part of the internal RAM in 4 banks  : bank 0 , bank 1, bank 2 and bank 3,  each of eight registers.











No comments:

Post a Comment