Experiment-5 Reading a number from One Port and Sending it to another Port


Aim: Write a Program to read 16 bit Data from a port and display the same in another port.

Objectives: [

  • To learn configuring of Key board and display module with 8086 microprocessor using 8255PPI
  • Design algorithm and develop a program for accepting data from oneport and displaying it to LCD connected to other port.

Equipment Require:

KB Module, Display Module, 8086 trainer Kit

Theory: A Simple approach

We cn make use of the 8086 IN and OUT instruction to read the data from the device attached to a port and send the data to another port.

We can access the ports using direct addressing or indirect addressing

Direct address can be provided in the instruction

Indirect address is loaded in DX register.

here is  simple progrm statements for the reding from a port and writing to another port.

MOV DX, 0125h   ; Load DX wity the input port address

IN AL, DX             ; Read the data in reguiter AL from the specified port

MOV DX, 0135h  ; Load the output port address in DX register

OUT DX, AL        ; Transfer the data in AL at the specified port

HLT

Complex Approach : With Keyboard and display

 

 

error: Content is protected !!