Sunday, April 10, 2011

microprocessors & microcontrollers


AIM:
 To have an in depth knowledge of the architecture and programming of 8-bit and 16-bit Microprocessors, Microcontrollers and to study how to interface various peripheral devices with them.
OBJECTIVES :
1)To study the architecture and Instruction set of 8085 and 8086
2)To develop assembly language programs in 8085 and 8086.
3)To design and understand multiprocessor configurations
4)To study different peripheral devices and their interfacing to 8085/8086.
5)To study the architecture and programming of 8051 microcontroller 
8085 MICROPROCESSOR :
The first microprocessor was introduced in 1970 by Intel (named 4004).
It ran at the speed of 108KHz.
Four years later, Intel created the 8080 running at just over 2 Mhz.
This microprocessor was used on the world's firs personal computer, named Altair.
Also at this time, IBM started researching for their microprocessor, called POWER (Performance Optimization With Enhanced RISC). 
 MICROPROCESSOR ARCHITECTURE: 
1)Control Unit
2)Arithmetic Logic Unit
3)Registers
4)Accumulator
5)Flags
6)Program Counter (PC)
7)Stack Pointer (SP)
8)Instruction Register/Decoder
9)Memory Address Register
10)General Purpose Registers
11)Control Generator
12)Register Selector
13)Microprogramming
  INSTRUCTION SET:
Based on functions:
1)Data transfer instructions
2)Arithmetic instructions
3)Logical instructions
4)Branch instructions
5)Machine control
Based on Length:
1)One word or 1-byte instructions
2)Two word or 2-byte instructions
3)Three word or 3-byte instructions   
 
8085 INSTRUCTIONS SET :
 
*The 8085 instructions can be classified as follows:


#Data transfer operations
Between Registers
Between Memory location and a Registers
Direct write to a Register/Memory
Between I/O device and Accumulator

# Arithmetic operations (ADD, SUB, INR, DCR) 
# Logic operations
#Branching operations (JMP, CALL, RET)


8085 INSTRUCTIONS TYPE :












 









































IMPLIED ADDRESSING:
  The addressing mode of certain instructions is implied by the instruction’s function.   For example, the STC (set carry flag) instruction deals only with the carry flag, the   DAA (decimal adjust accumulator) instruction deals with the accumulator.
REGISTER ADDRESSING:
  Quite a large set of instructions call for register addressing. With these instructions,   specify one of the registers A through E, H or L as well as the operation code. With   these instructions, the accumulator is implied as a second operand. For example,   the instruction CMP E may be interpreted as 'compare the contents of the E register   with the contents of the accumulator.       
  Most of the instructions that use register addressing deal with 8-bit values.   However, a few of these instructions deal with 16-bit register pairs.  For example, the   PCHL instruction exchanges the contents of the program counter with the contents   of the H and L registers.
IMMEDIATE ADDRESSING:
  Instructions that use immediate addressing have data assembled as a part of the   instruction itself. For example, the instruction CPI 'C' may be interpreted as   ‘compare the contents of the accumulator with the letter C. When assembled, this   instruction has the hexadecimal value FE43. Hexadecimal 43 is the internal   representation for the letter C. When this instruction is executed, the processor   fetches the first instruction byte and determines that it must fetch one more byte.   The processor fetches the next byte into one of its internal registers and then   performs the compare operation.                               


DIRECT ADDRESSING:
  Jump instructions include a 16-bit address as part of the instruction. For example,the
instruction JMP 1000H causes a jump to the hexadecimal address 1000 by  replacing 
the current contents of the program counter with the new value 1000H.   Instructions 
that include a direct address require three bytes of storage: one for 
the instructionscode, and two for the 16-bit address 

REGISTER INDIRECT ADDRESSING:
  Register indirect instructions reference memory via a register pair. Thus, the  
instruction MOV M,C moves the contents of the C register into the memory address  
  stored in the H and L register pair. The instruction LDAX B loads the accumulator
  with the byte of data specified by the address in the B and C register pair.