Here i discus about Basic of Microprocessor 8085 . To know Microprocessor at first you have to clear some basic question. Here i give you some question with their answer which i already answered at my previous post. Click on the topic bellow and see the Answer those are.....
Showing posts with label architecture. Show all posts
Showing posts with label architecture. Show all posts
17 Jul 2013
3 Jun 2013
How to interfacing I/O with Matrix Type Keypad
Most of microprocessor applications require a keypad for users to enter numbers and commands. But interfacing of I/O matrix type keypad is not easy . Here i write about How to interfacing I/O with Matrix Type Keypad .
Figure 2 shows the internal structure of the 4 x 3 matrix keypad. The keypad consists of an array of momentary pushbuttons switch or key. Each row and each column of the pushbutton are connected to a common line. There are 3 column line and 4 row line. Each pushbutton has two terminals; one is connected to a column line and other to a row line. When the key is pressed, the adjacent row and column are connected. For example if key ‘8’ is pressed, row 2 and column 1 will connect to each other. Table 1
below shows the combinations of other key pressed.
below shows the combinations of other key pressed.
The usual way to interface a keypad to a microprocessor is by connecting input/output (I/O) port bits to row and column connections on the keypad. The keypad is wired in a matrix arrangement so that when a key is pressed one row is shorted to one column. It’s relatively easy to write a routine to scan the keypad, detect key presses, and determine which key was pressed. Another alternative is to use the 74C922 keypad encoder chip.
This device accepts input from a 16- keypad, performs all of the required scanning and debouncing, and outputs a “data available” (DA) bit and 4 output bits representing the number of the key pressed from 0 to 15. Figure 3 show the connections between 4 x 3 matrix keypad with 74C922.
This device accepts input from a 16- keypad, performs all of the required scanning and debouncing, and outputs a “data available” (DA) bit and 4 output bits representing the number of the key pressed from 0 to 15. Figure 3 show the connections between 4 x 3 matrix keypad with 74C922.
Circuit Diagram
20 Mar 2013
What is a control word and how it write ?
As i mansion my earlier post that is send by programer to make understand 8255 that which port is Input and which one is Output. Now how we are do that ?
Format of Control Word
Mode Definition Control Byte. Indicate by bit b7=1.
Port A and upper half of Port C (Group A)
Bit b3 to bit b6 control the mode and direction of Group A
b6, b5 mode operation
0 0 mode 0
0 1 mode 1
1 0 mode 2
b4 Port A direction, 0=output, 1=input
b3 upper half of Port C direction, 0=output, 1=input
Port B and lower half of Port C (Group B)
Bit b0 to bit b2 control the mode and direction of Group B
b2 mode operation, 0=mod 0, 1=mod 1
b1 Port B direction, 0=output, 1=input
lower half of Port C direction, 0=output, 1=input
Now take a Example that we need Port A as a input Port and Port B as a Out put Port What will be the Control Word ?
For that we need Bit D7 =1 ( For Input/Output Operation )
D6 =0
D5 =0
D4 =1 ( For Port A as Input)
D3 =0
D2 =0
D1 =0 (For Port B as Output)
D0 =0
So finally we got the number 10010000 or 90H.
Format of Control Word
Mode Definition Control Byte. Indicate by bit b7=1.
Port A and upper half of Port C (Group A)
Bit b3 to bit b6 control the mode and direction of Group A
b6, b5 mode operation
0 0 mode 0
0 1 mode 1
1 0 mode 2
b4 Port A direction, 0=output, 1=input
b3 upper half of Port C direction, 0=output, 1=input
Port B and lower half of Port C (Group B)
Bit b0 to bit b2 control the mode and direction of Group B
b2 mode operation, 0=mod 0, 1=mod 1
b1 Port B direction, 0=output, 1=input
lower half of Port C direction, 0=output, 1=input
Now take a Example that we need Port A as a input Port and Port B as a Out put Port What will be the Control Word ?
For that we need Bit D7 =1 ( For Input/Output Operation )
D6 =0
D5 =0
D4 =1 ( For Port A as Input)
D3 =0
D2 =0
D1 =0 (For Port B as Output)
D0 =0
So finally we got the number 10010000 or 90H.
WHAT IS PROGRAMMABLE PERIPHERAL INTERFACE 8255 ?
The 8255 Programmable Peripheral Interface (PPI) is a general purpose interface device which is widely used in microprocessor design. It contains three independent 8 bit ports named Port A, B and C. Port A and B can be programmed as either input or output (all eight line must be same), while port C is split into two 4 bit halves (Port C upper (PC4- PC7) and Port C lower (PC0-PC3)) that can be separately programmed as input or output.
There are four registers that control the operations of the PPI and they are mapped to four address locations in the 8085 Development System as shown below:Port Address
Port A Register 80H
Port B Register 81H
Port C Register 82H
Control Register 83H
Now question is what are the work of those resister ?
First three resister ( Port A,Port B,Port C) are the address resister it provide the identity of the Ports. And Control Register it has a main work to control them. It control Which Port is Input and Which is output depending on programer Control Word .
13 Mar 2013
How simple can a microprocessor-based system actually be?
A Microprocessor must be contain a microprocessor otherwise it is simply another electronic circuit. A microprocessor must be programmed. This means that it must be provided with a series of instructions to be followed. However we program the microprocessor, the result is a series of binary numbers that represent the simple step by step instructions to be followed. These instructions must be stored in some memory. But do the instructions have to be stored in RAM or ROM. Now Question is Where it store ? It must be in ROM. Remember that RAM will hold random data when first switched on and if our microprocessor was controlling the operation of a dynamite factory, the last thing that we would want is for it to start following random instructions at the rate of a million a second.
7 Mar 2013
How the vector address for a software interrupt is determined?
The calculation process of vector address for a software interrupt is Very Simple
Vector address ( of Software Interrupt ) = Interrupt number × 8
For example, the vector address for RST 5 is calculated as
5 × 8 = 40)10 = 28)H
So Vector address for RST 5 is 0028H.
Vector address ( of Software Interrupt ) = Interrupt number × 8
For example, the vector address for RST 5 is calculated as
5 × 8 = 40)10 = 28)H
So Vector address for RST 5 is 0028H.
What is meant by ‘addressing mode’ in a Microprocessor ?
Every instruction which indicates an operation to be performed on certain data inside a Microprocessor. Now The methods to specify the data for the instructions, known as ‘addressing modes’. Remember The Execution Unit ( EU ) of a Microprocessor can access all resistor and Data which is store in Resistor or Immediate operands. The EU dose not have direct access over a Memory Location so some methods is needed to access those Data this is known as Addressing Modes
For 8085 microprocessor, there are mainly five addressing modes. These are:
Direct Addressing: In this mode, the operand is specified within the instruction itself that means in instruction we can find that from/to where data is being access because address is given in Operand. Examples of this type are:For 8085 microprocessor, there are mainly five addressing modes. These are:
- Direct addressing
- Register addressing
- Register indirect addressing
- Immediate addressing
- Implicit addressing.
LDA 4000H, STA 5513H, etc.
Register Addressing: In this mode of addressing, the operand are in the general purpose registers and data operation done between the register.
Examples are: MOV A, B ; ADD D, etc.
Register Indirect Addressing: MOV A, M; ADD M are examples of this mode of addressing. These instructions utilise 1-byte. In this mode, instead of specifying a register, a register pair is specified to accommodate the 16-bit address of the operand.
Immediate Addressing: MVI A, 07; ADI 0F are examples of Immediate Addressing mode. The operand is specified in the instruction in this mode. Here, the operand address is not specified But directly work with DATA.
Implicit Addressing: In this mode of addressing, the operand is fully absent. Examples are RAR, RAL, CMA, etc.
9 Sept 2012
What are the temporary registers of 8085?
In 8085 available temporary register are temporary data register and W and Z registers. These registers are not available to the programmer, but 8085 uses them internally to hold temporary data during execution of some instructions.
Now Question is How W and Z registers of 8085 works ?
W and Z are two 8-bit temporary registers, used to hold 8-bit data/address during execution of some instructions.
CALL-RET instructions are used in subroutine operations. On getting a CALL in the main program, the current program counter content is pushed into the stack and loads the PC with the first memory location of the subroutine. The address of the first memory location of the subroutine is temporarily stored in W and Z registers. Again, XCHG instruction exchanges the contents H and L with D and E respectively. W and Z registers are used for temporary storage of such data.
What is the accumulator register of 8085 ?
This 8-bit register is the most important one amongst all the registers of 8085. Any data
input/output to/from the microprocessor takes place via the accumulator (register). It is
generally used for temporary storage of data and for the placement of final result of
arithmetic/logical operations.
Accumulator (ACC or A) register is extensively used for arithmetic, logical, store and
rotate operations.
input/output to/from the microprocessor takes place via the accumulator (register). It is
generally used for temporary storage of data and for the placement of final result of
arithmetic/logical operations.
Accumulator (ACC or A) register is extensively used for arithmetic, logical, store and
rotate operations.
Why 8085 is a 8-bit microprocessor?
A microprocessor which has n data lines is called an n-bit microprocessor i.e., the width
of the data bus determines the size of the microprocessor. Hence, an 8-bit microprocessor
like 8085 can handle 8-bits of data at a time.
Because of 16 bit data bus 8086 called 16 bit microprocessor.
of the data bus determines the size of the microprocessor. Hence, an 8-bit microprocessor
like 8085 can handle 8-bits of data at a time.
Because of 16 bit data bus 8086 called 16 bit microprocessor.
4 Sept 2012
Why stack is used in a program?
The stack is used to store information temporarily during the execution of a program. Also the stack is used in subroutine calls to store the return address.
As an example, data generated at a certain point in a program may be needed later in the program. This data is stored in the stack and retrieved when needed. Because the number of general purpose registers (GPRs) in a microprocessor is limited–hence not all the temporary data can be stored in them and this is where the stack plays its part.
As an example, data generated at a certain point in a program may be needed later in the program. This data is stored in the stack and retrieved when needed. Because the number of general purpose registers (GPRs) in a microprocessor is limited–hence not all the temporary data can be stored in them and this is where the stack plays its part.
What is Stack Pointer ?
Now friend in my previous post i discuss on What is a stack? and in this post i discuss on What is stack pointer ? If we break that word we get Stack means a set of memory location in R/W memory and pointer means pointing something.In other word stack pointer means a 16-bi register which point the R/W memory location of Stack.
2 Sept 2012
What is a Stack in 8085 ?
In 8085 microprocessor stack is a set of memory location in the read/write memory which specified by the programmer in the main program.Those memory location are used to store binary information temporarily during execution of the program.
When we want to define any stack between any program we have to define starting address of the stack using LXI SP instruction, which is store 16 bit memory address in stack pointer register. After defining stack location in main program,storing of data bytes begin in memory location that is one less than the address in stack pointer register.
For example
If we stored memory address 2050H in stack pointer with LXI SP 2050H instruction then storing of data bytes begin at 2049H and continue revers numerical order that means decreasing memory address in Stack. So for good practice we have to define highest available memory for starting stack pointer to overcome conflict with main program address.
16 Aug 2012
Internal architecture of 8085 microprocessor
There are lots of Microprocessor on Market but here we are discus on 8085,8086.To know about microprocessor we have to know about Internal architecture of microprocessor
Functional Block Diagram of Intel 8085
The Block Diagram shows Some Unit in below i discus on that. The 8085 microprocessor (uP) called an 8 bit processor since its data length and data bus width is 8 bit.
Control Unit
It is a Unit generates control signals within uP to carry out the instruction, which has been decoded. Depending on the control signal certain connections between blocks of the uP to be opened or closed, so
that data goes where it is required, and so that ALU operations occur.
Arithmetic Logic Unit
The ALU stands for Arithmetic Logic Unit it performs the actual numerical and logic operation such as ‘add’, ‘subtract’,‘AND’, ‘OR’, etc. Uses data from memory and from Accumulator to perform arithmetic. Always stores result of operation in Accumulator.
Registers
Registers
The 8085/8080A-programming model includes six registers, one accumulator, and one flag register, as shown in Figure. In addition, it has two 16-bit registers: the stack
The 8085/8080A has six general-purpose registers to store 8-bit data; these are identified as B,C,D,E,H, and L as shown in the figure. 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.
Accumulator
The accumulator is an 8-bit register that is a part of arithmetic/logic unit (ALU). And accumulator is a main part of microprocessor it is used to store 8-bit data and to perform all arithmetic and logical operations.After execution any operation the result of an operation is stored in the accumulator. The accumulator is also identified as register A.
Flags
Flags is a brain of microprocessor it is a 8 bit register which are set or reset after an operation according
For example, after an addition of two numbers, if the sum in the accumulator id larger than eight bits, the flip-flop uses to indicate a carry -- called the Carry flag (CY) -- is set to one. When an arithmetic operation results in zero, the flip-flop called the Zero(Z) flag is set to one. The first Figure shows an 8-bit register, called the flag register, adjacent to the accumulator. However, it is not used as a register; five bit positions out of eight are used to store the outputs of the five flip-flops. The flags are stored in the 8-bit register so that the programmer can examine these flags (data conditions) by accessing the register through an instruction.These flags have critical importance in the decision-making process of the microprocessor. The conditions (set or reset) of the flags are tested through the software instructions. For example, the instruction JC (Jump on Carry) is implemented to change the sequence of a program when CY flag is set. The thorough understanding of flag is essential in writing assembly language programs.
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 microprocessor uses this register to sequence the execution of the instructions.The function of the program counter 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
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 the stack. The beginning of the stack is defined by loading 16-bit address in the stack pointer. The stack concept is explained in the chapter "Stack and Subroutines."
Instruction Register/Decoder
Temporary store for the current instruction of a program. Latest instruction sent here from memory prior to execution. Decoder then takes instruction and ‘decodes’ or interprets the instruction. Decoded instruction then passed to next stage.
Memory Address Register
Holds address, received from PC, of next program instruction. Feeds the address bus with addresses of location of the program under execution.
Control Generator
Generates signals within uP to carry out the instruction which has been decoded. In reality causes certain connections between blocks of the uP to be opened or closed, so that data goes where it is required, and so that ALU operations occur.
Register Selector
This block controls the use of the register stack in the example. Just a logic circuit which switches between different registers in the set will receive instructions from Control Unit.
General Purpose Registers
uP requires extra registers for versatility. Can be used to store additional data during a program. More complex processors may have a variety of differently named registers.
Subscribe to:
Comments (Atom)


