- Trending Categories
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
IN and OUT instructions in 8085 Microprocessor
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 mnemonics should be followed by an 8-bit port address. Thus we can have 28 = 256 input ports and 256 output ports are possible in 8085-based microcomputers. 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 OF-OFF states as shown below –
- Related Articles
- Number of instructions in 8085 Microprocessor
- Conditional JUMP instructions in 8085 Microprocessor
- Conditional call instructions in 8085 Microprocessor
- Conditional return instructions in 8085 Microprocessor
- Restart instructions (RSTn) in 8085 Microprocessor
- Instructions to perform AND operation in 8085 Microprocessor
- Conditional and Unconditional JUMP instructions in 8085 Microprocessor
- Unconditional call and return instructions in 8085 Microprocessor
- Instructions to perform addition in 8085 Microprocessor
- Instructions to rotate Accumulator in 8085 Microprocessor
- Instructions to perform subtraction in 8085 Microprocessor
- Difference between call and jump instructions in 8085 Microprocessor
- Instructions to perform OR operation in 8085 Microprocessor
- Instructions to perform compare operation in 8085 Microprocessor
- Instructions to perform Exclusive OR operation in 8085 Microprocessor
