Wednesday, 15 June 2016

Types of Instructions in 8085


8085 microprocessor follows 3 types of instructions;
1              1. Load/Store Instructions
·         Load/Store operations are those which move the data between a register in the processor and a memory location (or another register).
·         They are often collectively referred to as data movement instructions.
·         Examples for load/store instructions are:
LDA(Load Accumulator directly from memory), STA(Store the content of Accumulator in the specified memory location) and so forth.

2               2. Arithmetic/Logic Instructions
·         Arithmetic instructions provide the primary data processing capabilities of the computer.
·         Example for arithmetic/logic instructions are:
ADD(Add to Accumulator), SUB(Subtract from accumulator), AND, OR, EOR, etc.

3               3. Test/Branch Instructions
·         They provide the decision-making capabilities.
·         The test must often be performed on the result of some prior arithmetic/logic operation.
·         It determines whether the result was zero or non-zero, positive/negative or some other binary choice involving bits in any operand with the instruction.
·         Example: CMA (complement the content of accumulator)


Sunday, 12 June 2016

Address Bus and Data Bus


    
      1. Address Bus
  • The address bus consists of 16 wires, therefore 16 bits(Its width is 16 bits).
  • A 16 bit  binary number allows 216 different numbers or 32000 different numbers, i.e. 0000000000000000 up to 1111111111111111. Because  memory consists of boxes, each with a unique address, the size of the address bus determines the size of memory, which can be used.
  • To communicate with memory the microprocessor sends an address on the address bus e.g. 0000000000000011 (3 in decimal) to the memory.
  • The memory selects box number 3 for reading or writing data. Address bus is unidirectional, i.e. numbers only sent from microprocessor to memory not the other way.


       2. Data Bus
  • It carries data in binary from between microprocessor and other external units such as memory. Typical size 8 or 16 bits.
  • Size determined by size of boxes in memory and microprocessor size helps determine performance of microprocessor.
  • The data bus consists of 8 wires. Therefore, 28 combinations of binary digits.
  • Data bus is used to transmit data, i.e. information, results of arithmetic, etc. between memory and the microprocessor.
  • Data bus is bi-directional.
  • Size of the data bus determines what arithmetic can be done.
  • Data bus also carries instructions from memory to the microprocessor. Size of the bus therefore limits the number of possible instructions to 256, each specified by a separate number.

Saturday, 11 June 2016

8085 Programming Model



      1. Registers

  • The 8085 has six general purpose registers to store 8 bit data; these are identifies as B, C, D, E, H, L. 
  • They can be combined  as register pairs - BC, DE and HL to perform some 16-bit operations.
  • The programmer can use these registers to store or copy data into the registers by using data copy instructions.

      2. Accumulator
  • The accumulator is an 8-bit register that is a part of arithmetic/logic unit(ALU).
  • This register is used to store 8-bit data and to perform arithmetic and logical operations.
  • The result of an operation is stored in the accumulator.
  • The accumulator is also identified as register A.

      3. Flags

Bit positions of various flags in the flag register of 8085
  • 8085 has five flag registers:-
          - Sign Flag (S): Sets or Resets based on the result stored in the accumulator.
                                    If the result stored is positive, the flag resets else if the result stored is negative                                     the flag is set.

          - Zero Flag (Z): Sets or Resets based on the result stored in the accumulator. 
                                    If the result stored is zero the flag is set else it is reset.

          - Auxiliary Carry Flag(AC) : This flag is set if there is a carry from low nibble(lowest 4 bits) to                                     high nibble(upper 4 bits) or a borrow from high nibble to low nibble, in the                                           low order 8-bit portion of an addition or subtraction operation.

          - Parity Flag (P): This flag is set if there is even parity else it resets.

          - Carry Flag (CY): This flag is set if there is a carry bit else it resets.


      4. Program Counter (PC)
  • This 16-bit register deals with sequencing the execution of instructions this register is a memory pointer.
  • Memory locations have 16 bit addresses and that is why this is a 16 bit register.
  • The function of the PC is to point to the memory address from which the next byte is to be fetched.
  • When a byte(machine code) is being fetched, the program counter is incremented by one to point to the next memory location.

      5. Stack Pointer (SP)
  • The stack pointer is also a 16-bit register used as a memory pointer.
  • It points to a memory location in R/W memory called stack.
  • The beggining of the stack is defined by loading 16-bit address in the stack pointer.

Thursday, 9 June 2016

Intel's 8085 and its Architecture


The Intel's 8085 Microprocessor

  • The 8085 is an 8 bit, N channel Metal Oxide Semiconductor (N-MOS) microprocessor.
  • It is a 40 pin IC package fabricated on a single Large Scale Integration(LSI) chip.
  • The Intel 8085 uses a single +5V DC supply for its operation.
  • Its clock speed is about 3 MHz. The clock cycle is about 320 ns.
  • The time for the clock cycle of Intel 8085 is 200ns.
  • It has 80 basic instructions and 246 opcodes.
  • The 8085 is an enhanced version of its predecessor, the 8080A.
  • Its instruction set is upward compatible with that 8080A. Upward compatible means codes written for 8080A will also work for 8085.


Architecture of Intel 8085


The architecture of 8085 consists of following main sections:


    1. Arithmetic and Logic Unit(ALU)
  • ALU performs the following arithmetic and logical operations:
           - Addition
           - Subtraction
           - Logical AND
           - Logical OR
           - Logical XOR
           - Compliment
           - Increment
           - Decrement
           - Left Shift
           - Clear
  • The ALU is the unit that manipulates the data.
  • ALU includes the accumulator, the temporary register, the arithmetic and logic circuits and flags.
  • It uses data from memory and accumulator to perform arithmetic.
  • Always stores result in accumulator.


    2. Timing and control unit
  • Control unit generates signals within microprocessor to carry out the instruction which has been decoded.
  • In reality causes certain connections between blocks of microprocessor to be opened or closed so that data goes where it is required and so that ALU operations occur.


    3. Registers
  • The 8085/8080A programming model includes six registers, one accumulator, one flag register, two 16 bit registers: the stack pointer and the stack counter.



    4. Instruction register/decoder
  • Instructions register temporarily stores for the current instruction of a program.
  • Latest instructions are sent here from memory prior to execution.
  • Decoder then takes instruction and 'decodes' or 'interprets' the instruction.
  • Decoded instruction is then passed to a next stage.



    5. Memory Address Register
  • Holds address recieved from program counter of next program instruction.
  • Feeds the address bus the address of location of program under execution.



    6. Flag flip-flops
  • These flip-flops are set/reset after an operation according to data conditions of the result in the accumulator and other registers.
  • The 5 flags included into ALU are:
           - Sign Flag
           - Zero Flag
           - Auxiliary Carry Flag
           - Parity Flag
           - Carry Flag


Types of Microprocessors

There are basically five kind of microprocessors namely:


    1.Complex Instruction Set Microprocessors

  • They are also called as CISM in short and they categorize a microprocessor in which orders can be executed together along with other low level activities. 
  • It mainly performs the task of uploading, downloading and recalling data into and from the memory card. 
  • Apart from that it also does complex mathematical calculations within a single command.


    2. Reduced Instruction Set Microprocessor
  • This processor is also called as RISC.
  • These kinds of chips are made according to the function in which the microprocessor can carry out small things within a particular command.
  • In this way it completes more commands at  faster rate.


    3. Super scalar Processors
  • This is a processor that copies the hardware on the microprocessor for performing numerous tasks at a time. 
  • They can be used for arithmetic and as multipliers.
  • They have several operational units and thus carry out more than a one command by constantly transmitting various instructions to the superfluous operational units inside the processor. 


    4. The Application Specific Integrated Circuit
  • This processor is also known as ASIC.
  • They are used for specific purposes that comprises of automotive emissions control or personal digital assistants computers.
  • This kind of processor is made with proper specification but apart from that itcan be also made using the off the shelf gears.


    5. Digital Signal Multiprocessors
  • Also called as DSP's these are used for encoding and decoding videos or to convert the digital and video to analog and analog to digital.
  • They need a microprocessor that is excellent in mathematical calculations.
  • The chips of this processor are employed in SONAR, RADAR, home theaters audio gears.
  • Mobile phones and TV set top boxes.

Wednesday, 8 June 2016

Evolution of microprocessors

The years of development of microprocessors are divided into five generations.



      1.The First Generation (1971-73)

Intel's 8008


Intel corporation introduced 4004, the first microprocessor in 1971. it is evolved from the development effort designing a calculator chip.
There were three other processors in the market during the same period:
  • Rockwell international's PPS-4 (4 bits)
  • Intel's 8008 (8 bits)
  • National Semiconductor's IMP-16
    Image source: www.antiquetech.com
  • National Semiconductor's IMP-16 (16 bits)
They were fabricated using P-MOS(P-channel Metal Oxide Semiconductor) technology which provided low cost, slow speed and low output currents. They were not compatible with Transistor-Transistor Logic(TTL).








      2. The Second Generation (1974-78)

Intel's 8085
Image source: www.cpu-world.com
This generation marked the beginning of very efficient 8-bit microprocessors. Some of the popular processors were:
  • Motorola's 6800 and 6809
  • Intel's 8085
  • Zilog's Z80
They were manufactured using N-MOS(N-channel Metal Oxide Semiconductor) technology. This technology offered faster speed and higher density than P-MOS. It is Transistor-Transistor Logic(TTL) compatible.





      3. The Third Generation (1979-80)
Intel's 8086
Image source: www.old-computers.com


This age was dominated by 16-bits microprocessors.
Some of them were:
  • Intel's 8086/80186/80286
  • Motorolla's 68000/68010



They were designed using H-MOS(High-Speed MOS implies both a short channel between source and drain, and also design (layout) rules that deal with minimum feature size of less than two micrometers) . H-MOS provides some advantages over N-MOS as :
- speed-power-product of H-MOS is four times better than that of N-MOS.
- H-MOS can accomodate twice the circuit density compared to N-MOS.

Intel used H-MOS technology to recreate 8085A and named it as 8085AH with a higher price tag.




      4. The Fourth Generation (1981-95)
Intel's 80386

  • This era marked the beginning of 32 bit microprocessors.
  • Intel introduced 432, which turned out a bit problematic.
  • Then a clean 80386 was launched.
  • Motorolla introduced 68020/ 68030.
They were fabricated using low-power version of H-MOS technology called HC-MOS. Motorolla introduced 32-bit RISC(Reduced Instruction Set Computing) processors called MC88100.





      5. The Fifth Generation (1995-Till date)

This age's emphasis is on introducing chips that carry on-chip functionalities and improvements in the speed of memory and input devices along with introduction of 64-bit microprocessors.
Intel leads the show here with Pentium, Celeron and recent dual and quad core like processors working with upto 3.5 GHz speed.





Tuesday, 7 June 2016

Components of a microprocessor-based system

Various components of a microprocessor-based system are:-
  1. The Microprocessor
  2. The Memory
  3. The Input Device
  4. The Output Device
  5. The Bus

Functions of various components of a microprocessor-based system


The functions of various components of a microprocessor-based system can be summarized as follows:

  1. The Microprocessor
  • Reads instructions from memory.
  • Communicates with all peripherals (memory and I/O) using the system bus.
  • Controls the timing of information flow.
  • Performs the computing tasks specified in a program.

     2. The Memory
  • Stores binary information called instructions and data.
  • Provides instructions and data to the microprocessor on request
  • Stores results and data for the microprocessor.


     3. The Input Device

  • Enters data and instructions under the control of a program such as a monitor program.

     4. The Output Device
  • Accepts data from the microprocessor as specified in a program.


     5. The Bus

  • carries bits between the microprocessor and memory and I/O.






Now what is a Micro controller and a Microcomputer?

Micro controller: 
A device that includes microprocessor, memory and input/output signal lines on a single chip, fabricated using VLSI technology.


Microcomputer:
A computer that is designed using a microprocessor as its CPU. It includes microprocessor, memory and input/output.







REFERENCE BOOK:
Ramesh S. Goankar, “Microprocessor Architecture,. Programming and Applications with 8085”, 5th Edition.



Introduction to Microprocessors

A microprocessor executes a collection of machine instructions that tell the processor what to do. 

An intel microprocessor 8085 chip



  • A microprocessor is a programmable logic device that can be used to control processes or to turn on/off devices.
  • It is a programmable integrated device that has complexity and decision-making capability similar to that of the Central Processing Unit(CPU) of a computer. 

Based on the instructions, a microprocessor does three basic things:

  1. Using its Arithmetic Logic Unit(ALU), a microprocessor can perform mathematical operations like: addition, subtraction, multiplication and division. Modern microprocessors contain complete floating point processors that can perform extremely sophisticated operations on large floating point numbers.
  2. A microprocessor can move data from 1 memory location to another.
  3. A microprocessor can make decisions and jump to a new set of instructions based on those decisions.








REFERENCE BOOK:
Ramesh S. Goankar, “Microprocessor Architecture,. Programming and Applications with 8085”, 5th Edition.