WORKING OF MICRO-PROCESSOR-SOME MORE DEEPLY
































































* address bus is a uni-directional bus
from micro-processor to peripheral >>16 bit width

* data bus: bi-directional

# 8 bit AD0-AD7
# 2^8 peripherals

* control bus


# MEMR==memory read
# MEMW==memory write
# IOR==input output read
# IOW==input output write

***control bus compared of various single lines that carries synchronization signals . the micro-processor use this lines to provide timing signals

the micro-processor generate specific controller signals for every operations. it performs , such as memory read or input/output write

these signals are used to identified a device time with which micro-processor intense to communicate


** general purpose register:::store data during programe execution.this register are accessible by the user. or it is programmable.
B,C,D,E,H,L
register .they are 8 bit register.
accumulator also 8 bit register

** stack pointer & program counter are 16 bit register
**if there is a need of 16 bit operation. they can pair. that means they can pair as BC,DE, HL total 8+8 = 16 bit( BL like pairing not possible)

.................................................................................................

**FLAG REGISTER**


.............................................................................................














# C - carry flag
# P - parity flag
# AC - auxiliary carry flag
# Z - zero flag
# S - sign flag

****************flag register also 8-bit register***************

5 flip - flop that set or reset according to the result of the arithmetic operation perform by ALU

** CARRY FLAG**

during the addition of two number . if they have sum in accumulator is greater than 8-bit . the flip-flop used to indicate the carry is set to one otherwise reset

** PARITY FLAG**

after the arithmetic operation if the result have been even number of one then the parity flag set.for odd number of one then the parity flag reset.

** AUXILIARY CARRY FLAG**

in an arithmetic operation , when a carry is given by 3rdbit and passed on 4thbit. the AC flag will set.
for example : 1001 1100 and 1000 1001
1001 1100
1001 1001
......................
10011 0101
here position 1 and 1( 1001 1100 and 1001 1001) when we find sum there is sum=0 and carry = 1. then carry goto 3 rd bit to 4 th bit. then auxiliary carry flag set . equal=1.blue color 1 is present then carry flag set equal=1.

** ZERO FLAG**

after the arithmetic operation if the result is ZERO then the zero flag will set

** SIGN FLAG**

after the arithmetic operation if the last bit is one ( bit D7 result is one ) sign flag will set . equal= 1.

more ex: 101
0 0010
0101 1110
..................
10000 0000

#########################

**PROGRAM COUNTER**
......................................................

it is 16 bit register also memory pointer, micro-processor use this register to sequence the execution of instruction , the function of PROGRAM COUNTER is to point the memory address from which next bytes is to be fetch
when a bytes is being fetched program counter is incremented by one to point to the next memory location

#########################

**STACK POINTER**
.......................................................


stack pointer is also 16 bit register use as a memory pointer it points to the memory location in the read,write memory called stacks. beginning
of the stack is defined by loading a 16 bit address to the stack pointer

###########################

**INSTRUCTION REGISTER **
..........................................................


IR hold op-code of the current instruction.

###########################

**TEMPORARY REGISTER **
.........................................................


temporary register are 8 bit register associated with ALU. which hold data during arithmetic or logic operation . this register used by micro-processor and not accessibly by the user

############################

7chip.blogspot.com

Labels: