- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
I/O-mapped I/O in 8085 Microprocessor
Generally, a processor like 8085, to address one I/O port by sending out 8-bit port address and IO/M* = 1. For example, let us say, the chip select pin of an I/O port chip is activated when 8-bit address = F0H, IO/M* = 1, and RD* = 0. This is shown in the following fig.
Such I/O ports, which are addressed by the processor by sending out IO/M* as logic 1 are called I/O-mapped I/O ports.
An Input Output port is generally addressed by 8085 Processor by releasing the port address of 8-bit and IO/M* = 1. An example to be cited as the chip select pin of an Input Output port chip gets activated when the bit address of 8 bit is equal to F0H, and IO/M* is equal to 1 and RD* is equal to 0. We have shown the entire pin diagram in the following fig.
In 8085 Instruction set, there are two instructions in 8085 for communication with I/O ports. They are the IN and OUT instructions. The IN or OUT instruction mnemonic should be followed by an 8-bit port address. Thus we can have 2 8 = 256 input ports and 256 output ports are possible in 8085-based microcomputer. IN and OUT both are 2-Bytes instructions.
Mnemonics, Operand | Opcode (in HEX) | Bytes |
---|---|---|
IN Port-address | DB | 2 |
OUT Port-Address | D3 | 2 |
In case of IN instruction, the current 8-bit content of the PORT# will be made available on to the Accumulator. Let us suppose with the PORT#, 8 DIP switches are connected. And their states are ON-ON-OFF-ON-ON-ON-OFF-ON. So after execution of the instruction IN PORT#, the Accumulator content will be 1101 1101.
In case of OUT instruction, the current 8-bit content of the Accumulator will be copied on to the PORT#. Let us suppose that Accumulator’s initial content is 0101 0101. And with the 8-bit port 8 LEDs are connected. So after execution of the instruction OUT PORT#, LEDs will have the states as shown below −