Tuesday, 17 October 2017 0 comments

How to add two 16 bit numbers in 8085

How to ADD two 16 Bit Number

Suppose we have to add two HEX numbers viz:
4351 & 3211.
First take the LSB of two number and ADD them. Then take the MSB of thw numbers and add them with CARRY.


CODE:

MVI A,51H
MVI B,11H
ADD B
STA 5000H
MVI A,43H
MVI B,32H
ADC B
STA 5002H
HLT



When this program will be executed then LSB will be saved at location 5000H and MSB will be saved at 5002H location
0 comments

8085 microprocessor pin diagram explanation

8085 microprocessor pin diagram explanation

The following image depicts the pin diagram of 8085 Microprocessor −
8085 Pin Configuration
The pins of a 8085 microprocessor can be classified into seven groups − 8085 microprocessor pin diagram explanation

Address bus

A15-A8, it carries the most significant 8-bits of memory/IO address.

Data bus

AD7-AD0, it carries the least significant 8-bit address and data bus.

Control and status signals

These signals are used to identify the nature of operation. There are 3 control signal and 3 status signals.
Three control signals are RD, WR & ALE.
  • RD − This signal indicates that the selected IO or memory device is to be read and is ready for accepting data available on the data bus.
  • WR − This signal indicates that the data on the data bus is to be written into a selected memory or IO location.
  • ALE − It is a positive going pulse generated when a new operation is started by the microprocessor. When the pulse goes high, it indicates address. When the pulse goes down it indicates data.
Three status signals are IO/M, S0 & S1.

IO/M

This signal is used to differentiate between IO and Memory operations, i.e. when it is high indicates IO operation and when it is low then it indicates memory operation.

S1 & S0

These signals are used to identify the type of current operation.

Power supply

There are 2 power supply signals − VCC & VSS. VCC indicates +5v power supply and VSS indicates ground signal.

Clock signals

There are 3 clock signals, i.e. X1, X2, CLK OUT. 8085 microprocessor pin diagram explanation
  • X1, X2 − A crystal (RC, LC N/W) is connected at these two pins and is used to set frequency of the internal clock generator. This frequency is internally divided by 2.
  • CLK OUT − This signal is used as the system clock for devices connected with the microprocessor.

Interrupts & externally initiated signals

Interrupts are the signals generated by external devices to request the microprocessor to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR. We will discuss interrupts in detail in interrupts section.
  • INTA − It is an interrupt acknowledgment signal.
  • RESET IN − This signal is used to reset the microprocessor by setting the program counter to zero.
  • RESET OUT − This signal is used to reset all the connected devices when the microprocessor is reset.
  • READY − This signal indicates that the device is ready to send or receive data. If READY is low, then the CPU has to wait for READY to go high.
  • HOLD − This signal indicates that another master is requesting the use of the address and data buses.
  • HLDA (HOLD Acknowledge) − It indicates that the CPU has received the HOLD request and it will relinquish the bus in the next clock cycle. HLDA is set to low after the HOLD signal is removed.

Serial I/O signals

There are 2 serial signals, i.e. SID and SOD and these signals are used for serial communication. 8085 microprocessor pin diagram explanation
  • SOD (Serial output data line) − The output SOD is set/reset as specified by the SIM instruction.
  • SID (Serial input data line) − The data on this line is loaded into accumulator whenever a RIM instruction is executed.
Tuesday, 22 September 2015 0 comments

Solution of interfacing using RAM and ROM both at a time

Solution of interfacing using RAM and ROM both at a time.

As we know that a data is stored only in one memory location and we also know that a data is received or transmittted through only one memory at a time. It means only one memory will be processing at a time. So RAM and ROM are connected to the same address lines. As you can see in the figure that a NOT gate has been used here. It will select only one memory at a time.

A0 to A14 pins is connected to ROM and A0 to A15 pins is connected to RAM. Pin A15 has been used for selecting the memory either it will use RAM or ROM.

4 comments

Control And Status Signal


Control And Status Signal:-
S0 and S1:-It is used for the status signal in microprocessor.

ALE(Airthmetic Latch Enable):-This signal is used to capture the lower address presented on multiplexed address and data bus.

RD:-This is active low input generally
 used for reading operation.

WR:-This is active low input used for writing operation.

IO/M:-This pin is used to select the memory or input-output through which we want to communicate the data.

READY:-As we know that memory and input -output have slower response than microprocessor. So a microprocessor may now be able to handle further data till it completes the present job. So it is in waiting state. As it completes the present job it sets the READY pin. Microprocessor enters into wait state while READY pin is disabled.
RESET IN:-This is active low input. This pin is used to reset the microprocessor. An active low signal applied to this pin reset the program counter inside the microprocessor. The busses are tristated.
RESETOUT:-If we want to reset the external devices connected to the microprocessor then a signal applied to this pin resets the external devices.


DMA Request Signal:
HOLD and HLDA:-HOLD is an active high input signal used by the other controller to request microprocessor about use of address, data and control signal. The HOLD and HLDA signal are used for direct memory access(DMA). DMA controller receives a requests from a device and in turn issues the HOLD signal to the microprocessor.
The processor releases the system bus and then acknowledges the HOLD signal with HLDA signal. The DMA transfer thus begins.
0 comments

Latch pulse and Clock pulse

Latch: A bistable circuit that is set and reset by appropriate input signals. An electronic circuit that records the status of a signal until it is reset. A latch is a kind of bistable multivibrator, an electronic circuit which has two stable states and thereby can store one bit of information. Today the word is mainly used for simple transparent storage elements.


Clock Pulse: A synchronization signal provided by a clock. A periodic signal used for
synchronization and for measuring intervals of time.
Friday, 21 August 2015 1 comments

Video Explaining Microprocessor 8085 Working


Saturday, 25 April 2015 0 comments

8085 Microprocessor interview Questions and Answer

1. What are the various registers in 8085?
- Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085 .

2. In 8085 name the 16 bit registers?
- Stack pointer and Program counter all have 16 bits.

3. What are the various flags used in 8085?
- Sign flag, Zero flag, Auxillary flag, Parity flag, Carry flag.

4. What is Stack Pointer?
- Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the stack.

5. What is Program counter?
- Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction.

6. Which Stack is used in 8085?
- LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored information can be retrieved first.

7. What happens when HLT instruction is executed in processor?
- The Micro Processor enters into Halt-State and the buses are tri-stated.

8. What is meant by a bus?
- A bus is a group of conducting lines that carriers data, address, & control signals.

9. What is Tri-state logic?
- Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. Tri-state logic has a third line called enable line.

10. Give an example of one address microprocessor?
- 8085 is a one address microprocessor.

11. In what way interrupts are classified in 8085?
- In 8085 the interrupts are classified as Hardware and Software interrupts.

12. What are Hardware interrupts?
- TRAP, RST7.5, RST6.5, RST5.5, INTR.

13. What are Software interrupts?
- RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7.

14. Which interrupt has the highest priority?
- TRAP has the highest priority.

15. Name 5 different addressing modes?
- Immediate, Direct, Register, Register indirect, Implied addressing modes.

16. How many interrupts are there in 8085?
- There are 12 interrupts in 8085.

17. What is clock frequency for 8085?
- 3 MHz is the maximum clock frequency for 8085.

18. What is the RST for the TRAP?
- RST 4.5 is called as TRAP.

19. In 8085 which is called as High order / Low order Register? - Flag is called as Low order register & Accumulator is called as High order Register.

20. What are input & output devices?
- Keyboards, Floppy disk are the examples of input devices. Printer, LED / LCD display, CRT Monitor are the examples of output devices.

21. Can an RC circuit be used as clock source for 8085?
- Yes, it can be used, if an accurate clock frequency is not required. Also, the component cost is low compared to LC or Crystal.

22. Why crystal is a preferred clock source?
- Because of high stability, large Q (Quality Factor) & the frequency that doesn’t drift with aging. Crystal is used as a clock source most of the times.

23. Which interrupt is not level-sensitive in 8085?
- RST 7.5 is a raising edge-triggering interrupt.

24. What does Quality factor mean?
- The Quality factor is also defined, as Q. So it is a number, which reflects the lossness of a circuit. Higher the Q, the lower are the losses.

25. What are level-triggering interrupt?
- RST 6.5 & RST 5.5 are level-triggering interrupts


  • 26.Which Stack is used in 8085?
  • LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored information can be...

  • 27.What are the various registers in 8085?
  • Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085...

  • 28.What are the various registers in 8085?
  • Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085...

  • 29.In 8085 name the 16 bit registers?
  • Stack pointer and Program counter all have 16 bits....

  • 30.What is Stack Pointer?
  • Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the...

  • 31.Which StacWhich Stack is used in 8086? k is used in 8086?
  • FIFO (First In First Out) stack is used in 8086.In this type of Stack the first stored information is retrieved...

  • 32.How can I handle a destructor that fails?
  • Write a message to a log-file. But do not throw an exception. The C++ rule is that you must never throw...

  • 33.In what way interrupts are classified in 8085?
  • In 8085 the interrupts are classified as Hardware and Software interrupts....

  • 34.What method is used to place a value onto the top of a stack?
  • push() method, Push is the direction that data is being added to the stack. push() member method places a value...

  • 35.What is clock frequency for 8085?
  • 3 MHz is the maximum clock frequency for 8085....
    36.What is clock frequency for 8085?
    3 MHz is the maximum clock frequency for 8085.
    37.Give an example of one address microprocessor?
    8085 is a one address microprocessor.
    38.Give examples for 8 / 16 / 32 bit Microprocessor?
    8-bit Processor - 8085 / Z80 / 6800; 16-bit Processor - 8086 / 68000 / Z8000; 32-bit processor - 80386 / 80486
    39.What is meant by a bus?
    A bus is a group of conducting lines that carriers data, address, & control signals.
    40.What are the various registers in 8085?
    Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085
    41.Why crystal is a preferred clock source?
    Because of high stability, large Q (Quality Factor) & the frequency that doesn?t drift with aging. Crystal is used as a clock source most of the times.
    42.In 8085 which is called as High order / Low order Register?
    Flag is called as Low order register & Accumulator is called as High order Register.
    43.Name 5 different addressing modes?
    Immediate, Direct, Register, Register indirect, Implied addressing modes
    44.In what way interrupts are classified in 8085?
    In 8085 the interrupts are classified as Hardware and Software interrupts.
    45.What is the difference between primary & secondary storage device?
    In primary storage device the storage capacity is limited. It has a volatile memory. In secondary storage device the storage capacity is larger. It is a nonvolatile memory. Primary devices are: RAM / ROM. Secondary devices are: Floppy disc / Hard disk.
    46.Which Stack is used in 8085?
    LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored information can be retrieved first.
    47.What is Program counter?
    Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction.
    48.What is the RST for the TRAP?
    RST 4.5 is called as TRAP.
    49.What are level-triggering interrupt?
    RST 6.5 & RST 5.5 are level-triggering interrupts.
    50.Which interrupt is not level-sensitive in 8085?
    RST 7.5 is a raising edge-triggering interrupt.
    51.What are Software interrupts?
    RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7.
    52.What are the various flags used in 8085?
    Sign flag, Zero flag, Auxiliary flag, Parity flag, Carry flag.
    53.In 8085 name the 16 bit registers?
    Stack pointer and Program counter all have 16 bits.
    54.What is Stack Pointer?
    Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the stack.
    55.What happens when HLT instruction is executed in processor?
    The Micro Processor enters into Halt-State and the buses are tri-stated.
    56.What does Quality factor mean?
    The Quality factor is also defined, as Q. So it is a number, which reflects the lossness of a circuit. Higher the Q, the lower are the losses.
    57.How many interrupts are there in 8085?
    There are 12 interrupts in 8085.
    58.What is Tri-state logic?
    Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. Tri-state logic has a third line called enable line.
    59.Which interrupt has the highest priority?
    TRAP has the highest priority
    60.What are Hardware interrupts?
    TRAP, RST7.5, RST6.5, RST5.5, INTR
    61.Can an RC circuit be used as clock source for 8085?
    Yes, it can be used, if an accurate clock frequency is not required. Also, the component cost is low compared to LC or Crystal
     
    ;