CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 8085 Microprocessor 1.1.What is microprocessor? It is a program controlled semiconductor device (IC), which fetches, decode and executes instructions. 1.2. What is a bus? Bus is a group of conducting lines that carries data, address and control signals. 1.3. Define bit, byte and word. A digit of the binary number or code is called bit. Also, the bit is the fundamental storage unit of computer memory. BYTE: the 8-bit (8-digit) binary number or code is called byte. And 16-bit binary number or code is called word. 1.4. What is MPU? MPU is a device or group of devices that can communicate with peripherals, providing timing signals, direct data flow, and perform computing tasks as specified by the instructions in memory. 1.5. State the relation between the number of address pins and physical memory space. The size of the binary number used to address the memory decides the physical memory space. If a microprocessor has n-address pins then it can directly address 2n memory locations. ( the memory locations that are directly addressed by the processor is called physical memory space. 1.6. What are the limitations of 8085 microprocessor when compared with MPU? The limitations of 8085 MPU are : The low-order address bus of the 8085 microprocessor is multiplexed (time shared) with data bus. The buses need to be demultiplexed. Appropriate control signals need to be generated to interface memory and I/O with the 8085. 1.7. Why data bus is bi-directional? The microprocessor has to fetch (read) the data from memory or input device for processing and after processing, it has to store (write) the data to memory or output device. Hence data bus is bidirectional. 1.8.Why address bus is unidirectional? The address is an identification number used by the microprocessor to identify or access a memory location or I/O device. It is an output signal from the processor. Hence address bus is unidirectional. 1.9. State the difference between CPU and ALU. The ALU is the unit that performs the arithmetic or logical operations. The CPU is the unit that includes ALU and control unit. Apart from processing the data, the CPU controls the entire system functioning. Usually a microprocessor will be the CPU of a system and it is called the brain of the computer. 1.10.What is tri- state logic? In tri-state logic, three logic levels are used and they are High, Low, and High impedance state. The High and Low are normal logic levels and high impedance state is electrical open circuit condition. 1.11.Why tri state logic is needed in microprocessor system? In microprocessor system all devices are connected to a common bus. But communication takes place between the master (microprocessor) and one slave (peripheral) at any time instant. During this time instant, all other devices should be isolated from the bus. Therefore, normally all the slaves (peripherals) will remain in high impedance state(in electrical isolation) the master will
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 1
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT select a slave by sending address and chip select signal. When the slave is selected, it comes to normal logic and it communicates with master. 1.12.What is the function of microprocessor in a system? The microprocessor is the master in the system, which controls all the activity of the system. It issues address and control signals and fetches the instruction and data from memory. Then it executes the instruction to take appropriate action. 1.13.Give the basic blocks of 8085 microprocessor. The basic blocks of a microprocessor are ALU, an array of registers and a control unit. The NMOS process offers faster speed and higher density than PMOS and it is TTL compatibility. 1.14.List out the signals of the 8085 microprocessor. The signals can be classified into six groups: Address bus. Data bus. Control and status signals. Power supply and frequency signals. Externally initiated signals. Serial I/O ports. 1.15.Give the classifications of computers. The computers can be classified into micro, mini, and large computers. 1.16.What is a microcomputer? The computing system designed using a microprocessor as its CPU is called microcomputer. 1.17.Give the uses of mini computers. Mini computers are used for business data processing, industrial control and scientific approach. 1.18.Give the advantages of microprocessor based system. The microprocessor-based system offers high speed, intelligence, automation, flexibility, compactness and flexibility. 1.19.Give the limitations of microprocessor-based system. Microprocessor based system has limitation on size of data, less execution speed, limited address space, does not support floating point operations. 1.20.Intel 8085 is a 8-bit microprocessor.
1.21.Explain the difference between a microprocessor and microcomputer. The term microcomputer refers to the whole system, whereas the microprocessor is the CPU of the system. 1.22.What are the drawbacks of first generation computers? The first generation computers are fabricated using PMOS technology and it has the drawbacks like slow speed, provides low output currents and was not compatible with TTL logic levels. 1.24.List the components of microprocessor- based (single board microcomputer) system. The microprocessor-based system consists of microprocessor as CPU, semiconductor memories like EPROM and RAM, input device, output device and interfacing devices. 1.25.What is mainframe? The largest and most powerful computers are called mainframes.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 2
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 1.26.What is super computer? The computer built using very high speed devices (or devices with very low switching speeds) and can execute instructions at very high speeds are called supercomputers. The speed of the super computers are measured in MIPS (Millions of instructions per second) or Mega flops(millions of floating point operations per second.
1.27.List the applications of microcomputer. Personal computing. Control applications Calculators. Instrumentation systems. Small business system. 1.28.What are the various units in the 8085 architecture? 1. Registers. 2. Arithmetic and Logic unit (ALU). 3. Instruction Decoder /Machine cycle Encoder. 4. Address Buffer. 5. Address /Data Buffer. 6. Increment/Decrement Address Latch. 7. Interrupt Control. 8. Serial I/O Control. 9. Timing and Control Circuitry. 1.29.List the registers used in 8085. It has eight addressable 8 bit registers: A, B, C, D, E, H, L & F and two 16 bit registers, PC and Stack pointer. The registers can be classified as: 1. 2.
3.
4.
General Purpose Registers. Temporary Registers. Temporary data registers W and Z registers Special Purpose Registers. Accumulator Instruction Registers Flag Registers 16 bit Registers. Program Counter (PC) Stack Pointer (SP)
1.30. What are general purpose registers ?
B, C, D, E, H and L are 8 bit general purpose registers can be used As separate 8 bit registers or as 16-bit Register pair BC, DE, HL. When used in register pair mode the higher order byte resides in the first register (I.e. in B when BC is used as register pair) and the lower order byte in the second (I.e. in when BC is used as a register pair)
1.31.HL register pair also functions as data pointer or memory pointer. 1.32.HL registers are also called scratch pad registers,
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 3
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT
1.33.What are Temporary Registers? Temporary data registers the ALU have two inputs. The accumulator and other supply one input from temporary data register. The programmer cannot access this temporary data register. However it is used internally for execution of most of the ALU operation. 1.34.What are W & Z Registers? o o o
W & Z registers are temp. Reg. These reg. are used to hold 8 bit data execution of some instruction. These reg. are not available to programmer since 8085 uses them internally.
1.35.What is a Special Purpose Register?
Reg. A .It is a tri-state 8 bit reg. It is extensively used in ALU, Load and Store operations as well as in ‘I/O operation Most of the times the result of ALU is stored in register. A. Hence it is identified as Accumulator.
1.36.What is a Flag Register?
It is an 8- bit register. In which 5 of the bits carry significant info in form of flags. 1. Sign flag. 2. Zero flag. 3. Auxiliary carry flag. 4. Parity flag and 5. Carry flag.
D7 SS
SZ
D6 Z
D5 AC
D4 AC
D3 P
D2 PS
D1
D0 CY
CY
1.37.What is sign Flag? 1. After the execution of ALU operations if bit D7 of the result is 1, the sign flag is set. 2. If D7 is 1, the number will be viewed as a negative number. 3. If D7 is 0, the number will be viewed as a positive flag. 1.38.What is Zero Flag? 1. The Zero flag sets if the result of operation in ALU is 0 and flag resets id result is non 0. 2. The Zero flag is also set if a certain register content becomes zero following an increment or Decrement operation of the register. 1.39.What is AC Flag? 1.This flag is set if there is overflow of Bit 3 i.e. carry from lower nibble to higher nibble. 2.This flag is used for BCD operation. 1.40.What is Parity Flag?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 4
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT Parity is defined by the number of ones in the accumulator. After an ALU operation if the result has a even number of ones i.e. even parity, the flag is set. If the parity is odd flag is reset. 1.41.What is Carry Flag? 1. This flag is set if there is an overflow out of Bit 7. 2. The carry flag also serves as a borrow flag for subtraction. 1.42.What is Instruction register? In a typical operation, the processor first fetches the opcode of instruction from memory. The CPU stores this opcode in a register called instruction register. This opcode is further sent to the instruction decoder to select one of the 256 alternatives. 1.43.What is Program Counter? Program is a sequence of instruction. As mentioned earlier, Microprocessor fetches the instruction from memory and executes them sequentially. The PC is a special purpose register which at a given time , stores the address of the next instruction to be fetched . PC acts as a pointer to the next instruction. In case of JUMP and CALL instruction address followed by JUMP and CALL instruction. Is Placed in the PC. The processor then fetches the next instruction from the new address specified by JUMP or CALL instruction. In Conditional JUMP and Conditional CALL instruction if the condition is not Satisfied, the processor increments PC by three. So that it points the instruction followed by conditional JUMP or CALL instruction. Otherwise Processor fetches the next instruction from the new address specified by JUMP or CALL instruction. 1.44.What is Stack Pointer? The Stack pointer is a reserved area of the memory in the RAM where temporary information may be stored. A 16-bit SP is used to hold the address of the most recent stack entry.
1.45.What is ALU? The 8085 ALU performs ALU functions on 8 bit variables. The ALU performs bitwise fundamental arithmetic operations such as addition and Subtraction. The logic unit performs logical operations such as COMPLEMENT, AND, OR and EXOR As well as rotate and clear. The ALU also looks after the branching decisions. 1.46. What is Instruction Decoder? o As mentioned earlier the processor first fetches the opcode of instruction from memory and stores this opcode in the instruction register. o It is then sent to the instruction decoder. o The instruction decoder decodes it and accordingly gives the timing and control signals, which control the register, the data buffer ALU and external peripheral signals. 1.47.What is Address Buffer? This is a 8 bit unidirectional buffer. It is used to drive external high Order address Bus (A15-A8).
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 5
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT It is also used to tri-state the high order address bus under certain Conditions such as reset, Hold, halt and when the bus is not in use.
1.48.What is
Address/Data Buffer?
This is an 8-bit bi-directional buffer. It is used to drive multiplexed address / data bus i.e. low order address bus (A7-A0) and data bus (D7-D0) it is also used to tri-state the multiplexed address/data bus under certain conditions such as reset, hold, halt and when the bus is not in use. The address and data buffer are used to drive external address and data buses respectively. Due to these buffers the address and data buses can be tri-stated when they are not in use. 1.49.What is Increment Decrement Address Latch? This 16-bit register is used to increment and decrement the contents Have the program counter or stack pointer, as a part of execution of Instructions related to them. 1.50. What is SID signal? This signal is the serial input data. It is normally loaded into the accumulator as 7th bit. 1.51.What is the difference between register and memory? Register is a storage device to store the data. (accumulator, special function register etc. ) but memory is a storage device to store the program (RAM, ROM etc.) 1.52.What is the difference between unidirectional and bidirectional? Unidirectional is a one way access, and bidirectional is a two way access. Address bus is a unidirectional signal, and data bus is a bidirectional signal. 1.53. What is a counter? Counter is a frequency program application used to keep track of events. 1.54. What is the use of time delay procedure? Time delay procedure is used to design a specific delay. 1.55. Define total time delay. Total time delay TD = To +TL 1.56.What is the use of address decoding? Address decoding is used to identify a register for a given address and should be able to generate a unique pulse for a given address. 1.57.What is the function of memory interfacing? The function is that the microprocessor should be able to read from and write into a given register of the memory chip. 1.58. What do you mean by microprogramming? Microprogramming is a technique for controlling the computer in a sequential manner. 1.59. What is generic microprocessor? In its status register, it contains a Zero flag and carry flag. 8086 Microprocessor
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 6
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 8086 Microprocessor 2.1.8086 is a 16 bit microprocessor. 2.2.What is the maximum memory size possible for a 8086 based system? 8086 can address one mega byte (2 20) memory. 2.3.What are the functional units of 8086? The Bus Interface unit (BIU) fetches instructions, reads data from memory and ports and writes data to memory and I/O ports. 2.4.What is the main function of EU in 8086? The Execution unit executes the instructions that have already been fetched by the bus interface unit (BIU). 2.5.What are the constituents of BIU? The BIU contains segment registers, instruction pointer, instruction queue, Address generation/ bus control circuitry and an adder. 2.6.The bus interface unit provides the external bus operations for 8086. 2.7.What is the use of instruction queue? The instruction queue prefetches 6 bytes of instruction from memory to increase the speed of program execution. 2.8.What is the use of adder in BIU? The dedicated adder in BIU, is used to produce 20 bit address. 2.9.What are the function registers present in BIU? Code segment registers(CS), Data segment registers(DS), Stack segment registers(SS), and extra segment registers(ES). 2.10.Give the register classification of 8086? The 8086 contains: General purpose registers. Special purpose registers. 2.11.Give the function of general-purpose registers in 8086? They are used for holding data, variables and intermediate results temporarily. 2.12.Give the function of special purpose registers in 8086? They are used as segment registers, pointers, index registers or as offset storage registers for particular addressing modes. 2.13.What are general data registers? The registers AX, BX, CX, DX are the general data registers. L and H represents the lower and higher bytes of particular register. 2.14.Give the functions of each segment register in 8086? Code segment register contains the base or start of the current code segment. Stack segment register points to the current stack. Data segment register points to the current data segment. Extra segment register points to extra segment in which data stored.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 7
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 2.15.How the physical address is calculated? The physical address is calculated from two parts, the first part is segment address and second is the offset. The segment register contains 16- bit segment base addresses, related to different segments. Any of the pointers and index register or BX may contain the offset of the location to be addressed. 2.16.What are pointers? IP, BP and SP are the pointers and contain offsets within the code, data and stock segments respectively. 2.17.What are index registers? SI and DI are the index registers, which are used as general purpose registers and also for offset storage in case of indexed, based indexed and relative based indexed addressing modes. 2.18.What is the main function of index register? The index register is particularly useful for string manipulations. 2.19.What is queue? How queue is implemented in 8086? A data structure, which can be accessed on the basis of first out, is called queue. The 8086 has six numbers of 8-bit FIFO registers, which is used for instruction queue. 2.20.What are the names of general registers in 8086? AX- 16 bit accumulator. BX- Base register. CX -Counter register. DX- Data register. 2.21.What is the difference between segment register and general -purpose register? The segment registers are used to store 16-bit segment base address of the four memory segments. The general-purpose registers are used as the source or destination register during data transfer and computation, as pointers to memory as counters. 2.22.What is pipelining? Fetching the next instruction while current instruction executes is called pipelining. 2.23. What is pipelined architecture? In pipelined architecture, the processor will have number of functional units and execution time of functional units is overlapped. Each functional unit works independently most of the time. 2.24.What is the difference between 8086 and 8088? The external bus in 8086 is 16-bit and that of 8088 is 8-bit. The 8086 access memory in words but 8088 access memory in bytes. 2.25.What is a flag? A flag is a flip-flop, which indicates some condition produced by the execution of an instruction or controls certain operations of EU. 2.26.BX register is similar to 8085 HL register pair. 2.27.What is the use of auxiliary carry flag in 8086? AF is used by BCD arithmetic instruction. 2.28.What is the function of carry flag in 8086? CF is set if there is a carry from addition or borrow from subtraction. 2.29.What is meant by memory segmentation?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 8
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT Memory segmentation is the process of completely dividing the physically available memory into a number of logical segments. Each segment is 64k bytes in size and is addressed by one of the segment registers. 2.30.Define overlapped segment area? The area of memory from start of the second segment to the possible end of the first segment is defined as overlapped segment area.
2.31.What are the advantages of segmented memory? The advantages of segmented memory are: Allows the memory capacity to be 1 M bytes although the actual addresses to be handled are of 16-bit size. Allows the placing of code, data and stack portions of the same program in different parts (segments of memory, data and code protection. Permits a program and /or its data to be put areas of memory each time program is executed i.e. provision for relocation may be done. 2.32.What are the parts of flag register? Condition code (or ) status flag register. Machine control flag register. 2.33.Give the classification of machine control flag: The machine control flags are there. They are Trap flag. Interrupt flag. Direction flag. 2.34.What is the function of overflow flag in 8086? OF is set if there is a arithmetic overflow. 2.35.What is the function of sign flag in 8086? SF is set if MSB of the result is one. 2.36.What is the function of parity flag in 8086? PF is set, if the result has even one's. 2.37.What is the function of zero flag in 8086? ZF is set, zero for non zero results. 2.38.What is the use trap flag in 8086? If trap flag is set, the processor enters the single trap execution. 2.39.What is the use of interrupt flag? If this flag is set, the maskable interrupts are recognized by the CPU, otherwise they are ignored. 2.40.What is the purpose of direction flag in 8086? Setting direction flag (DF) to one causes string instructions to auto decrement. Clearing DF causes instructions auto increment. 2.41.Which bit of 8086 flag registers is used by string instruction? How? 11 th bit in flag register (direction flag) is used by string instruction. Setting DF to one causes string instruction to auto decrement and clearing DF causes string instructions auto increment.
2.42.What is assembly language programming?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 9
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT The program called assembler is used to convert the pnemonics of instructions along with the data into their equivalent object code modules. These object code modules may further be converted into executable code using the linker and loader programs. This type of programming is called assembly language programming.
2.44.What are the disadvantages of machine level programming? The disadvantages of machine level programming are as follows: The process is complicated and time consuming. The changes of error being committed are more at the machine level in handcoding and entering the programmed byte -by-byte into the system. Debugging the program at the machine level is more difficult. The programs are not understood by every one , and the results are not stored in a user friendly form. 2.45.Give any two advantages of assembly language over machine language. The advantages of assembly language over machine language are The programming in assembly language is not so complicated as in machine language, because the function of coding is performed by an assembler. The result may be stored in more user -friendly form. 2.46.In ASM-86 assembles variables type must be declared before using in a program 2.47.Give examples for assembler directives. START, BEGIN, ASUME,DUP, EQU. 2.48.What is a stack? Stack is a top down data structure where elements are accessed using a pointer i.e. implemented using the SS and SP registers. It is a LIFO data segment. 2.49.How is the stack top address calculated? Stack top address is calculated using the contents of SS and SP registers. The contents of stack segment register is shifted by 4 bit position(multiplied by 10 H) and the resulted 20 bit content is added with the 16 -bit value of the stack pointer (SP) register. 2.50.Define string. A string is a series of bytes or words stored in successive memory locations. Often a string consists of a series of ASCII character code. 2.51.What is defining of a macro? The process of signing a label or macro name to the string operation is defining a macro.
2.52.What is nested macro? Defining a macro in another macro or calling a macro from inside a macro is called nested macro. 2.53.What are interrupt service routines? Interrupt service routines are the programs to be executed by interrupting the main program execution of the CPU, after an interrupt request appears. 2.54.How an interrupt can be programmed? While programming for any type of interrupt, the programmer must, either externally or through the program, set the interrupt vector table for that type suitable with the CS and IP addresses of the interrupt service routine. The method of defining the interrupt service routine for software as well as hardware interrupt is same.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 10
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 2.55.What happens if two or more interrupts occurs at the same time? If two or more interrupts occurs at the same time, then highest priority will be serviced first and then the next-highest priority interrupt will be serviced. 2.56.What is the use of CLI and STI instructions? Interrupt flag (IF) can be cleared at any time with the clear interrupt instruction (CLI) and IF can be set at any time with set interrupt instruction(STI). 2.57.What is the hardware interrupts of 8086? Predefined interrupts. User defined hardware interrupts. User defined software interrupts. 2.58.What are the pre defined interrupts in 8086? Division by zero type 0 Single type 1 Non maskable interrupt type2. Break point interrupt type3 Interrupt on over flow type 4. 2.59.What are the interrupt type codes are in 8086? Type 0 to 4 - Predefined interrupts. Type 5-type 31 - Reserved for INTEL for future use. Type 32 to 255 - Maskable interrupts. 2.60.What are the non-maskable interrupts in 8086? Type 0, type 1, type 3. 2.61. User defined software interrupt is used to test ISR for external interrupt . 2.62.Why interrupt flag (IF) is automatically cleared? The interrupt flag (IF) is automatically cleared for two reasons: It prevents a signal on the INTR input from interrupting a higher priority interruptservice procedure in progress. The second reason for automatically disabling the INTR input at the start of an INTR interrupt-service procedure is to make sure that a signal on the INTR input does not cause the 8086 to interrupt itself continuously. The INTR input is activated by a high level. 2.63.User defined software interrupts are initiated through INTR pin. 2.64.What is the use of interrupt? The most common use of interrupt is to relieve the CPU from the burden of polling. 2.65.What are the various addressing modes of 8086? Register addressing modes, immediate addressing mode, direct addressing mode, register indirect addressing mode, based addressing mode, indexed addressing mode, based indexed addressing mode, string addressing mode, port addressing mode, memory addressing mode, relative addressing mode, implied addressing mode. 2.66.What is register-addressing mode? In register addressing mode, the operands (source/destination) are 8086 registers. Ex. MOV CX, BX ; the contents of BX are copied to CX. 2.67.What is direct addressing mode?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 11
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT In direct addressing mode, the 16-bit effective address (EA) is from the displacement field stored in the location following the opcode of the instruction. MOV BX, s3 the contents of memory location offset by S3 from DS to BX. 2.68.What is immediate addressing mode? In immediate addressing mode the data (8-bit or 16-bit) is given as an operand. Ex. MOV CX, 0604H; 0604 H is moved to CX. 2.69.What is memory-addressing mode? In memory addressing mode, the operand will be a memory location and data’s are accessed from that location. 2.70.What is relative addressing mode? In relative addressing mode the operand is specified as an 8bit displacement with respect to PC. JC s3; if carry = 1 then PC is loaded with current PC+ 8 bit value of S# otherwise next instrument is executed. 2.71.What is implied addressing mode? In implied addressing mode, the instructions are without operands. DAA ; decimal adjust AL after addition. 2.72.What is string-addressing mode? Index registers are used in string addressing modes. The string instructions assume S1 to point to first byte or work of the source operand and D! to point to the first byte of word of destination operand. 2.72.What is port-addressing mode? The port-addressing mode is used with standard I/O. Direct and indirect are two types of port addressing mode. In direct port mode, the port number is an 8 bit immediate operand. 2.73.What is indexed addressing mode? In indexed addressing mode, the EA is obtained by adding a displacement value to the contents of BX or BP. The DS and SS are used. 2.74.What is based indexed addressing mode? In based indexed addressing mode, the EA is obtained by adding a base register (BX or BP) an index register (SI or DI) and a displacement. This mode is used in subroutine to address an array on a stack. 2.75.What is based addressing mode? In based addressing mode, the EA is obtained by adding the displacement and the contents of SI or DI. This addressing mode is used to access a single task. 2.76. Explain the instruction IRET. IRET- interrupt return. Used as return instruction at the end of a service routine for both hardware and software interrupts. 2.77.Explain the instruction LOCK. LOCK – Lock bus during next instruction LOCK causes 8086 in maximum mode to assert its bus LOCK signal while following instruction is executed. It is used in multiprocessing. 2.78.List the logical operations possible using 8086? The logical operations in 8086 are NOT, OR, AND, XOR. 2.79.Explain the instruction XLAT.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 12
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT XLAT – this instruction is useful for translating characters from one code to another code. (ASCII to EBCDIC). It is equivalent to MOV AL, (AL) (BX) 2.80.What is meant by procedure? Procedure is nothing but a 'sub program'. To avoid writing the sequence of instructions in the program each time when we need them, we can write the sequence as a separate ' subprogram called a procedure. 2.81.Explain single procedure. To execute the sequence of instruction contained in the procedure, CALL instruction send the 8086 to the starting address of the procedure in memory. A RET instruction at the end of the procedure returns execution to the next instruction in the program. This type of procedure is called as single procedure. 2.82.Explain nested procedure. In this procedure one procedure calls another procedure as part of it’s instruction sequence. 2.83.What are the functions of QS1 and QS0 pins in 8086? QS1 0 0 1 1
QS0 0 1 0 1
Function No operation First byte of opcode from queue Empty the queue. Subsequent byte from queue.
2.84.What is the difference between segment register and general-purpose register? The segment registers are used to store 16 bit segment base addresses of the four memory segments. The general purpose registers are used as the source or destination register during data transfer and computation, as pointers to memory and as counters. 2.85.What is the difference between 8086 and 8088? The external data bus in 8086 is 16-bit and that of 8088 is 8-bit. I.e. the 8088 access memory in words but 8088 access memory in bytes. 3.1. What is meant by multiplexing? If a same pin carries for both address bit and data bit in different time, then it is said to be multiplexed. 3.2.What is meant by minimum mode?
If MN/MX is made to logic 1, then it is referred to minimum mode. Generally minimum mode is opted for the smaller systems by means of single processor.
3.3.What is meant by maximum mode?
If MN/MX is made to logic 1, then it is referred to maximum mode. Generally maximum mode is opted for the larger systems by means of more than one processor. 3.4. What is the advantage of minimum mode operation? It is cheaper, due to the microprocessor’s main role in generation I/O and control signals.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 13
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 3.5. what are the pins gone out, when the 8086 is in maximum mode?
ALE, WR, I/O & M , DT/ R ,
DEN , INTA
3.6. What is the function of ALE? Address latch enable is abbrevated as ALE. Address/ data bus contains a memory or I/O address if ALE is set to be 1. DT/ R , DEN.
3.7.Define DT/ R , DEN . Data transmit / Receive indicates that the data bus is transmitting/ receiving data. Data bus enable activates externals data bus buffers. 3.8. Why ROM and EPROM are more flexible with 8086 microprocessor interfacing? Because the signals A0, BHE are not needed for chip enabling/ select decoding.
3.9. which memory chips are simple in interfacing with 8086 microprocessor? ROM , EPROM. 3.10.what are the fundamental differences between minimum mode and maximum mode operations? Minimum mode Maximum mode Suitable for uniprocessor or single processor Suitable for multiprocseeor systems(more than one system. CPU) Compatibile with smaller systems Compatible with larger systems MN/MX is set to logic 1
MN / MX is set to logic 0
3.11. what is meant by dynamic RAM? A storage device, which needs refreshing once it is switched off by power, to retain the charges.capacitor is the phenomenon for making dynamic RAM. 3.12. what is meant by static RAM? A storage device, which does not need refreshing once it is switched off by power, to retain the charges.flip flop is the phenomenon for making dynamic RAM. 3.13. What instructions does the I/O use? IN and OUT instructions, used by the I/O. 3.14.Define T states? The CPU clock periods of the minimum bus cycle is known as T state. 3.15.What is BIOS? BIOS is the acronym for basic input output system to be useful in reporting the system configuration when the system is turned on. 3.16. List the two types of addressing in I/O? Direct Indirect.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 14
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 3.17.List the advantages of 8086 processor? The bus cycle tells the basic operation of a processor to contact with the external device. 3.18. Definc Macro. Macro is assigned by a group of instruction in a short sequence and which is a type of subroutine. 3.19. What is interrupt? List the types of interrupt? Interrupt is a process of stopping the normal program execution for some time by a special instruction in the program. 3.20. What is assembler directive? The instructions, which contain directions to the assembler are called assembler directives or pseudo operations. 3.21. What is the purpose of assembler directive statements? Assembler directive statements are used to pre assign values, reserve storage, assign names to constants from data structures and terminate a complication. 3.22. what is the use of Assume directive? Assume directive is useful to assume the segment type during execution time. 3.23. What is the use of segment directive? Segment directive is useful in defining a section kof a program or a data entry. 3.24. Define ISR. Interrupt service routine is known as ISR. The starting address is referred as interrupt vector or 3 interrupt pointer. There are upto 256 interrupt vectors are availale in the interrupt vector table. 3.25.define translators. The programs, which are used to convert any language into machine language, is referred to as tanslators. Example for the translators are assemblers, interpreter, compiler. 3.26. What is compiler? A translator or programs which translates the high level language into machine level language as a whole instead of one by one instruction. 3.27.Define procedure. Procedure is defined as a SUBPROGRAM to use a particular instructions in sequence in a program and so that, same part of instructions can be utilized by many times without writing each and every time the programmers need that part. Procedure is otherwise inner program of a main program. 3.28.Give the advantages of using procedure. The main advantage of procedure is the modularity property, which is meant for at any stage in the program, the sub program can be changed according tko the user’s wish. 3.29. Why procedure is needed? For a programmer, it is always best and better to write a program in a shortest length rather than longer, when a particular instructions in the program are repetitively coming. In such times those repeating instructions may be separated by a variable name called procedure, and the same could be called at any time by the programmer.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 15
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 3.30. Distinguish between procedure and macros. MACROS Ashort sequenced group of instruction by a name. Macros can be accessed during assembly Parameters passed as part of a statement. MACRO does not need stack Dummy variable are available. Does not require no overhead time during the execution More memory operation
PROCEDURE A long sequenced group of instruction by a name. Procedure can be accessed by CALL and RET mechanism during program execution. Parameters passed in registers or memory locations Procedure need stack Dummy variables are not available Does need overhead time to call the procedure Less memory opoeration
3.31 Define interpreter. A translator or programs which translate each statement of a high level language in to machine level language. Interpreter translates and executes the instructions then and there. It gives a faster response, which is very much useful in time sharing processes. 3.32. define multiplexing. Multiplexing is the process of sharing the common bus to transmit more than one kind of operation, at different instant of time. 3.33.Define demultiplexing. Demultiplexing is the process of retrieving the information from the multiplexed bus. 3.34.For what purpose QS1, QS2 signals are used in 8086? Qs1 Qs2 Meaning 0 0 Nothing happens 0 1 Opcode first byte from queue 1 0 Queue is empty 1 1 Subsequent byte from queue.
3.35. List the possibilities for S0, S1, S2 control signals in 8086. S0 0 0 0 0 1 1 1 1
S1 0 0 1 1 0 0 1 1
S2 0 1 0 1 0 1 0 1
Machine cycles Interrupt acknowledge Code access Halt Write I/O port Read I/O port Memory read Memory write Passive- inactive.
3.36. Define coprocessor. A processor, which can be connected with the mainprocessor in a parallel manner, in order to do some complex problems, referred to as co-processor. 3.37. Give the importance of co-processor. A co-processor is normally designed specially to meet the difficult situation in amnipulation and solving the complex arithmetic calculations such as computing the square root of a number, tangent of a number or the logarithmic value of a number, with rapid speed.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 16
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 3.38. List the advantages of co-processor. Speed operation Can solve complex problems Can be acted as such processor 3.39. List the applications of a co-processor. Co-processor is used in the places, where complex manipulations and typical arithmetic operations to be solved out. Eg. Distributed systems, research areas like in data acqusition. 3.40. list the instruction format which varies from one byte to six byte in length. Instruction format meaning 1 byte instruction Opcode(01) operand + register 2 byte instruction Register to register(or) register to memory 3 byte instruction Immediate operand(or) register to register 4 byte instruction Register to memory with 16 bit displacement 5 byte instruction Immediate operand to memory (8 bit displacement. 6 byte instruction Immediate operand to memory (16 bit displacement) 3.41.List the advantages of the multiprocessor configurations. Improves cost/performance ratio of the system. Several processors may be combined to fit the needs of an application wile avoiding the expense of the unneeded capabilities of a centralized system. Tasks are divided among modules if failure occurs, it is easier and cheaper to find and replace the malfunctioning processor than replacing the failing part of the complex processor. 3.42.How multiprocessor systems are implemented? Multiprocessor systems are implemented using one of the two basic architectures: closely coupled architecture and loosely coupled architecture. The systems using these architectures are known as closely coupled system and loosely coupled system respectively. 3.43. When we are using closely coupled systmes? When high-speed or real processing is desired, closely coupled systems(CCS) may be used. There are two models of a CCS: CCS without private cache. CCS with private cache. 3.44. When we are using loosely coupled systems? In loosely coupled systems, each processor has a set of input-output devices and a large local memory where it accesses most of the instructions and data. The processor, its local memory and input output interfaces are together called computer module. Processes which execute on different computer modules communicate by exchanging messages through a Message transfer system. The coupling in such a system is very loose. Hence such systems are also referred to as a distributed systems. These systems are usually efficient when the interactions between tasks are minimal. 3.45. list the advantages of loosely coupled system. Better system throughput by having more than one processor. Each processor may have a local bus to access local memory or I/O devices so that a greater degree of parallel processing can be achieved. System structure is more flexible. As the system consists of different modules, one can easily add or remove modules to change the system configuration without affecting the other modules in the system A failure in one module normally does not cause a breakdown of the entire system. The faulty module can be detected and replaced.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 17
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 3.46. list the factors that affect the performance of a bus. Data width. The bus-arbitration algorithm. Centralization or distribution of control. Synchronization of data transmission Error detection. 3.47.What does network topology refer? Network topology is an important part of how a network is structured. Betwork topology refers to how the computers are attached to one another physically. 3.48.list the basic network topology. The bus topology The star and The star-wired ring(token-ring) 3.49. Define an assembler. It is a translator, to translate the assembly language into machine language. Users need to study thoroughly. The execution time is less. 3.50. what is the difference between a compiler and an interpreter? Compiler Execution time is less Translation by page by page A type of translator to translate the high level language into machine level language
Interpreter Execution time is more Translation by line by line A type of translator to translate the high level language into machine level language.
Interfacing Devices 4.1. Give the basic ways of getting data into memory. We have three basic ways to get data into or out of a memory. They are called programmable I/O interrupt driven I/O, and direct memory access(DMA). 4.2.What is a programmable device? The programmable device is a combination of many devices on a single chip. The biggest advantages of programmable devices are that they can be set up to perform specific functions by writing a code in its internal register. 4.3.What is PROGRAMMED I/O ? Programmed I/O uses instructions to get data into or out of a CPU. To correctly time the data transfers, programmed I/O, relies on clock timing or on hand shaking (asynchronous). 4.4. What is an INTERRUPT I/O? A disadvantage of programmed I/O is that, the computer needs to check the status bit by waiting in a loop. This type of I/O transfer is dependent on the speed of the external device. For a slow device, this waiting may slow down the computer’s capability of processing other data. The interrupt I/O technique is efficient in this type of situation. 4.5.What is a serial I/O? The 8085 mp is a parallel device. It transfers eight bits of data simultaneously over eight data lines. This is the parallel I/O mode. However, in many situations, the parallel I/O mode is either
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 18
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT impractical or impossible. For example, parallel data communication over a long distance can become very expensive. Similarly devices such as a CRT terminal or a cassette tape are not designed for parallel I/O . In these situations, the serial I/O mode is used, whereby one bit at a time is transferred over a single line. 4.6.What is serial data transfer? Serial data transfer is commonly used whenever digital information must Be relayed over a relatively long distance. The data are often transferred through telephone wire or over the airwaves via form of radio carriers. The main reason for long distance serial transfer is the reduction in the number of wires required to carry the information. 4.7.What is parallel data transfer? Parallel transmission of data is used for short distance where the speed of information transfer is critical. This form of data communication is found in never type of computer peripheral equipment with transfer speeds upto one million character per second. 4.8.Compare serial data transfer and parallel data transfer? Parallel data transfer In this mode all bits of a word are transmitted at a time.
Serial data transfer In this mode only one bit of a word is transmitted at a time
Hardware required is complicated Data transfer rate is very high It is expensive For short distance communication parallel data transfer is used
Hardware required is simple Data transfer rate is very slow It is cheap For long distance communication serial data transfer is used.
4.9.Give the basic Concepts of serial I/O: The basic concepts concerning the serial I/O mode can be classified into the following categories. a. Interfacing requirements. b. Alphanumeric codes. c. Transmission format. d. Error checks in data communication. e. Data communication over telephone lines. f. Standards in serial I/O. g. Software Vs. programmable hard ware approaches. 4.10Give the transmission format of communication. A transmission format is concerned with issues such as synchronization, direction of data flow, speed errors and medium of transmission (telephone lines).
4.11.How the serial data can be transmitted? Serial data are transferred in either the asynchronous or synchronous form. 4.12.What is asynchronous data transmission? In asynchronous transmission, sometimes referred to as start-stop transmission, start and stop bit intervals are transmitted with each byte of information for the purpose of synchronization. No clock wave form is transmitted with asynchronous data, since the start and stop bits are used for synchronization. 4.13.What is Baud rate? The speed at which serial data are transferred is referred to as the baud rate. The baud rate is arrived at by taking the reciprocal of the bit time interval for most application.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 19
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 4.14. Compare synchronous and asynchronous data transmission. SYNCHRONOUS DATA TRANSMISIO 1. IN this transmission, both transmitted and receiver is synchronous, with the common clock signals. 2. in this mode, the framing bits are sent along with block. 3. framing information is SIM character. 4. the speed of the synchronous data transmission is higher than 20k bauds. 5. it is always implemented through hardware. 6. it is also called clock oriented transmission be cause in this transmitted constantly
ASYNCHRONUS DATA TRANSMISSIN In this transmission, both transmitter and receiver are not synchronous with common clock (clk) they use separate clock signals. Framing bits are sent along with each character(at the beginning and end of the character) Framing information is start and stop bits. The speed of the asynchronous data transmission is less than 20k bauds.
It is implemented through software. It is also called character oriented. transmission because only one character is transmitted at a time in this mode.
4.15.What is meant by framing? When no data are being transmitted, a receiver stays high at logic 1. called mask; logic 0 is called space. Transmission begins two stop bits(high) this is also known as framing. 4.16.What is meant by simplex transmission? Data is transmitted in only one direction. A typical example is transmission from a microcomputer to a printer. 4.17.What is meant by In duplex transmission?. Data flow in both directions. However if the transmission goes one ways at a time it Is called half duplex. If it goes both ways simultaneously. It is called full duplex. Generally transmission between two computers or between a computer and a terminal is full duplex. 4.18.What will happen if the transmission of signals consist of errors? During transmission, various types of errors can occur. For example, data bits may change because of noise or can be misunderstood by the receiver because of differences in receiver and transmitter clocks. These errors need to be checked therefore additional information for error checking is sent during the transmission. 4.19.Give the methods of checking errors Three methods are generally in common practice they are parity check, check sum, and cyclic redundancy check. 4.20.What is CYCLIC REDUNDANCY CHECK (CRC)? CRC technique is commonly used when data are transferred from and to a floppy disk and in a synchronous data communication. This technique is based on mathematical relationships of polynomials. A stream of data can be represented as a polynomial that is divided by a constant polynomial and the remainder, unique to that set of bits, is generated. The remainder is sent out as a check for errors. The receiver checks the remainder to detect the error in the transmission. 4.21.What is MODEM? A modem (modulator/demodulator) is a circuit that translates digital data into audio tone frequencies for transmission over the telephone lines and converts audio frequencies into digital data for reception. At the present time, modems are available that can transfer data at rates of 3002400bps (bits per second).
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 20
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 4.22.Give the types of modulating technique? Generally two types of modulation techniques are used. Frequency shift keying (FSK) for low speed modems and Phase shift Keying (PSK) for high speed modems. 4.23.Explain the terms (I) DCE (ii) DTE : (i) DCE: Modems and other equipment used to send serial data over long distances are known as data communication equipment (DCE). (ii) DTE: The terminals and computers that are sending (or) receiving the serial data are referred to as data terminal equipment (or) DTE. 4.24.What is the use of UART? UART is used to perform asynchronous communication. It is often referred to as universal asynchronous receiver transmitter or (UART). 4.25.What is the use of USART? USART is a device, which can be programmed to do either asynchronous or synchronous communication. It is often called a universal synchronous asynchronous receiver transmitter (or) USART. 4.26.What are the functions performed by INTEL 8251A? The INTEL 8251A is used for converting parallel data to serial or vice versa. The data transmission or reception can either asynchronously or synchronously. The 8251A can be used to interface MODEM and establish serial communication through MODEM over telephone lines. 4.27.What are the control words of 8251 A? The control words of 8251 A Mode word and command word. 4.28.Give the function of control words of 8251A The mode word informs 8251 about the baud rate, character length, parity and stop bits. The command word can be send to enable the data transmission and / or reception. 4.29.What are the information that can be obtained from the status word of 8251? The status word can read by the CPU to check the readiness of the transmitter or receiver and to check the character synchronization in synchronous reception can read. It also provides information regarding various errors in the data received. The various error conditions that can be checked from the status word are parity error, overrun error and framing error. 4.30What is meant by double buffered? Double buffered means that one character can be loaded into a holding buffer while another character is being shifted out of the actual transmit shift register. 4.31.What are the clocks that are required by shift registers for transmitting and receiving data in 8251A? The clocks are ____ TXC Transmitter shift
______ RxC
Receiver shift
4.32.How can we initialize the 8251A? 8251A is initialized by first sending a mode word and then a command word to the control register address for the device. 4.33.What is a break character in 8251A?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 21
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT A 1 in bit D3 of the command word causes the 8251A to output a character of all 0’s which is called as break character. 4.34.How serial data signals are sent over long distance? Serial data are sent over long distance by means of RS232 C standard. 4.35.What is meant by null modem? Null-modem is an adapter with two connectors so that signals cross over. This cross over connection is often called a null modem. By this connection we can connect two pieces of equipment. 4.36.What are the methods of parallel data transfer? Methods of parallel data transfer are: Simple input and output. Simple strobe I/O. Single handshake I/O. Double handshake data transfer. 4.37.What is RS-232C standard? The RS-232C is a serial bus consisting of a maximum of 25 signals. This bus signals are standardized by EIA (Electronics Industries Association), USA and adopted by IEEE. Usually the first 9-signals are sufficient for most of the serial data transmission. The RS-232C serial bus is usually terminated using either a 9-pin connector or a 25-pin connector. 4.38.What voltage levels are used in RS-232C communication standard? The voltage levels for all RS-232 signals are, Logic low = -3V to –15V under load (-25V on no load) Logic High = +3V to +15V under load (+25V on no load). 4.39.How the RS-232C serial bus is interfaced to TTL logic device? The RS-232C signal voltage levels are not compatible with TTL logic levels. Hence for interfacing TTL devices to RS-232C serial bus, level converters are used. The popularly used level converters are MC 1488 & MC1489 or MAX 232. 4.40.What is a port? The port is buffered I/C which is used to hold the data transmitted from the microprocessor to I/O device or vice-versa. 4.41.What are the different methods of interfacing I/O interfacing I/O devices to 8085 based system? There are two methods of interfacing I/O devices to 8085 system. They are memory mapping of I/O device and standard I/O mapping. 4.42.What is 8255A? 8255A is a widely used programmable parallel I/O device. It can be programmed to transfer data under various conditions, for simple I/O to interrupt I/O. it is flexible, versatile and economical (when multiple I/O ports are required). 4.43.What are the two modes of operation of 8255? Two modes of operation of 8255 are I/O mode BSR mode. 4.44.What are the internal devices of 8255? The internal devices of 8255 are port-A, port –B, port C. the ports can be programmed for either input or output function in different operating modes. 4.45.What are the operating modes of port –A of 8255?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 22
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT The port-A of 8255 can be programmed to work in any one of the following operating modes as input or output port Mode-0: Simple I/O port. Mode-1: Handshake I/O port. Mode-2: Bi directional I/O port. 4.46.What are the functions performed by port-C of 8255? The port-C pins are used for handshake signals. Port-C can be used as an 8-bit parallel I/O port in mode-0 It can be used as two numbers of 4-bit parallel port in mode-0 The individual pins of port-C can be set or reset for various control applications. 4.47.The 8279 is a programmable Keyboard/display interface. 4.48.List the major sections of the 8279 keyboard interface. Key board section. Scan section. Display section. CPU interface section. 4.49.What are the three modes of keyboard operation? Scanned keyboard mode. Scanned sensor matrix mode. Strobbed input mode. 4.50.What is the disadvantage in keyboard interfacing using ports? The disadvantage in using ports for 7-segment LED interfacing is that most of the processor time is utilized for display interfacing. 4.51.What is the advantage in using 8279 for keyboard and display interfacing? When 8279 is used for keyboard and display interfacing, it takes care of all task involved in keyboard scanning and display refreshing. Hence the processor is relieved from the task of keyboard scanning, debouncing, keyboard generation & display refreshing and the processor time can be more effectively used for computing. 4.52.What are the different modes of operation of 8279? The modes of operation of 8279 are Input (keyboard) modes. Output (display) modes. 4.53.Explain the output modes of 8279. It has two output modes. They are Display scan. Display entry. 4.54.List the important features of 8279. Simultaneous keyboard display operations Scanned sensor mode and scanned keyboard mode. 8-Character keyboard FIFO. Strobbed input entry mode. 2-Key lock out or N-Key roll over with contact debounce. 4.55.What is the purpose of 8279? Intel’s 9279 is a general purpose keyboard display controller that simultaneously drives the display of a system and interfaces a keyboard with CPU leaving it free for its routine task. 4.56.What is the disadvantage of decoded scan mode?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 23
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT The disadvantage of the decoded scan is that the number of combinations is only 4. Hence only 4 rows can be used in the case of keyboard or only 4 digits can be switched ON in the case of the display.
4.57.What is the function of scan counter? The scan counter has two modes to scan the key matrix and refresh the display. In the encoded mode the counter provides binary counter that is to be externally decoded to provide the scan lines for keyboard and display. In the decoded scan mode, the counter internally decodes the least significant 2 bits and provides a decoded 1 out of 4 scan SL0-SL3. The keyboard and display both are in the same mode at a time. 4.58.What is the difference in programming the 8279 for encoded scan and decoded scan? If the 8279 Is programmed for decoded scan then the output of scan lines will be decoded output if it is programmed for encoded scan then the output of scan lines will be binary count. In encoded mode, an external decoder should be used to decode the scan lines. 4.59.What information is conveyed by the most significant 3 bits of control word of 8279 keyboard display controller IC?
D7 0
D6 0
D5 1
0 0 0 1 1
0 1 1 0 0
1 0 1 0 1
1 1
1 1
0 1
Function Keyboard/display mode set Program clock Read FIFO Read display RAM Write display RAM Display write inhibit/blanking Clear End interrupt
4.60.What is debouncing? When a key is pressed it bounces for a short time. If a key code is generated immediately after sensing a key actuation, then the processor will generate the same key code a number of times.( A Key typically bounces for 10 to 20 msec). Hence the processor has to wait for the key bounces to settle before reading the key code. This process is called keyboard debouncing. 4.61.What are the task involved in keyboard interface? The task involved in keyboard interfacing are sensing a key actuation, Debouncing the key and generating key codes (Debouncing the key). These task are performed by software, if the keyboard is interfaced through ports and they are performed by hardware if the keyboard is interfaced through 8279. 4.62.What is scanning in keyboard and what is scan time? In display devices, the process of sending display codes to 7-segment LED’s to display the LED’s one by one is called scanning( or multiplexed display). The scan time is the time taken to display all the 7-segment LED’s one by one, starting from first LED and coming back to the first LED again. 4.63.What is scanning in display and what is scan time?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 24
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT The process of sending a zero to each row of a keyboard matrix and reading the columns for key actuation is called scanning. The scan time is the time taken by the processor to scan all the rows one by one starting from first row and coming back to the first row again. 4.64.What are the different scan modes of 8279? The different scan modes of 8279 are decoded scan and encoded scan. In the decoded scan mode, the output of scan lines will be similar to a 2-to-4. 4.65.How many words of RAM available in the display controller of 8279? 16 words of RAM. 4.66.What type of signals are generated on the SL0 to SL3 scan lines 8279 keyboard /display controller IC when it is programmed to operate in the decoded mode? In the decoded mode, the SL outputs are active lows and only one of the outputs is low at any given instants. The decoded outputs repeat the pattern 1110,1101,1011, and 0111. 4.67.How does the 8279 keyboard display controller IC informs of the CPU about the availability of data in its FIFO RAM? The 8279 inform the CPU about the availability of data in its FIFO RAM by using its interrupt request (IRQ) line. When a key is pressed the bit code is loaded into the first location of the FIFO RAM. The interrupt request (IRQ) is raised to inform the CPU about the availability of data is FIFO RAM. 4.68.How many 7-segment displays can be connected to 8279? Sixteen 7-segment displays can be connected to 8279. 4.69.What is the role of interrupt service routine? For each interrupt, the processor has to perform a specific job. An interrupt service routine has been developed in order to perform the operations required for a device that is interrupting the processor. 4.70.Why 8259A is designed? 8259A is designed to handle a number of interrupts at a time along with their type and priorities. It is compatible with 8-bit as well as 16-bit processors. 4.71.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. 4.72.For what purpose programmable interrupt controller( PIC) is used? PIC is used for data transfer between the peripheral and the microprocessor. 4.73.What does servicing of an interrupt mean? The execution of interrupt service is called servicing of interrupt. 4.74.Give the types of interrupts. Two types of interrupts are there. They are Software interrupts. Hardware interrupts. 4.75.What are software interrupts? The software interrupts are program instructions. These instructions are inserted at desired locations in a program. While running a program, if a software interrupt instruction is encountered then the processor executes an interrupt service routine. 4.76.Software interrupts are program instructions.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 25
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 4.77.The software interrupts of 8085 are vectored interrupts. 4.78.What is hardware interrupt? If an interrupt is initiated in a processor by an appropriate signal at the interrupt pin, then the interrupt is called hardware interrupt. 4.79.How hardware interrupts are initiated? An external device initiates the Hardware Interrupts, by placing an appropriate signal at the interrupt pin of the processor. The acceptance of the interrupt is acknowledged by sending an ______ signal to INTA The interrupted device. 4.80.The INTR is general interrupt request. 4.81.All the hardware interrupts, except TRAP are disabled when the processor is resetted. 4.82.What is vectoring? Vectoring is the process of generating the address of interrupt service routine to be loaded in program counter. 4.83..How the vector addresses are generated for hardware interrupts of 8085? For hardware interrupts TRAP, RST7.5, RST6.5, and RST5.5 the vector the processor itself generates addresses. These addresses are fixed by the manufacturer. 4.84.How vector addresses are generated for software interrupts of 8085? For software interrupts RST0 to RST7 , the vector addresses are generated internal to the processor. Manufacturer fixes these vector addresses. 4.85.What is polling? Polling is a scheme or an algorithm to identify the devices interrupting the processor. Polling is employed when multiple devices interrupt the processor through one interrupt pin of the processor. 4.86.What are the different types of polling? The polling can be classified into software polling and hardware polling. In software polling, the entire polling process is governed by a program. In hardware polling, the hardware takes care of checking the status of interrupting devices and allowing one by one to the processor. 4.87.How to check the interrupt request pending status of 8085 interrupt? The pending status of an 8085 interrupt can be obtained by executing RIM instruction. When RIM instruction is executed an 8-bit data is loaded in accumulator. The bits D4,D5,and D6 will give the pending status of RST5.5, RST6.5 and RST7.5 respectively. If this bit is 1 then the interrupt is pending., otherwise it is not pending. 4.88.How to check whether an 8085 interrupt is masked or not? The masking status of an 8085 interrupt can be obtained by executing RIM instruction. When RIM instruction is executed an 8-bit data is loaded in accumulator. The bits D0,D1, andD2 will give the masking status of RST5.5, RST6.5 and RST7.5 respectively. If this bit is 1 then the corresponding bit is masked, otherwise it is not unmasked. 4.89.What is the need for interrupt controller? The interrupt controller is employed to expand the interrupt inputs. It can handle the interrupt request from various devices and allow one by one to the processor.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 26
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 4.90.What does masking mean? Masking is preventing the interrupt from disturbing the program. 4.91.Give some examples for maskable interrupts? The interrupts RST7.5, RST6.5, RST5.5 are some of the examples of maskable interrupts. 4.92.Explain how a microprocessor services an interrupt request. When the processor recognizes an interrupt, it saves the processor status in stack, then it calls and executes an interrupt service routine (ISR). At the end of ISR, it restores the processor status and program control is transferred to main program. 4.93.Give the functional blocks of 8259. 8259 has 8 functional blocks. They are control logic, Read/Write logic, data bus buffer, (Interrupt request register (IRR), In service Register (ISR), Interrupt mask register (IMR), Priority resolver, and cascade buffer. 4.94.List some of the features of INTEL 8259. (i) It manages eight-interrupt request. (ii) The interrupt vector addresses are programmable. (iii) The priorities of interrupts are programmable. (iv) The interrupt can be masked or unmasked individually. (v) The 8259 provides the status of pending interrupts, masked interrupts and interrupt being services. (vi) It is programmed to work with either 8085 or 8086 processor. 4.95.What are the two command words of 8259A? The two command words of 8259A are: (i) Initialization command words (ICW’s). (ii) Operational command words (OCWs). 4.96.What is initialization command word in 8259A? Before it starts functioning, writing two or four command words into respective command word registers must initialize the 8259A. This is called as initialization command word (ICWs). 4.97.What are operation command word registers and operation command words of 8259A? The different modes of operation of 8259A can be selected by programming i.e. writing three internal registers called as operation command word registers. The data written into the registers is called as operation command words. 4.98.What are the different modes of operation of 8259A? (i) Fully nested mode. (ii) End of interrupt (EOI) (iii) Automatic rotation. (iv) Specific rotation. (v) Special mask mode. (vi) Edge and level triggered mode. 4.99.What is Interrupt request register (IRR)? The interrupts at IRQ input lines are handled by interrupt request register internally. IRR stores all the interrupt requests in it in the order to serve them one by one on the priority basis. 4.100.What is In-service register (ISR)? This stores all the interrupt requests those are being served, i.e. ISR keeps a track of the requests being served. 4.101.What is Interrupt Mask Register (IMR)?
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 27
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT This register stores the bits required to mask the interrupt inputs. IMR operates on IRR at the direction of priority resolver. 4.102.What is DMA technique? DMA is an input technique commonly used for high speed data transfer between systems memory and external device. In DMA, the MPU releases the control of buses to a device called DMA controller. The controller manages data transfer between memory and a peripheral under its control, by passing the microprocessor. 4.103.What are the functions of DMA controllers? (i) Interface the MPU buses to the peripheral device. (ii) Generate DMA request signal. (iii) Control the address bus and the control lines necessary for data transfer in response to DMA grant signal from the microprocessor. (iv) Hold the information about the number of bytes to be transferred along with the starting address of the data in memory. 4.104.What is the purpose of IC8257? IC-8257 is a programmable 4 channel , DMA controller compatible with Intel 8085 and Z-80 microprocessor. By using this device four peripherals can request DMA data transfer simultaneously. It provides all the facilities for management of the DMA system for DMA data transfer. 4.105.What is the purpose of count register in IC 8257? The count register is used to store the number of bytes to be transferred. 4.106.What is the use of DMA address in 8257? The DMA address register is used to store the number of bytes to be transferred. 4.107.Name the four major blocks of 8257 DMA controller. (i) 4-DMA channels. (ii) Read/write logic. (iii) Control logic to manage data transfer. (iv) Data bus buffer. 4.108What are the modes of operation of DMA controller IC-8257? (i) slave mode operation (ii) master mode operation. 4.109What is the use of ready input of DMA controller? The ready input of the DMA controller IC8257 is used by slow memory or input devices. 4.110.What are the requirements of 8257 to perform as processor? (i) Data bus. (ii) Address bus. (iii) Read/Write control signal. (iv) Control signals to disable its role as a peripheral and to enable its role as a processor. 4.111.What is the use of address enable (AEN) pin of 8257 DMA controller? When AEN is high, it indicates that DMA operation is being executed. AEN output is used to disable the selection of an input device. 4.112.What is the use of terminal count (TC) output pin of 8257 DMA controller? When terminal (TC) output pin is high (one level output), it indicates that the terminal count register count is zero. That is a terminal count has been reached and data transfer using DMA is completed.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 28
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 4.113.The DMA controller selects the input device used during a DMA transfer by which pin? DACK pin. 4.114.What is the function of DMA address register? (8257)? The function of this register is to store the address of the starting memory location, which will be accessed by the DMA channel.
4.115.What is burst transfer? If more than one-channel requests services simultaneously the transfer is called as burst transfer. 4.116.What are the different priority schemes of 8257? The different priority schemes are: (i) Fixed priority scheme. (ii) Rotating priority scheme. 4.117.Explain the fixed priority scheme. In fixed priority scheme, each device connected to a channel is assigned with a fixed priority. DRQ3 has the lowest priority followed by DRQ2 and DRQ1 with next higher priorities, while DRQ0 has the highest priority. 4.118.Explain the rotating priority scheme? In rotating priority scheme, the priorities assigned to the channels are not fixed. 4.119.Give the types of DMA data transfer schemes? (i) Cycle stealing DMA. (ii) Block or burst mode DMA. (iii) Demand transfer mode DMA. 4.120.What is the data transfer scheme and what are its types? The data transfer scheme refers to the method of data transfer between the processor and peripheral devices.
Data transfer
Programmed data transfer Synchronous Asynchronous Interrupt driven
Direct memory access Cycle stealing Block transfer Demand transfer
4.121.What is the function of mode set register? The function of mode set register is to enable the DMA channels individually and also to set the various modes of operation. A DMA should not enable till the DMA address register and the terminal count register contain valid information, otherwise, an wanted DMA request may initiate a DMA cycle, probably destroying valid memory data. 4.122.What are the major differences between 8253 and 8254 devices? The major differences are as follows:
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 29
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT The maximum input clock frequency for 8253 is 2.6MHz; the maximum clock frequency for the 8254 is 8 MHz. The maximum clock frequency for the 8254 is 8 MHz. The 8254 has a read back feature which allows you to latch the count in all the counters and the status of the counter at any point. The 8253 does not have this read-back feature. 4.125.How can 8254 be programmed? In a programmable timer/counter count bytes and control bytes are sent to the device. Then the device can start and stop according to the program. 4.126.How can we initialize the 8254? 8254 is initialized by sending a control word to the control register and also by sending the starting count to each of the counter registers. 4.127.What is the basic principle of a ONE-SHOT? The basic principle of a ONE-SHOT is that when a signal is applied to the trigger input of the device, it’s output will be asserted. After a fixed amount of time the output will automatically return to it’s unasserted state. 4.128.Explain the operation of 8254 in mode3. If an 8254 counter is programmed for mode3 and an even number is written to It’s count register the waveform on the out pin will be a square wave. If an odd number is written to a counter programmed mode 3, the output waveform will be high for one more clock cycle then it is low, so the waveform will not be quite symmetrical.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 30
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 8051 Microcontroller 5.1. What is a microcontroller? Microcontroller is nothing but a small range of microprocessor, which consists of input unit, output unit, and memory unit in a single chip. Microcontroller finds many applications in automation, because its architecture and built-in I/O capabilities. Microcontroller incorporates all the features that are found in microprocessor with the added Features of inbuilt ROM, RAM, Parallel I/O, Serial I/O, Counters and Clock circuit to make a microcomputer system on its own.
5.2. List some of the features of 8051. The 8051 microcontroller is an 8-bit microcontroller initially developed by INTEL in the year 1980. The 8051 microcontroller has multiplication and division instructions. The 8051 microcontroller has 64 K program memory and 64K data memory. The 8051 microcontroller was designed by HMOS technology. 5.3.Draw the generalized block diagram of 8051 microcontroller.
I/O CPU
ADC
MEMORY (RAM, EPROM, REGISTERS)
TIMER (WATCH DOG)
DAC
TIMERS/ COUNTERS INTERRUPT
5.4. List the Hardware Resources of 8051 microcontroller Eight bit CPU with registers A(accumulator) and B. Sixteen bit program counter (PC) and data pointer (DPTR). Eight bit program status word (PSW). Eight bit stack pointer(SP). Internal ROM or EP-ROM of 4k byte. 32 I/O pins arranged as four 8 bits ports as P0 to P3 Internal RAM of 128 bytes.. Two 16 bit timer/counters:T0 and T1. Full duplex Serial data receiver/transmitter: SBUF. Two external and three internal interrupt sources. Oscillator and clock circuits.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 31
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 5.5.List the addressing modes of 8051 microcontroller ? Register addressing. Direct addressing Register indirect addressing Immediate addressing Index register cum base register, addressing.
5.6.List the applications of 8051 microcontroller. Control applications: in controller systems, automation purposed where in office automation, home automation and industrial automation 8051 microcontrollers are very much used. Embedded applications: since it is single chip controller, 8051 microcontrollers are much useful in all embedded applications like real time, wireless modes. Network applications: In the area of wireless networking including LAN, MAN, and WAN fields. Common applications: used in the delay subroutine, LED display, relays, measurement of frequency, reactance, voltage current, and resistance, measurement of temperature and control, strain management, interfacing with other electronic components. 5.7. List the advantages of general purpose registers/ register banks. Simply in using for the programmers. Default power setup. 5.8.Discus about register bank: A register bank consists of 8 registers from R0 through R7 are situated in the on-chip RAM. There are 4 register banks available in 8051 microcontroller with 8 bit length, containing 32 registers. At a time, one register bank can be selected. For writing program, 32 registers are to be used. 5.9. Discuss about special function registers(SFR) A storage device with 128 bytes of 0n-chip RAM locations from 80H to 0FFH to control the status of 8051 instructions. Special function registers are bit addressable and byte addressable. They are the upper 128 bytes (80-FFH) of the internal data memory. The SFR and RAM have the same address space and different addressing modes. 5.10. List the CPU registers and SFR in 8051 microcontroller. General purpose registers Stack pointer(SP)-8 bits Data pointer (DPTR) – 16 bits. Special function registers (SFR). 5.10. What is PSW? A storage device having 8 bit length which contains the status of the program information. It consists of 4 types of flags namely carry, auxilary carry, overflow and parity flags. PSW is bit addressable register
C MSB
AC
F0
RS1
RS0
0V
-
P LSB
Bit 7- CY- carry flag Bit 6- AC- auxiliary flag Bit 5- F0- use flag 0 Bit 4- RS1- register bank select bit 1 Bit 3- RS0- register bank select bit 0
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 32
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT Bit 2- 0V- overflow flag Bit 1- reserved for future use Bit 0- P- parity flag
Based on the type of operations involved the instruction sets are classified. There are five kinds of instruction set in 8051 microcontroller as given below Data transfer instruction. Arithmetic instruction. Logical instruction. Boolean variable instruction. Control transfer instructions. 5.11.List the parts of instruction format. Mnemonic Destination Source. 5.12. write the types of memory in 8051 microcontroller. There are two types of memory for 8051 microcontroller. They are namely Internal data memory (256 bytes) External data memory (64 K) 5.13.List the 8051 I/O ports. 8051 has four 8 bit I/O ports that are used either as four 8 bit ports or each port pin addressed individually. They are defined as Quasi bidirectional port (Port 1,2,3) True bidirectional port (Port 0)
5.14. Distinguish between Quasi bidirectional port and True bidirectional port. Quasi bidirectional port Low impedance input Does not have the add/ data control Have fixed internal pull up registers
True bidirectional port High impedance input Has address/data control Do not have pull up registers
5.15.Discuss about serial I/O port in 8051. Serial I/O port provides communication with external peripheral devices and MODEM (modulator demodulator) in the synchronous and asynchronous modes. 5.16.List the signal responsible for serial communication: Tx D Transmit data Rx D Receive data SBUF Serial buffer SCON Serial port control SADDR Serial address SADEN Serial address enable. 5.17. Give the serial port control ( SCON) configuration
FE/SMO SM1 7 6
SM2 5
REN 4
TB8 3
RB8 2
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
T1 1
R1 0 Page 33
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 5.18.Distinguish microprocessor and microcontroller: (M/J 2007) Microprocessor Microcontroller It has few bit handling instructions It has more bit handling instructions Memory, I.O devices do not come into the I/O devices, memory units have been come into a microprocessor single chip. They may be connnected externally Microcontroller is a small range of microprocessor only. It has more op-codes It has less op-codes so progrmming is little bit easy when compared to microprocessor. 5.19.What is the need of ROM chips in microprocessor? ROM chips are needed because of the execution of data by the instruction it has. 5.20. List some differences between main and secondary memory. Main memory Secondary memory RAM,ROM are the primary memory devices Floppy disc/Hard disk are the secondary memory devices It is a volatile one It is non-volatile one Limited memory capacity Unlimited memory capacity 5.21.What do you mean by volatile? The data can not be retained, even if the power is turned off, then it is called as VOLATILE. 5.22.What do you mean by non-volatile/ The data can be retained, even if the power is turned off, then it is called as NON-VOLATILE. Floppy disc, hard disc are some of the non-volatile devices (secondary storage devices). 5.23.Distinguish RAM & ROM. RAM It is a Read/Write memory It is high speed memory It is volatile in nature
ROM It is a Read only momory It is low speed memory It is non-volatile in nature.
5.24. List the interrupts of 8051 microcontrollers. (ECE-M/J 2007,CSE M/J 2O07) Two interrupts are triggered by external signals provided by the circuitry that is connected to pins INTO bar/ INTI bar. 5.25. When 8051 is reset, all interrupt sources are disabled. How to enable these interrupts? Each of the interrupt 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. 5.26.What are nested interrupts? The 8051 is executing an ISR for servicing an interrupt and another interrupt occurs. If the new coming interrupt is high priority interrupt ,then only it can interrupt the previously occurred low-priority interrupt. These are called nested interrupts. 5.27. Write short notes on interrupt priority. Bit set to 1 gives the accompanying interrupt a high priority , a 0 assigns low priority, interrupts with the highest priority can interrupt another interrupt with a lower priority; the lower priority interrupt continues after the higher is finished. If two interrupts with the same priority occur at the same time, them they have the following ranking: 1.IEO 2.TFO 3.IE1 4.TFI 5.Serial=RI or TFI.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 34
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 5.28) What are the usage of Timer and Converter?(ECE M/J 2007) Timer is used to convert the machine cycles and count rate is 1/12 th of the oscillator frequency. In counter mode, counter is incremented for 1to 0 transition and it has maximum count rate as 1/24th of oscillator frequency.
5.29) What is the function of DPTR register ?(A/M 2005 ECE) The data pointer (DPTR) consists of a high byte(DPH) and a low byte (DPL). Its function is to hold a 16 bit address. It may be manipulated as a 16 bit data register or as two independent 8 bit registers. It serves as a base register in indirect jumps, lookup table instruction and external data transfer. The DPH(83H) and DPL(82H) have separate internal addresses. 5.30) What is the significant of GATE bit in TMOD control register? (ECE M/J 2007) OR gate enable bit which controls RUN/STRO of timer 1/0. Set to 1 by program to enable timer to run if bit TR1/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 pin is high. Cleared to 0 by program to enable timer to run if bit TR1/0 in TCON is set. 5.31)How does the status of EA pin affect the access to internal and external program memory ? (IT A/M 2008) EA- enable interrupt bit. Cleared to 0 by program to disable all interrupts; set to 1 to permit individual interrupts to be enable by their enable bits. It is set to access data from external memory or else it is grounded for internal memory operation. 5.32) What is the maximum frequency of the clock signal that can be counted by 8051 counter? (IT N/D 2007) The maximum frequency of the clock signal is 1/24th of oscillator frequency. 5.33) What are the two memory address pointer in 8051 microcontroller? (ECE N/D 2007) Program counter and data pointer are the two memory address pointer in 8051. The program instruction bytes are fetched from the location in memory that are addressed by PC. The DPTR is made up of two 8-bit registers named DPH and DPL, which are used to furnished memory addresses for internal and external code access and external data access. 5.34) State any four important features of 16 bit microprocessor(8096)? (ECE N/D 2007) a)
It is designed to use in application which require high speed calculations and fast I/O operations.
b) 8096 has 8 multiplexed input analog to digital converter with 10 bit resolution . c)
It has additional features such as watch dog timer , sample and hold circuit , pulse width modulator etc.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 35
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 5.35 How does 8051 differentiate between the external and internal program memory ? (CSE M/J 2007)
EXTERNAL PROGRAM MEMORY
INTERNAL PROGRAM MEMORY
1) EA(bar) pin is high.
1) EA(bar) pin is grounded.
2) PSEN signal is activated .
2) PSEN pin is grounded .
3) 8051 can address upto 64KB of external data memory.
3) 4KB of internal memory available. 4) Accessed by all addressing modes.
4) Accessible only by direct and indirect addressing modes.
5.36) Name any two 16 bit microcontroller. (EEE M/J 2007) MCS 896 family of 16 bit microcontroller includes 8096,8097,8098. 5.37) What are the SFRs associated with timer operations of 8051 microcontroller ? (IT N/D 2007) TMOD is dedicated to the two timers and can be considered to be two duplicate 4-bit registers , each of which controls the action of one of the timers. TCON has control bits and flags for the timers in the upper nibble and control bits and flags for the external interrupts in the lower nibble.
5.38) What is the asynchronous data transmission format of 8051 serial port? (IT N/D 2007) Receiver samples data in center of bit timer Idle state ↓ → start bit
1
↓ 2
← Bit time=1/f
↓
↓
3
4
→
↓ 5
↓ 6
↓ 7
↓ 8
data bits f- minimum one stop bit
5.39) What is the function of program counter in 8051? (ECE N/D 2006) The 8051 has a 16 bit program counter. It is used to hold the address of memory location from which the next instruction is to be fetched. Due to this the width of program counter decides the maximum program length in bytes. The PC is automatically incremented to point the next instruction in the program sequence after execution of the current instruction. Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 36
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 5.40) Compare the 8051,8031,8751 microcontroller (N/D 2005 ECE) The 8031 is the ROM-less version of the microcontroller where as the 8751 is the EPROM version of the 8051 microcontroller. It means that in case of the 8031, external ROM needs to be interfaced , where as in case of 8751, the on-chip 4KB EPROM can be programmed for any application . 5.41) Define SBUF register in 8051 and mention its use. SBUF (Serial data buffer ) this register holds the data that has to be transmitted through the serial port and also holds the data that is received. This register is interconnected to two 8-bit shift registers. 5.42) What are the features of ROM and RAM in 8051 microcontroller? (ECE N/D 2006) ROM: The 8051 has internal ROM of 4KB starting from 0000H to 0FFFH. This ROM shares same address with internal RAM but the data paths are different for both following the hardware architecture . The internal ROM is in program memory space. All instruction fetches are taken from program memory. RAM: The 8051 has 128 bytes of internal RAM. The lowest 32 bytes are grouped in to 4 banks of 8 registers. The next 16 bytes above the register bank from a block of 16 bit addressable memory space. 5.43) Name any four conditional jump instructions of 8051. (ECE N/D 2006) i) ii) iii) iv)
JZ rel- jump if accumulator is zero. JNZ rel – jump if accumulator is not zero. JC rel – jump if carry set. JNC rel – jump if carry not set.
5.44)What is the use of DA instruction in 8051? (ECE N/D 2006) DA – Adjusts the eight bit value in the accumulator resulting from the earlier addition of two variables (each in packed, BCD format) producing two four bit digits. Any ADD or ADDC instruction may have been used to perform the addition . This instruction is used after addition of BCD numbers to convert the results back into BCD.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 37
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT 5.45)What is interrupt latency?(M/J 2007 ECE) Interrupt latency is the time between the point a device signal that it needs a service and the point where the ISR ( Interrupt Service Routine) Provides the needed service. 5.46)What is the significant of SFRs in 8051 microcontroller? The SFRs access to the four I/O ports, the CPU register, interrupts – control register , the timer/counter, UART, and power control are performed through the register between 80H and FFH. 5.47)What is stack pointer and write the stack level of 8051? (ECE N/D 2007) The stack refers to the area of internal RAM that is used in conjunction with certain OPcodes data to store and retrieve data quickly. 5.48) What are the functions of assembler and linker in 8051? (ECE A/M 2010) ASSEMBLER: It translates assembly language program to a machine language program. It will produce an object file and a list file. The extension for the object files is “obj” while the extension for the list is “lst”. LINKER: It takes one or more object files and produces an absolute file with the extension “abs”. 5.49) State the operating modes of 8051 timer: (ECE N/D 2008) 1) Mode 0 2) Mode 1 3) Mode 2 4) Mode3 5.50)List any two instruction of 8051 that affect the flags of 8051. (ECE N/D 2008) ADDC SUBB and ADDC instructions affect all flags of 8051. 5.51)What are the operating modes of serial port of 8051? i) Mode 0 (or) shift register mode. ii) Mode 1 (or) standard UART mode. iii) Mode 2 (or) multiprocessor mode. iv) Mode 3. 5.52) What are the addressing modes supported by 8051?(ECE M/J 2009) Immediate addressing mode. Register addressing mode. Direct addressing mode. Indirect addressing mode. Indexed addressing mode. Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 38
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT Register specific addressing mode. 5.53) List the advantages of microcontroller over microprocessor.
Microcontroller have many bit handling instruction and hence controlling is more effective. Time taken to complete a control function using microcontroller is less The pins of microcontroller are programmable that is capable of having several different functions depends on the wishes of the programmer. For building simple products use of microcontroller reduce the cost, space.
5.54)What register keeps track of interrupt priority in the 8051? Interrupt priority (IP) register. 5.55) Which ports of 8051 are bit addressable? (ECE N/D 2009) All the ports (port 0, port 1 , port 2 and port 3) of 8051 are bit addressable. 5.56) A given 8051 chip has a speed of 16 MHZ. What is the range of frequency that can be applied to the XTAL1 and XTAL2 . (ECE N/D 2009) 0-16 MHZ. 5.57)List the functions supported by special function register? (ECE A/M 2010) Maths operation and data manipulation . Addressing external memory. Input/output port. Serial port control. Timer/counter mode control. 5.58)Discuss the interrupt structure available in 8051 microcontroller. (ECE A/M 2010) (Or) Write the various interrupts supported by 8051 with priority level and vector address. (ECE N/D 2007) 8051 provides five interrupts . All these interrupts are vectored interrupts. The table gives the list of interrupts in the order of priority and with vector location.
External Interrupt 0 (INT0) 0003H. Timer Interrupt 1 (TF0) 000BH. External Interrupt 1 (INT 1) 0013H. Timer Interrupt 1 (TF1) 001BH. Serial Interrupt (TF+RI) 0023H.
5.59)For a 8051 system of 11.0592 MHZ, Find how long it takes to execute each of the following instruction: Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 39
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT a) DEC R3
b) SJMP
(ECE M/J 2006)
T=12/(11.0592*10^12) T= 1.085µs 5.60)How do you calculate band rate for serial communication for 8051? Serial data transmission modes Mode 0
Baud rate BR= (oscillator frequency )/12
Mode 1 BR= (2^SMOD * oscillator frequency )/ (32*12*[256-(TH1)]) Mode 2 BR= (oscillator frequency)/32 (if SMOD=1) BR=(oscillator frequency)/64 (if SMOD=0) Mode 3
Same as in mode 1.
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 40
CS2252- Microprocessors and Microcontrollers IV Sem.CSE/IT
Prepared by A.Devasena., Associate Professor., Dept/ECE.,
Page 41