03-08-2013, 02:40 PM
INTERFACING 8251 (USART) WITH 8085 PROCESSOR
AIM:
To write a program to initiate 8251 and to check the transmission and reception of
character
THEORY:
The 8251 is used as a peripheral device for serial communication and is programmed
by the CPU to operate using virtually any serial data transmission technique. The USART
accepts data characters from the CPU in parallel format and then converts them into a
continuous serial data stream for transmission. Simultaneously, it can receive serial data
streams and convert them into parallel data characters for the CPU. The CPU can read the
status of USART ant any time. These include data transmission errors and control signals.
Prior to starting data transmission or reception, the 8251 must be loaded with a set
of control words generated by the CPU. These control signals define the complete
functional definition of the 8251 and must immediately follow a RESET operation. Control
words should be written into the control register of 8251.
COMMAND INSTRUCTION WORD
This format defines a status word that is used to control the actual operation of
8251. All control words written into 8251 after the mode instruction will load the command
instruction.
The command instructions can be written into 8251 at any time in the data block
during the operation of the 8251. to return to the mode instruction format, the master reset
bit in the command instruction word can be set to initiate an internal reset operation which
automatically places the 8251 back into the mode instruction format. Command instructions
must follow the mode instructions or sync characters.
ALGORITHM:
Initialise timer (8253) IC
Move the mode command word (4E H) to A -reg
Output it to port address C2
Move the command instruction word (37 H) to A -reg
Output it to port address C2
Move the the data to be transferred to A -reg
Output it to port address C0
Reset the system
Get the data through input port address C0
Store the value in memory
Reset the system
RESULT:
Thus the 8251 was initiated and the transmission and reception of character was
done successfully.