Docstoc

Lecture Notes on Microprocessors

Document Sample
Lecture Notes on Microprocessors Powered By Docstoc
					                               Lecture Notes on Microprocessors

Microprocessor:            A multipurpose, programmable, logic device
                                               that
                           reads binary instructions from memory
                           accepts binary data as inputs
                           processes data according to the instructions, and
                           provides results as output.

                           A typical programmable machine

Three components:    work together & interact with each other--- to perform a given task
                     therefore they comprise a system
Hardware: the physical components of the system
Program: A set of instructions written in a specific sequence for the microprocessor to perform a task
Software: A group of programs




                                         Microprocessor-based system
                 (e.g. microcomputer, microprocessor-based products or embedded system)
                                             with bus architecture
Arithmetic/Logic Unit (ALU): The area of the microprocessor where various computing functions are
                     performed
Computing functions: Arithmetic operations: addition, subtraction etc.
                       Logic operations: AND, OR, XOR etc.
Register Array: The area of the microprocessor that consists various registers
                Registers: Primarily used to store data temporarily during the
                           execution of a program
Control Unit: -Provides necessary timing and control signals to all the operations
              -Controls the flow of data between microprocessor, memory and peripherals
Input Device: Transfers data and instructions from the outside world to the microprocessor
              Examples: keyboard, teletype, analog-to-digital converters
Output Device: Transfers data and instructions from the microprocessor to the outside world
                Examples: LED, CRT, printer, magnetic tape
Memory: Stores binary information (instruction & data) and provides it to the microprocessor
         whenever necessary
Read-Only Memory (ROM): Used to store programs that do not need alteration, e.g., monitor
                             program of a single board microcomputer
                             Monitor program: interprets the information entered through a
                             keyboard and provides equivalent binary digits to the
                             microprocessor
Read/ Write Memory (R/WM): User memory (Used to store user programs and data
System Bus: -A communication path between the microprocessor and peripherals
            -A group of wires to carry bits

How Does A Microprocessor Work?

           Lecture Notes on Microprocessors              1                               Abhishek Yadav
   -    Program & data are entered in the R/WM through the input device
   -    Microprocessor is given a command to execute the program
   -    Microprocessor reads and executes one instruction at a time
            o Microprocessor fetches the first instruction from memory, decodes it and executes it
            o The sequence of fetch, decode and execute is continued until the microprocessor comes across an
                instruction to stop
    - Microprocessor sends the result to the output device
During the entire process
    - Microprocessor uses the system bus to fetch instructions & data from memory
    - Microprocessor uses registers to store data temporarily
    - Microprocessor uses ALU for computing
    - Microprocessor uses the same bus lines to send the result to output devices
        (e.g.,seven-segment LEDs)
Bit: A binary digit, 0 or 1
Byte: A group of eight bits
Nibble: A group of four bits
Word: A group of bits the computer recognizes and processes at a time
Instruction: A command in binary that is recognized and executed by the microprocessor to accomplish a task
Mnemonic: A combination of letters to suggest the operation of an instruction
Machine Language: The binary medium of communication with a computer through a designed set of
instructions specific to the computer
Assembly Language: A medium of communication with a computer in which programs are written in
mnemonics. It is computer-specific.
Low-Level Language: A machine dependent medium of communication in which programs are written in
machine language or in assembly language
High-Level Language: A machine independent medium of communication in which programs are written in
English-like words
                                      Compiler: A program that translates a high-level language program into
                                      machine language.
                                      Interpreter: Same as compiler but translates one statement at a time.
                                      Assembler: A program that translates an assembly language program to
                                      the binary machine language.
                                      Monitor Program: A program that interprets the input from a keyboard
                                      and converts the input into its binary equivalent.

                                    The 8085 Programming Model:
                                    Registers: 8085 has 6 general purpose registers (B, C, D, E, H & L) to
                                    store 8-bit data. They can be combined as register pairs (BC, DE & HL) to
                                    perform 16-bit operations.
                                    Accumulator or Register A: An 8-bit register that is part of ALU. It is
                                    used to store 8-bit data and to perform arithmetic and logical operations.
                                    The result of an operation is stored in accumulator.
                                    Flags: The ALU includes five flip flops which are set or reset after an
                                    operation according to data conditions of the result.
                                    Zero Flag (Z) – set to 1 when the result is zero, otherwise it is reset
                                    Carry Flag (CY) – set to 1 if an arithmetic operation results in a carry
                                    Sign Flag (S) – set to 1 if bit D7 of the result is 1, otherwise it is reset
                                    Parity Flag (P) - set to 1 if the result has an even number of 1s, otherwise
                                    it is reset
       Auxiliary Carry Flag (AC) - set to 1 if a carry is generated by digit D3 and is passed to digit D4.
       Program Counter (PC): A 16-bit register used to sequence the execution of instructions. It points to
       the memory address from which the next byte is to be fetched.
       Stack Pointer (SP): 16-bit register used to point a memory location in RAM called the stack.




          Lecture Notes on Microprocessors          2                                     Abhishek Yadav
An Assembly-Language Program for Addition of Two Numbers:
      Mnemonics        Hex Code Description
      MVI A,03H        2000 3E Move immediately the hexadecimal data 03 to register A
                       2001 03 (accumulator)
      MVI B, 02H       2002 06 Move immediately the hexadecimal data 02 to register B
                       2003 02
      ADD B            2004 80 Add the contents of register B to the contents of accumulator and
                                  store the result in accumulator itself
      STA 2200H        2005 32 Store the contents of accumulator to the memory location 2200H in
                       2006 00 the RAM
                       2007 22
      HLT              2008 76 Halt (Stop executing)

The same task can be performed without using register B.
      Mnemonics           Hex Code Description
      MVI A,03H           2000 3E Move immediately the hexadecimal data 03 to register A
                          2001 03 (accumulator)
      ADI 02H             2002 C6 Add immediately the hexadecimal data 02 to the contents of
                          2003 02 accumulator and store the result in accumulator itself
      STA 2200H           2004 32 Store the contents of accumulator to the memory location 2200H in
                          2005 00 the RAM
                          2006 22
      HLT                 2007 76 Halt (Stop executing)

Addition of Two Numbers Stored at Two Memory Locations (2100H & 2101H) in the RAM:
       Mnemonics        Hex Code Description
       LDA 2100H        2000 3A Load the contents of memory location 2100H to the accumulator
                        2001 00
                        2002 21
       MOV B,A          2003 47 Copy the contents of accumulator into register B
       LDA 2101H        2004 3A Load the contents of memory location 2101H to the accumulator
                        2005 01
                        2006 21
       ADD B            2007 80 Add the contents of register B to the contents of accumulator and
                                    store the result in accumulator itself
       STA 2200H        2008 32 Store the contents of accumulator to the memory location 2200H in
                        2009 00 the RAM
                        200A 22
       HLT              200B 76 Halt (Stop executing)

Example Program 1: Write a program for addition of two numbers stored at memory locations 2100H &
2101H. Store the result at 2200H and store 01H at 2201H if a carry is generated otherwise store 00H at this
memory location.

       Mnemonics                   Hex Code       Description
       LDA 2100H                   2000 3A        Load the contents of memory location 2100H to the accumulator
                                   2001 00
                                   2002 21
       MOV B,A                     2003 47        Copy the contents of accumulator into register B
       LDA 2101H                   2004 3A        Load the contents of memory location 2101H to the accumulator
                                   2005 01
                                   2006 21
       ADD B                       2007 80        Add the contents of register B to the contents of accumulator and
                                                  store the result in accumulator itself
       STA 2200H                   2008      32   Store the contents of accumulator to the memory location 2200H in

          Lecture Notes on Microprocessors                 3                                   Abhishek Yadav
                                  2009      00    the RAM
                                  200A      22
      JC SKIP                     200B      DA    Jump on carry to the memory location indicated by the label SKIP
                                  200C      14
                                  200D      20
      MVI A,00H                   200E      3E    Move immediately the hexadecimal data 00 to register A
                                  200F       00   (accumulator)
      STA 2201H                   2010       32   Store the contents of accumulator to the memory location 2201H in
                                  2011       01   the RAM
                                  2012       22
      HLT                         2013      76    Halt (Stop executing)
      SKIP:MVI A, 01H             2014      3E    Move immediately the hexadecimal data 01 to register A
                                  2015       01   (accumulator)
      STA 2201H                   2016       32   Store the contents of accumulator to the memory location 2201H in
                                  2017       01   the RAM
                                  2018       22
      HLT                         2009       76   Halt (Stop executing)

Example Program 2: Write a program for the multiplication of two numbers stored at memory locations
2100H and 2101H. Store the result at 2200H. Assume that the result does not overflow.

      Mnemonics                   Hex Code        Description
      LDA 2100H                   2000 3A         Load the contents of memory location 2100H (multiplicand) to the
                                  2001 00         accumulator
                                  2002 21
      MOV B,A                     2003 47         Copy the contents of accumulator into register B
      LDA 2101H                   2004 3A         Load the contents of memory location 2101H (multiplier) to the
                                  2005 01         accumulator
                                  2006 21
      MOVC,A                      2007 4F       Copy the contents of accumulator into register C
      XRA A                       2008 AF       Clear the accumulator
      NEXT: ADD B                 2009 80       Add the contents of register B to the contents of accumulator and
                                                store the result in accumulator itself
      DCR C                       200A      0D Decrease the contents of register C by one
      JNZ NEXT                    200B      C2 If zero flag is not set, then jump to the label NEXT
                                  200C      09
                                  200D       20
      STA 2200H                   200E      32 Store the contents of accumulator to the memory location 2200H in
                                  200F       01 the RAM
                                  2010       22
      HLT                         2011       76 Halt (Stop executing)

Example Program 3: Write a program for the multiplication of two numbers stored at memory locations
2100H and 2101H. Store the high order byte of the result at 2200H and low order byte at 2201H.
      Mnemonics            Hex Code Description
      LDA 2100H            2000 3A Load the contents of memory location 2100H (multiplicand) to the
                           2001 00 accumulator
                           2002 21
      MOV B,A              2003 47 Copy the contents of accumulator into register B
      LDA 2101H            2004 3A Load the contents of memory location 2101H (multiplier) to the
                           2005 01 accumulator
                           2006 21
      MOVC,A               2007 4F Copy the contents of accumulator into register C
      XRA A                2008 AF Clear the accumulator
      MVI D, 00H           2009 16 Clear register D

         Lecture Notes on Microprocessors                   4                                   Abhishek Yadav
                                  200A 00
      NEXT: ADD B                 200B 80         Add the contents of register B to the contents of accumulator and
                                                  store the result in accumulator itself
      JNC SKIP                    200C      D2    If carry flag is not set, then jump to the label SKIP
                                  200D      10
                                  200E      20
      INR D                       200F       14   Increase the contents of register D by one
      SKIP: DCR C                 2010      0D    Decrease the contents of register C by one
      JNZ NEXT                    2011      C2    If zero flag is not set, then jump to the label NEXT
                                  2012      09
                                  2013      20
      STA 2201H                   2014      32    Store the contents of accumulator to the memory location 2201H in
                                  2015       01   the RAM
                                  2016       22
      MOV A,D                     2017      7A    Copy the contents of register C to the accumulator
      STA 2200H                   2018      32    Store the contents of accumulator to the memory location 2200H in
                                  2019       00   the RAM
                                  201A      22
      HLT                         201B      76    Halt (Stop executing)


Example Program 4: Write a program for addition of ten numbers stored at memory locations 2100H to
2109H. Store the result at 2200H. Assume that the result does not overflow.

      Mnemonics                   Hex Code Description
      XRA A                       2000 AF Clear the accumulator to store the low order byte of the result
                                           temporarily
      MVI C, 00H                  2001 0E Clear register C to store the high order byte of the result
                                           temporarily
      MVI B, 0AH                  2002 06 Move immediately the hexadecimal data 0A to register B (counter)
                                  2003 0A
      LXI H, 20FFH                2004 21 Load the hexadecimal data 2100H to the register-pair HL
                                  2005 00
                                  2006 21
      NEXT: INX H                 2007 23 Increase the contents of register-pair HL by one
      ADD M                       2008 86 Add the contents of memory location indicated by the register-pair
                                           HL to the accumulator
      JNC SKIP                    2009 D2 If carry flag is not set, then jump to the label SKIP
                                  200A 0D
                                  200B 20
      INR C                       200C 0C Increase the contents of register C by one
      SKIP: DCR B                 200D 05 Decrease the contents of register B by one
      JNZ NEXT                    200E C2 If zero flag is not set, then jump to the label NEXT
                                  200F 07
                                  2010 20
      STA 2201H                   2011 32 Store the contents of accumulator to the memory location 2201H in
                                  2012 01 the RAM
                                  2013 22
      MOV A,C                     2014 79 Copy the contents of register C to the accumulator
      STA 2200H                   2015 32 Store the contents of accumulator to the memory location 2200H in
                                  2016 01 the RAM
                                  2017 22
      HLT                         2018 76 Halt (Stop executing)

Example Program 5: Write a program for addition of ten numbers stored at memory locations 2100H to
2109H. Store the high order byte of the result at 2200H and low order byte at 2201H.
         Lecture Notes on Microprocessors                   5                                     Abhishek Yadav
       Mnemonics                   Hex Code Description
       XRA A                       2000 AF Clear the accumulator to store the low order byte of the result
                                            temporarily
       MVI C, 00H                  2001 0E Clear register C to store the high order byte of the result
                                            temporarily
       MVI B, 0AH                  2002 06 Move immediately the hexadecimal data 0A to register B (counter)
                                   2003 0A
       LXI H, 20FFH                2004 21 Load the hexadecimal data 2100H to the register-pair HL
                                   2005 00
                                   2006 21
       NEXT: INX H                 2007 23 Increase the contents of register-pair HL by one
       ADD M                       2008 86 Add the contents of memory location indicated by the register-pair
                                            HL to the accumulator
       JNC SKIP                    2009 D2 If carry flag is not set, then jump to the label SKIP
                                   200A 0D
                                   200B 20
       INR C                       200C 0C Increase the contents of register C by one
       SKIP: DCR B                 200D 05 Decrease the contents of register B by one
       JNZ NEXT                    200E C2 If zero flag is not set, then jump to the label NEXT
                                   200F 07
                                   2010 20
       STA 2201H                   2011 32 Store the contents of accumulator to the memory location 2201H in
                                   2012 01 the RAM
                                   2013 22
       MOV A,C                     2014 79 Copy the contents of register C to the accumulator
       STA 2200H                   2015 32 Store the contents of accumulator to the memory location 2200H in
                                   2016 00 the RAM
                                   2017 22
       HLT                         2018 76 Halt (Stop executing)

Classification of 8085 Instructions:

One-Byte Instructions: MOV, HLT, DCR, INR, DCX, INX, ADD, XRA
Two-Byte Instructions: MVI, ADI
Three-Byte Instructions: STA, JNZ, JNC, LXI


Data Transfer Instructions: MOV, MVI
Arithmetic Instructions: ADD, ADI, INR, INX, DCR, DCX
Logical Instructions: XRA
Branch Instructions: JNC, JNZ, JC, JZ
Machine Control Instructions: HLT

Flowcharts:




          Lecture Notes on Microprocessors              6                                 Abhishek Yadav
                  Multiplication of Two Numbers
                                                                     Multiplication of Two Numbers
                   (Result always less than FFH)
                                                                   (Result may also be more than FFH)

More 8085 Instructions:
Addition & Subtraction: ADD, ADC, ADI, ACI, SUB, SBB, SUI, SBI, DAD
OR, AND & XOR operations: ORA, ORI, ANA, ANI, XRA, XRI
Rotate operations: RAL, RAR, RLC, RRC
Compare operations: CMP, CPI
Data transfer operations: MOV, MVI, LDA, LDAX, LHLD, LXI, STA, STAX
Jump operations: JC, JNC, JZ, JNZ, JP, JM, JPE, JPO

Status of Flags after Execution of an Instruction:

   1. Data transfer and branch instructions do not affect the flags.
   2. Most of the arithmetic and logical operations affect the flags.
   3. Addition, subtraction & compare operations affect all the flags.
   4. INX and DCX do not affect flags.
   5. INR and DCR affect all the flags except CY.
   6. OR and XOR operations affect S, Z & P and reset CY & AC.
   7. AND operations affect S, Z & P; reset CY; and set AC.
   8. Rotate operations affect only CY.
   9. STC and CMC do not affect any flag except CY.
   10. DAD does not affect any flag.

Attempt the following programming assignments yourself:
                                       Programming Assignment: 1
   1. Write a program that adds the three numbers in locations A0, A1 and A2, and puts the sum in A3. Don't
      worry about what happens if the value of the sum exceeds FF.

   2. Write a program that copies the value in A0 into locations A1 and A2 (so, for example, if A0 held 57
      when the program started running, cells A0, A1 and A2 would all hold 57).

   3. Write a program to count the number of 1’s in a given 8-bit data.


          Lecture Notes on Microprocessors           7                                  Abhishek Yadav
4. Write a program that interchanges the values in locations A0 and A1.

5. Write a program that multiplies the value in cell A0 by sixteen, without using a loop, and using as few
   instructions as possible. (HINT: Repeatedly double the value.)

6. Write a program that computes the sum 1 + 2 + 3 +... + n, where n is the value in A0. The sum should
   be placed in A1.

7. Three numbers are stored in consecutive memory locations. Write a program to arrange these numbers
   in the memory in ascending order. Repeat your experiment to arrange the data in descending order.
   Write a report.

8. Write a program to add a series of 10 numbers. These numbers are stored in consecutive memory
   locations. The result should be stored in the memory locations following the input data. What should be
   the size of the result location? What if you were to add a series of 1000 numbers? How much result
   storage space would be sufficient? Write a report.

9. Write a program to arrange the above 10 numbers in the memory in ascending order. Repeat your
   experiment to arrange the data in descending order. Write a report.

10. Write a program to form the Fibonacci series. Fibonacci series is defined as x(1) = 0, x(2) = 1, x(n+1) =
    x(n) + x(n+1). Thus, Fibonacci series is 0, 1, 2, 3, 5 …..

11. The following block of data is stored in the memory locations from XX55H to XX5AH. Write a
    program to transfer the data to the locations XX80H to XX85H in the reverse order. Data: 22H, A5H,
    B2H, 99H, 7FH, 37H.

12. Data bytes are stored in memory locations XX50H to XX5FH. To insert an additional five bytes of data,
    it is necessary to shift the data string by five memory locations. Write a program to store the data string
    from XX55H to XX64H.

13. A system is designed to monitor the temperature of a furnace. Temperature readings are recorded in 16-
    bits and stored in memory locations starting at XX60H. The high order byte is stored first and the low
    order byte is stored in the next consecutive memory location. However, the high order byte of all the
    temperature readings is constant. Write a program to transfer low order readings to consecutive
    memory locations starting at XX80H and discard the high order bytes. Temperature Readings: 0581H,
    0595H, 0578H, 0578H, 057AH, 0598H.

14. A string of six data bytes is stored starting from memory location 2050H. The string includes some
    blanks (bytes with zero value). Write a program to eliminate the blanks from the string. Data: F2H, 00H,
    00H, 4AH, 98H, 00H.

15. The temperatures of two furnaces are being monitored by a microprocessor. A set of five readings of the
    first furnace, recorded by five thermal sensors, is stored at the memory locations starting at XX50H. A
    corresponding set of five readings from the second furnace is stored at the memory locations starting at
    XX60H. Each reading from the first set is expected to be higher than the corresponding reading from the
    second set. Write a program to check whether each reading from the first set is higher than the
    corresponding reading from the second set.

16. A set of eight bytes are stored in memory locations starting from 2070H. Write a program to add two
    bytes at a time and store the sum in the same memory locations, low order sum replacing the first byte
    and a carry replacing the second byte. Data: F9H, 38H, A7H, 56H, 98H, 52H, 8FH, F2H.

17. A set of eight data bytes is stored in the memory location starting at XX50H. Check each data byte for
    MSB and LSB. If MSB or LSB is 1, reject the data byte; otherwise, store the data bytes at memory
    locations starting at XX60H. Data: 80H, 52H, E8H, 78H, F2H, 67H, 35H, 62H.

       Lecture Notes on Microprocessors          8                                      Abhishek Yadav
    18. A set of eight readings is stored in memory starting at location XX50H. Write a program to check
        whether a byte 40H exists in the set. Data: 48H, 32H, F2H, 38H, 37H, 40H, 82H, 8AH.

    19. A set of ten readings is stored in memory starting at location XX50H. Write a program to save the bytes
        that are higher than 6010 and lower than 10010 in memory locations starting from XX60H. data: 6FH,
        28H, 5AH, 49H, C7H, 3FH, 37H, 4BH, 78H, 64H.
    20. Write a program that will input a positive integer and test it to see if it is a prime number.
    Opcode Format:
    Instruction = Opcode (Operation Code)+Operand (e.g. MVI A,32H; “MVI” is Opcode & “A,32H” Operand)

    Code         Registers                                             Code           Register-Pairs
    000           B                                                    00             BC
    001           C                                                    10             DE
    010           D                                                    10             HL
    011           E                                                    11             SP
    100           H
    101           L
    110           M                                                MOV C, A           01DDDSSS: 01 001 111            4FH
    111           A                                                ADD B              10000SSS: 10000 000             80H

ADD                 10000                      DCR R            00RRR101                 STAX BC/DE          000X0011
MOV                 01                         DCX Rp           00 Rp Rp1011             SBB                 10011
ADC                 10001                      INR R            00RRR100                 SUB                 10010
ANA                 10100                      INX Rp           00 Rp Rp0011             LXI Rp              00 Rp Rp0001
ORA                 10110                      MVI R            00RRR110
XRA                 10101                      LDAX BC/DE       000X1011

Microprocessor Architecture and Its Operations:

Microprocessor-initiated operation
                  Memory read
                  Memory write
                  I/O read
                  I/O write
                        To perform above operations it is required to
                  Identify memory location or I/O
                  Transfer data
                  Provide timing signals
                        For this purpose following communication lines (system bus) are required
                  Address Bus (a group of 16 lines carrying address, unidirectional, bits flow from MPU to memory or I/O)
                  Data Bus (a group of 8 lines carrying 8-bit data or instructions, bidirectional)
                  Control Bus (various single lines carrying timing signals e.g. RD, WR, IO/M, ALE)
Internal data operations
                  Store 8-bit data (B, C, D, E, H, L)
                  Perform arithmetic and logical operations (A, ALU)
                  Test for conditions (Flag Register)
                  Sequence the execution of instructions (PC)
                  Store data temporarily in the defined RAM called the stack (SP)
Externally initiated operations
                  Reset         PC is cleared, all operations are suspended
                  Interrupt     MPU is interrupted from normal execution, some other instructions initiated
                  Ready         MPU enters into a wait state
                  Hold          MPU relinquishes control of buses, external devices can use buses
An Example to Illustrate the Use of Buses:


            Lecture Notes on Microprocessors               9                                         Abhishek Yadav
                                                                           How does a microprocessor read an
                                                                           instruction from a memory location?
                                                                               -   Microprocessor places the 16-bit
                                                                                   address on the address bus.
                                                                               -   The address is decoded by an external
                                                                                   logic circuit.
                                                                               -   Memory location is identified.
                                                                               -   Microprocessor sends a pulse called
                                                                                   Memory Read as a control signal.
                                                                               -   Pulse activates the memory chip.
                                                                               -   Contents of the memory location (8-
                                                                                   bit data) are placed on the data bus.

Pin Diagram of an 8085 Microprocessor:




                                              Microprocessor Architecture Revisited

Analog and Digital Systems: In an analog system, inputs and outputs can assume infinite number of possible
values within the limits, whereas, in a digital system, the inputs and outputs can assume a finite number of
possible values.

Example of a simple digital system (n- conductors can carry n-bit data):




           Lecture Notes on Microprocessors                  10                                  Abhishek Yadav
Half Adder:
      X1 X2        S     C
      0 0          0     0
      0 1          1     0
      1 0          1     0
      1 1          0     1


S = X1X2’+X1’X2 = X1 X2
C= X1X2

Full Adder:
       X1 X2       Cin     S    C      S = X1’X2’Cin+X1’X2 Cin’+ X1X2’Cin’+X1X2 Cin
       0 0         0       0    0        = (X1 X2)Cin’+(X1 X2)’Cin
       0 0         1       1    0       = X1X2Cin
       00 1        0       1    0
       0 1         1       0    1      C = X1’X2Cin+ X1X2’Cin+ X1X2Cin’+ X1X2Cin
       1 0         0       1    0        = (X1 X2)Cin+ X1X2
       1 0         1       0    1
       1 1         0       0    1
       1 1         1       1    1

Tri-State Devices: Tri-state logic devices are essential to proper functioning of the bus oriented system, in
which the same bus lines are shared by several components. These devices have three states: logic 1, logic 0,
and high impedance. A tri-state logic device has a third line called Enable. When this line is activated, the tri-
state device functions the same way as ordinary logic devices. When the third line is disabled, the logic device
goes into high impedance state, as if it were disconnected from the system.

Buffer: The buffer is a logic circuit that amplifies the current or power. It has one input line and one output
line. The logic level of the output is the same as that of the input. A tri-state buffer has an Enable line also. If
required, it can be kept in high impedance state.




Decoder: The decoder is a logic circuit that identifies each combination of the signals present at its input.




Encoder:




           Lecture Notes on Microprocessors               11                                 Abhishek Yadav
Lecture Notes on Microprocessors   12   Abhishek Yadav
Lecture Notes on Microprocessors   13   Abhishek Yadav
Lecture Notes on Microprocessors   14   Abhishek Yadav
Lecture Notes on Microprocessors   15   Abhishek Yadav

				
DOCUMENT INFO
Shared By:
Stats:
views:101
posted:10/16/2012
language:English
pages:15
Description: It is a document file on microprocessor, prepared by Mr. Abhishek Yadav. Usefull for learning microprocessor basics.