Sei sulla pagina 1di 18

EC 1301 MICROPROCESSOR & MICROCONTROLLER QUESTION BANK UNIT-1 PART-A 8085 MICROPROCESSOR 1.

What are the types of instruction for 8085 microprocessor? 2. What are the addressing modes for 8085 microprocessor? 3. What are the different memory mapping schemes? Give any one advantage and disadvantage for each. 4.write an 8085 assembly language program which checks to see if the number is EVEN or ODD and if it is odd returns a0 in B register else returns a 1 5. If a 6 MHZ crystal is connected with 8085 how much is the time taken by 8085 to complete opcode fetch cycle and memory read cycle? 6. Write the operation carried out when 8085 executes DAD H instruction. 7. State the function of ALE & TRAP pins in 8085. 8. If the frequency of the crystal connected to 8085 is 6 MHZ, calculate the time to fetch & execute NOP instruction. 9. What are the flags available in 8085? 10. Specify the four control signals commonly used by the 8085 MPU. 11. Define opcode & operand 12. List some of the logical instructions in 8085 13. What is stack & subroutine? 14. What are two compare instructions available in8085? 15. Why data bus is bidirectional? 16. What is fetch & execute cycle? 17. What is T-state? 18. What are the differences between microprocessor & microcontroller? 19. What are the differences between PUSH& POP instructions? 20. What is an interrupt? PART-B 1. With neat diagram explain the architecture of 8085. 2. Explain the addressing modes of 8085 with example. 3. What is an assembly language? Explain. 4. How are instructions of 8085 microprocessor classified? Explain with an example. 5. Write an 8085 microprocessor based assembly language program to sort an array of data in ascending order. 6. Write detailed notes on interrupts in 8085 microprocessor. 7. What are the memories mapped I/O & I/O mapped I/O.explain. UNIT II PERIPHERALS INTERFACING PART-A 1. What is the use of 8251 chip? 2. What are the functional types used in control words of 8251A? 3. What are the basic modes of operation of 8255? 4. Write the features of mode 0 in 8255? 5. What are the features used mode 1 in 8255? 6. What are the features used mode 2 in 8255? 7. What are the basic modes of operation of 8253? 8. What are the different types of write operations used in 8253? 9. What is the output modes used in 8279? 10. What are the modes used in keyboard modes? 11. What are the modes used in display modes?

12. 13. 14. 15. 16. 17. 18. 19. 20.

What is the use of modem control unit in 8251? List the operation modes of 8255 What is the purpose of control word written to control register in 8255? What is the size of ports in 8255? What is interfacing? What is an USART? What is the use of 8251 chip? 125. The 8279 is a programmable __________ interface. List the major components of the keyboard/Display interface. PART-B

1.

Explain the advantages of using the following chips in Microprocessor bases systems (a) USART (b) keyboard & display controller. 2. Explain in detail about 8255 programmable peripheral interface with a neat block diagram. 3. Explain the mode 0 of 8255 in detail. 4. Explain the mode 1 of 8255 in detail 5. What are the functions performed by 8255? 6. Explain the BSR operation of 8255? 7. What are the different modes of serial communication? Draw the internal block diagram of 8251 & explain how the CPU uses it for serial communication. 8. Explain the transmission & reception of serial data using 8251 indicating the function of various registers in it. 9. (A) what are the functions performed by 8251? (b)What are the control words of 8251 & what are its functions? (c)What is USART? 10. List the major components of the 8279 keyboard/display interface & explain their functions with neat diagram. 11. List the functions performed by 8279. 12. Explain ADC interfacing with 8085. 13. Explain DAC interfacing with neat diagram. 14. Explain the features & bus configuration of I2c bus. 15. Explain briefly about RS-232c 16. Compare the characteristics of RS-232 & RS485 17. With neat diagram explain GPIB system 18. Write an ALP to generate triangular wave form using DAC interfacing UNIT III 8086 MICROPROCESSOR PART-A 1. Why is an interrupt driven I/O more efficient than programmed I/O for 8086 microprocessor? 2. An interrupt device based on 8086 microprocessor sends 03h onto AD0 thru AD7 data bus when INTA is low. Where should the interrupt jump address located in the vector table? 3. Name the software operation possible with the 8086 compared with 8085 microprocessor 4. How the physical address for fetching the next instruction to be executed is obtained in 8086? 5. If the execution unit generates an effective address of 43a2h & the DS register contains 4000h.what will be the physical address generated by the BIU? What is the maximum size of the data segment? 6. Mention the function of SI & DI registers 7. Name any four processor control instructions 8. What is meant by software interrupt in 8086? 9. What is the function of T & D flags in 8086? 10. What is the operation carried out when 8086 executes the instruction MOVSW? 11. What is the role of TF & IF flags in the register of 8086? 12. What is the operation carried out when 8086 executes the instruction in MOVSB? 13. What is pipelining?

14. 15. 16. 17. 18. 19. 20.

What What Write State State What What

are the differences between 8086 & 8085? is a segment override prefix? Give an example a program that will carry out the following binary operation using 8086 instruction the functional units available in 8086 the modes in which 8086 operate is a queue? How queue is implemented in 8086? are the segments registers in 8086?

PART-B 1. 2. 3. 4. Describe the pipeline architecture of 8086. Explain the addressing modes of 8086 with example. Write down the various registers present in 8086 & indicate their function. (I) explain the different unconditional jump instruction in 8086 (ii)Explain the operations carried out when 8086 executes the instructions XLAT, INSB & POP BX 5. Name the four different ways of passing in 8086 microprocessor to a procedure in assembly language. 6. With an example explain the addressing modes of 8086 7. Write an 8086 program to perform unpacked BCD division 8. List out the different addressing modes of 8086 & explain them in detail with one example for each. 9. Explain the architecture of 8086 microprocessor in details 10. With neat functional block diagram explain the architecture of 8086 microprocessor 11. Explain the instruction set of 8086 with examples UNIT IV 8051 MICROCONTROLLER PART-A 1. What is the advantage of microcontroller over microprocessor? 2. What is the difference between microprocessor & microcontrollers? 3. What is the time duration for one state & one machine cycle if a 6 MHz crystal is connected to 8051? 4. What is the difference between timer & counter operation in 8051? 5. What is the function of IP register in 8051? 6. What is the importance of special function register available in 8051 microcontroller? 7. What is the job of the TMOD register? 8. Name the interrupts of 8051 microcontroller 9. What is the function of DPTR register? 10. What are the features of 8051 microcontroller? 11. What happens in power down mode of 8051 microcontroller? 12. Define watch dog timer? 13. Define baud rate 14. List any applications of microcontroller 15. What is the difference between 8085 microprocessor & 8051 microcontroller?

PART-B 1. Draw the architecture of 8051 & explain it 2. Explain with neat diagram of port pin & circuits

That connects the 8051 microcontroller to the outside world 3. With neat sketch describe the hardware features of 8051 Microcontroller 4. Discuss the interrupt system of 8051 microcontroller 5. Explain the different modes of operations of timers in 8051 In detail with its associated registers. 6. List the various special function register in 8051 & explain Its usage. 7. With neat diagram explain port 1 pin configuration of 8051. 8. Explain the functional block diagram of 8051 in detail. UNIT-V 8051 PROGRAMMING AND APPLICATIONS PART-A 1. Explain the interrupts of 8051 microcontroller? 2. Write A program to perform multiplication of 2 NOS using 8051? 3. Write a program to mask the 0th &7th bit using 8051? 4. List the addressing modes of 8051? 5. Write A program to perform multiplication of 2 NOS using 8051? 6. List the addressing modes of 8051? 7. Write about CALL statement in 8051? 8. Write about the jump statement? 9. Write program to load accumulator, DPH,&DPL using 8051? 10. Write a program to find the 2s complement using 8051? 11. Write a program to add 2 8-bit numbers using 8051? 12. Write a program to swap two numbers using 8051? 13. Write a program to subtract 2 8-bit numbers &exchange the digits using 8051? 14. Write a program to subtract the contents of R1 of Bank 0from the contents of R0 of Bank 2 using 8051? PART-B 1. 2. 3. 4. 5. With neat diagram explain the ADC interface to microprocessor. Draw & explain the operation of a sample and hold circuit Explain LCD displays interface With neat diagram explain the DAC interface to microprocessor Write a program to perform multiplication of 2 NOS using 8051?

EC 1301 MICROPROCESSOR & MICROCONTROLLER QUESTION BANK (2marks with answers) UNIT-1 8085 MICROPROCESSOR 1. What are the types of instruction for 8085 microprocessor? Data transfer instruction Arithmetic instruction Logical & rotate instruction Branch instruction Stack instruction I/O & machine control instruction 2. What are the addressing modes for 8085 microprocessor? Direct addressing mode Register addressing mode Register indirect addressing mode Immediate addressing mode 3. What are the different memory mapping schemes? Give any one advantage and disadvantage for each. Memory mapped I/O (1) No separate IO/M signal is needed (2) Memory space is limited I/O mapped I/O (1) More space for memory (2) Only two instructions are available for I/O access (IN,OUT) 4.write an 8085 assembly language program which checks to see if the number is EVEN or ODD and if it is odd returns a0 in B register else returns a 1 CLC MVI B, 00 MVI A, DATA RAR JC LOOP INR B LOOP: HLT 5. If a 6 MHZ 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/2=3 One T-state=1/ Clock frequency =1/ (3*10^6) =.333

6. Write the operation carried out when 8085 executes DAD H instruction. (HL)<- (HL) + (HL) The content of HL pair is added with the same content & the result in HL pair itself. 7. State the function of ALE & TRAP pins in 8085. (1) ALE (Address Latch Enable Whenever 8085 places address in the lines AD7-AD0,it makes the ALE signal high. This signal can be used to latch address in an external latch (2)TRAP It is anon mask able interrupt signal given to8085 8. if the frequency of the crystal connected to 8085 is 6 MHZ, calculate the time to fetch & execute NOP instruction. Crystal frequency=6 MHz Clock frequency=6/2=3MHz One T-state=1/(3*10^6)=.333 Time to fetch execute NOP instruction =4*T state =4*.333 =1.332 9. What are the flags available in 8085? S-sign flag Z-zero flag AC-Auxiliary carry flag P-parity flag CY-carry flag 10. Specify the four control signals commonly used by the 8085 MPU. Read signal Write signal Ready signal Address latch signal Clock out signal 11. Define opcode & operand An instruction is a command to the microprocessor to perform a given task on specified data. The task to be performed called opcode. The data can be operated on called is operand. MVI A 18H Opcode operand 12. List some of the logical instructions in 8085 ANA B (AND) ORA B (OR) XRA B (XOR) CMA (COMPLEMENT) STC (SET CARRY) 13. What is stack & subroutine? Stack It is a set memory locations in memory

Subroutine It is a group of instruction written separately from the main program to perform a function that occurs repeatedly in the main program. 14. What are two compare instructions available in8085? CMP register (compare the content of register with accumulator) Examples: CMP B = (A)-(B) CMP H = (A)-(H) CMP D = (A)-(D) CPI data (compare accumulator with immediate data) Examples: CPI 24 H = (A) -24 15. Why data bus is bidirectional? The microprocessor has to fetch the data from memory or input device for processing and after processing it has to store the data to memory or output device. Hence the data has is bidirectional. 16. What is fetch & execute cycle? The instruction cycle of an instruction can be divided into fetch & execute cycles. The fetch cycle is executed to fetch the opcode from memory. The execute cycle is executed to decode the instruction & to perform the work instructed by the instruction. 17. What is T-state? The T-state is the time period of the internal clock signal of the microprocessor. The time taken by the microprocessor to execute the machine cycle is expressed in T-state. 18. What are the differences between microprocessor & microcontroller? Microprocessor It is used as CPU It is a programmable integrated Device that has computing & Decision making capability microcontroller it includes MPU, RAM, ROM&I/O lines it is a single chip micro computer

19. What are the differences between PUSH& POP instructions? PUSH Push registers pair onto Stack The contents of the register Pair designated in the Operand are copied into the stack. The SP is Decremented & the contents Of the high order register are copied into that location POP pop off stack to register pair

the contents of memory location pointed out by the SP register are copied into the low order register of the operand

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

UNIT II PERIPHERALS INTERFACING 1. What is the use of 8251 chip? Intels 8251A is a universal synchronous asynchronous receiver and transmitter compatible with Intels Processors. This may be programmed to operate in any of the serial communication modes built into it. This chip converts the parallel data into a serial stream of bits suitable for serial transmission. It is also able to receive a serial stream of bits and converts it into parallel data bytes to be read by a microprocessor. 2. What are the functional types used in control words of 8251a? The control words of 8251A are divided into two functional types. 1. Mode Instruction control word 2. Command Instruction control word Mode Instruction control word:-This defines the general operational Characteristics of 8251A. Command Instruction control word:-The command instruction controls the actual operations of the selected format like enable transmit/receive, error reset and modem control. 3. What are the basic modes of operation of 8255? There are two basic modes of operation of 8255, viz. 1. I/O mode. 3. BSR mode. In I/O mode, the 8255 ports work as programmable I/O ports, while In BSR mode only port C (PC0-PC7) can be used to set or reset its individual port bits. Under the IO mode of operation, further there are three modes of operation of 8255, So as to support different types of applications, viz. mode 0, mode 1 and mode 2. Mode 0 - Basic I/O mode Mode 1 - Strobed I/O mode Mode 2 - Strobed bi-directional I/O 4. Write the features of mode 0 in 8255? 1. 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 combined used as a third 8-bit port. 2. Any port can be used as an input or output port. 3. Output ports are latched. Input ports are not latched. 4. A maximum of four ports are available so that overall 16 I/O configurations are possible. 5. What are the features used mode 1 in 8255? Two groups group A and group B are available for strobed data transfer. 1. Each group contains one 8-bit data I/O port and one 4-bit control/data port. 2. The 8-bit data port can be either used as input or output port. The inputs and outputs both are latched. 3. Out of 8-bit port C, PC0-PC2 is used to generate control signals for port B and PC3=PC5 are used to generate control signals for port A. The lines PC6, PC7 may be used as independent data lines. 6. What are the features used mode 2 in 8255? The single 8-bit port in-group A is available. 1. The 8-bit port is bi-directional and additionally a 5-bit control port is available. 2. Three I/O lines are available at port C, viz PC2-PC0. 3. Inputs and outputs are both latched.

4. The 5-bit control port C (PC3=PC7) is used for generating/accepting handshake signals for the 8-bit data transfer on port A. 7. What are the basic modes of operation of 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) 8. What are the different types of write operations used in 8253? There are two types of write operations in 8253 (1) Writing a control word register (2) Writing a count value into a count register The control word register accepts data from the data buffer and initializes the counters, as required. The control word register contents are used for (a) Initializing the operating modes (mode 0-mode4) (b) Selection of counters (counter 0- counter 2) (c) Choosing binary /BCD counters (d) Loading of the counter registers. The mode control register is a write only register and the CPU cannot read its contents. 9. 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 4bit 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 from the right side or from the left side. 10. 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. 11. 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. 12. What is the use of modem control unit in 8251? The modem control unit handles the modem handshake signals to coordinate the communication between the modem and the USART. 13. List the operation modes of 8255 a) I.O Mode i. Mode 0-Simple Input/output. ii. Mode 1-Strobed Input/output (Handshake mode) iii. Mode 2-Strobed bidirectional mode b) Bit Set/Reset Mode. 14. What is the purpose of control word written to control register in 8255?The control words written to control register specify an I/O function for each I.O port. The bit D7 of the control word determines either the I/O function of the BSR function.

15. What is the size of ports in 8255? Port-A: 8-bits Port-B: 8-bits Port-CU: 4-bits Port-CL: 4-bits 16. What is interfacing? An interface is a shared boundary between the devices which involves sharing information. Interfacing is the process of making two different systems communicate with each other. 17. What is an USART? USART stands for universal synchronous/Asynchronous Receiver/ Transmitter. It is a programmable communication interface that can communicate by using either synchronous or asynchronous serial data. 18. What is the use of 8251 chip? 8251 chip is mainly used as the asynchronous serial interface between the processor and the external equipment. 19. 125. The 8279 is a programmable __________ interface. Keyboard/Display 20. List the major components of the keyboard/Display interface. a. Keyboard section b. Scan section c. Display section d. CPU interface section

UNIT III 8086 MICROPROCESSOR 1. Why is an interrupt driven i/o more efficient than programmed i/o for 8086 microprocessor? (1) Interrupt I/O uses the built in interrupt capabilities. (2) Interrupt I/O is asynchronous in nature (3) Programmed I/O is special i/o program which is in full control of data transfers. Using a software technique called polling the microprocessor is synchronized to the speed of the peripheral. It is inefficient due to continuous status check. (4) Processor responds to the peripheral only when ready & efficient became there is no need to poll the status. 2. An interrupt device based on 8086 microprocessor sends 03h onto AD0 thru AD7 data bus when INTA is low. Where should the interrupt jump address located in the vector table? When INTA is low, data gated to microprocessor=03h The interrupt jump address has to be loaded at location=03*4bytes/rects=12=0ch The starting address of interrupt=000ch The ending address of interrupt=000fh 3. Name the software operation possible with the 8086 compared with 8085 microprocessor Byte and word multiply & divide Block moves & compares Software interrupts

Multiprocessor coordination Byte transactions Non destructive bit testing Program loop instructions 4. 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 & then adding the content of IP register with the above value. CS=16bit content 0000 IP=0000 16bit content Physical address=20 bit address Example CS=1200h IP=0345h CS=0001 0010 0000 0000 0000 IP= 0000 0011 0100 0101 0001 0010 0011 0100 0101 Physical address: 12345h 5. If the execution unit generates an effective address of 43a2h & the DS register contains 4000h.what will be the physical address generated by the BIU? what is the maximum size of the data segment? Effective address=43a2h Physical address =40000h 43a2h 443a2h Maximum size of DS=2^16=64kbytes 6. Mention the function of SI & DI registers SI-SOURCE INDEX It is used to hold the index value of source operand for string instructions. DI-DESTINATION INDEX It is used to hold the index value of destination operand for string instructions. It is used for single stepping through a program. 7. Name any four processor control instructions CLC WAIT CMC HLT STC LOCK STD NOP 8. 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) 9. What is the function of T & D flags in 8086? D flag-string direction flag It is used to set direction in string operation. T flag-single step trap flag It is used for single stepping through a program. 10. What is the operation carried out when 8086 executes the instruction MOVSW? MOVSW-move word string This instruction transfers a word from the source string to the destination string & updates SI & DI to point to the next string element.

11. What is the role of TF & IF flags in the register of 8086? TF (TRAP FLAG) Setting TF puts the 8086 in the single step mode. in this mode the 8086 generates an internal interrupt after execution of each instruction. IF (INTERRUPT FLAG) Setting IF causes the 8086 to receive external maskable interrupts through INTR pin. Clearing if disables these interrupts. 12. What is the operation carried out when 8086 executes the instruction in MOVSB? MOVSB-move string byte [[DI]]-[[SI]] Move 8bit data from memory location addressed by SI in segment DS location addressed by DI in segment ES if DF(direction flag)=0,SI is incremented by 1 =1,SI is decremented by 1 13. What is pipelining? Fetching the next instruction while the current instruction executes is called pipelining. 14. What are the differences between 8086 & 8085? 8085 8 bit microprocessor 2^16memory locations Sequential facility Low speed 8086 16 bit microprocessor 2^20 memory locations pipelined architecture Available high speed

15. What is a segment override prefix. Give an example. If the data is required to move from one segment to another segment initially data transferred between dl & location obtained from effective address stored in BX & base address of DS .now the destination address is in some other segment so it is included in the instructions. MOV CS: [BX], DL 16. Write a program that will carry out the following binary operation using 8086 instruction W=X+Y+24-Z MOV AX, X ADD AX, X ADD AX, 24 SUB AX, Z MOV W, AX 17. State the functional units available in 8086 BIU (bus interface unit) EU (execution unit) 18. State the modes in which 8086 operate Minimum mode Maximum mode 19. What is a queue? How queue is implemented in 8086? A data structure carried by the registers on the basis of first-in-first-out (FIFO) is called queue. The 8086 have six numbers of 8 bit FIFO registers which is used for instruction queue. 20. What are the segments registers in 8086? Code segment register Data segment register Stack segment register Extra segment register

UNIT IV 8051 MICROCONTROLLER PART-A 1. What is the advantage of microcontroller over microprocessor? (1) The overall system cost is low as the peripherals are integrated in a single chip (2) The size is very small (3) The system is easy to troubleshoot and maintain (4) If required additional RAM, ROM & I/O ports may be interfaced (5) The system is more reliable 2. What is the difference between microprocessor & microcontrollers? Microprocessor The functional blocks ALU, registers, timing& Control unit microcontroller microprocessors functional blocks+ timer, memory, I/oports, ADC DAC

Used for general Purpose applications Number of instructions are high Number of bit Manipulating Instructions are low Costly & large size

used for special purpose applications few instructions can do the functions number of bit manipulating instructions are high

cheap & small size

3. What is the time duration for one state & one machine cycle if a 6 MHz crystal is connected to 8051? Clock frequency = 6 MHz/2=3 MHz One t state = 1/clock frequency =1/3 MHz =.333 micro sec The time taken to execute a machine cycle is 12 clock periods 4. What is the difference between timer & 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 & t1 pin of 8051 5. 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.setting a bit to make the corresponding interrupt to have high priority & setting a bit 0 makes the corresponding interrupt to low priority. 6. What is the importance of special function register available in 8051 microcontroller? The 8051 operations that do not use the internal 128 byte ram address from 00h to 7fh are done by a group of special internal registers, SFRS, which may be addressed like internal ram. 7. What is the job of the TMOD register?

TMOD register is used to set the various timer operation modes. TMOD is dedicated solely to the two timers & can be considered to be two duplicate 4bit register each of which controls the action of the timers. 8. Name the interrupts of 8051 microcontroller External interrupt-0 External interrupt-1 Timer -0 interrupt Timer -1 interrupt Serial port interrupt 9. What is the function of DPTR register? The data pointer register is the 16bit address register that can be used to fetch any 8bit 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 & DPL. 10. What are the features of 8051 microcontroller? 8bit CPU with register a & b 16 bit pc & DPTR 8 bit PSW 64 k program memory 64 k data memory 128 bytes of on chip data memory 32 I/O pins for port 0, port 1, port 2, port3 Two 16 bit timers t0 & t1 Full duplex UART: SBUF Two external & three internal interrupt sources 11. 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. 12. Define watch dog timer? 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 watch dog timer .when the WDT is enabled, it will initiate a hardware reset whenever it overflows. In order to avoid a reset during normal condition the software should take care of clearing WDT well before its overflow. 13. Define baud rate Baud rate is used to indicate the rate at which data is being transferred Baud rate=1/timer for a bit cell 14. List any applications of microcontroller Building control Industrial control Motor speed control Handheld instruments Peripheral devices Stand alone devices Automobile applications Home applications Instrument sub functions

15. What is the difference between 8085 microprocessor & 8051 microcontroller? 8085 it is a 8 bit microprocessor it has only CPU it is a general purpose Microprocessor it has few bit manipulating Instructions Instructions No SFRS are available 8051 it is a 8 bit microcontroller it has CPU memory as well as timers parallel & serial i/o it is a special purpose digital controller it has large number of bit manipulating

SFRS are available

UNIT-V 8051 PROGRAMMING AND APPLICATIONS PART-A 1. Explain the interrupts of 8051 microcontroller? The interrupts are: Vector address External interrupt 0: IE0: 0003H Timer interrupt 0: TF0: 000BH External interrupt 1: IE1: 0013H Timer Interrupt 1: TF1: 001BH Serial Interrupt Receive interrupt: RI: 0023H Transmit interrupt: TI: 0023H 2. Write A program to perform multiplication of 2 NOS using 8051? MOV A, # data 1 MOV B, # data 2 MUL AB MOV DPTR, #5000 MOV @DPTR, A (lower value) INC DPTR MOV A, B MOVX @ DPTR, A 3. Write a program to mask the 0th &7th bit using 8051? MOV A, # data

ANL A, # 81 MOV DPTR, # 4500 MOVX @DPTR, A LOOP SJMP LOOP 4. List the addressing modes of 8051? Direct addressing Register addressing Register indirect addressing. Implicit addressing Immediate addressing Index addressing Bit addressing 5. Write A program to perform multiplication of 2 NOS using 8051? MOV A, # data 1 MOV B, # data 2 MUL AB MOV DPTR, # 5000 MOV @DPTR, A (lower value) INC DPTR MOV A, B MOVX @ DPTR, A 6. List the addressing modes of 8051? Direct addressing Register addressing Register indirect addressing. Implicit addressing Immediate addressing Index addressing Bit addressing

7. Write about CALL statement in 8051? There are two subroutine CALL instructions. They are *LCALL (Long CALL) *ACALL (Absolute CALL) Each increments the PC to the 1st byte of the instruction & pushes them in to the stack. 8. Write about the jump statement? There are three forms of jump. They are LJMP (Long jump)-address 16 AJMP (Absolute Jump)-address 11 SJMP (Short Jump)-relative address 9. Write program to load accumulator, DPH,&DPL using 8051? MOV A, #30 MOV DPH, A MOV DPL, A 10. Write a program to find the 2s complement using 8051? MOV A, R0

CPL A INC A 11. Write a program to add 2 8-bit numbers using 8051? MOV A, #30H ADD A, #50H 12. Write a program to swap two numbers using 8051? MOV A, #data SWAP A 13. Write a program to subtract 2 8-bit numbers &exchange the digits using 8051? MOV A, #9F MOV R0, #40 SUBB A, R0 SWAP A 14. Write a program to subtract the contents of R1 of Bank 0from the contents of R0 of Bank 2 using 8051? MOV PSW, #10 MOV A, R0 MOV PSW, #00 SUBB A, R1 15. Write a program to mask the 0th &7th bit using 8051? MOV A, # data ANL A, #81 MOV DPTR, #4500 MOVX @DPTR, A LOOP SJMP LOOP

Potrebbero piacerti anche