Microprocessor & Interfacing Tittle: Interfacing Pheripheral 8251 With 8086
Microprocessor & Interfacing Tittle: Interfacing Pheripheral 8251 With 8086
Section 4
NAME ID
1.Odaa Mitiku.........................A/UR14342/10
2.Workisa Tilehun.....................A/UR14344/10
3.Jalle Lijalem........................A/UR14280/10
4.Tullu Kebede........................A/UR14400/10
5.Sirressa Ete.........................A/UR14393/10
6.Khelifa abdela......................A/UR14265/10
Contents:
Introduction
Block diagram of 8251
Contents of block diagram
Initializing the 8251
Interfacing the 8251 with 8086.
8251
INTRODUCTION:
The 8251A is a programmable serial communication interface chip designed for
synchronous and asynchronous serial data communication.
It supports the serial transmission of data.
Serial communication is the common method of data transfer between
computer and peripherals.
serial data transmit one at a time.
Transmit data
Receive data
System 1 System 2
clk
Signal common
It is packed in a 28 pin DIP.
Receiver
Control Register
16-bit register for a control word consist of two independent bytes namely
mode word & command word.
Mode word : Specifies the general characteristics of operation such as baud,
parity, number of bits etc.
Command word : Enables the data transmission and reception.
Register can be accessed as an output port when the Control/Data pin is
high.
Status register
Checks the ready status of the peripheral.
Status word in the status register provides the information concerning
register status and transmission errors.
Data register
Used as an input and output port when the C/D is low
Modem Control
DSR - Data Set Ready : Checks if the Data Set is ready when communicating with a
modem.
DTR - Data Terminal Ready : Indicates that the device is ready to accept data when
the 8251 is communicating with a modem.
CTS - Clear to Send : If its low, the 8251A is enabled to transmit the serial data
provided the enable bit in the command byte is set to ‘1’.
RTS - Request to Send Data : Low signal indicates the modem that the receiver
is ready to receive a data byte from the modem.
8251 receiver
0000:1000 MOV AL, 4D ;Mode word 0000:1018 IN AL, 29 ;status word of reciever
0000:1002 OUT 29, AL ;for port B 0000:101A TEST AL, 02 ;rx rdy
0000:1004 OUT 31, AL ;for port A 0000:101C JZ 1018 ;loop if reciever not
ready
0000:1006 MOV AL, 27 ;CW
0000:101E IN AL, 28 ;accept the data from
0000:1008 OUT 29, AL ;port B
reciever
0000:100A OUT 31, AL ;port A
0000:1020 MOV [DI], AL ;mov this data to the
0000:100C MOV CL, 09 ;counter for nine nos destination
0000:100E MOV SI, 2000 ;location for source 0000:1022 INC SI ;increment and decrement
data counters
0000:1011 MOV DI, 5000 ;location for 0000:1023 INC DI
destination data
0000:1024 DEC CL
0000:1014 MOV AL, [SI] ; contents of si moved
0000:1026 JNZ 1014 ;Repeat these steps for
to al
the next number
0000:1016 OUT 30, AL ;data sent to port A
0000:1028 INT 3 ;Exit
transmitter
Demo for the assembly code using emu8086
to Interface Bluetooth with 8086 with 8251.