PROGRAMMABLE COMMUNICATION INTERFACE – IC 8251
AIM:
            To establish the communication between two microprocessor systems using 
RS 232C.
APPARATUS REQUIRED:
            1. RS 232 Cable
            2. 8251 – Interface board
            3. 8085 – Microprocessor kit (2)
            4. Flat ribbon cable
DESCRIPTION:
            IC 8251 – PROGRAMMABLE COMMUNICATION INTERFACE
The 8251 is used here as a peripheral device for several communication and is programmed by CPU to operate using virtually any several data transmission technique. 
The USART accepts data characters from the CPU in parallel Format and converts to several and it also receivers several data and convert to parallel.
            Main Features of 8251 are
                     1) Both Synchronous and Asynchronous operation
                     2) False start bit detection
                     3) Automatic break detect and handling
                     4) Clock rate 1, 16, or 64 time band rate
                     4) Error detection - parity, overrun and framing errors.
                     5) Break characters generation
  The control pins with which the 8251 A communicates with the CPU are the RESET, 
CONTROL SIGNAL 8251A:
                     Obviously a USART such as the 8251 A is not directory compatible with RS 232C signal levels we can interface TTL signals of the 8251A to RS 232C signals If the Jumper in this interface and removed and the jumpers in the jumper table under CRT are inserted then this circuit will produce and accept RS232C signals. The 8251A is used as the serial port on SDIC-86 boards.  It is also used on the IBM PC synchronous communication board and on many other boards.  The D0-D7 act as data bus the chip select is input is connected to an address decoder so the device is enabled when addressed. C/D means control or data is to be write read RD read data command WR write data or Control command .The TXC is the transmit shift register clock input RXC is the receive shift register input when connected with another system for several communication the signals With connect with CTS, RTS, TXD and RXD signals of that system
CTS: Clear to send: Enable 8251 to transmit several data
RTS: Request to send: When low, indicates that 8251 A can receive serial data
TXD: Transmit serial data
RXD: Receive serial data.
ALGORITHM:
            1. Start the program 
             2. Initialize the mode format of 8253
            3. Get the i/p to check for transmitter empty
            4. And immediately 04 with the accumulator
            5. Jump on zero to step 3
            6. Transmit the data
            7. Stop the program
MASTER PROGRAM: TRANSMITTER PROGRAM
|     ADDRESS  |        OPCODE  |        LABEL  |        MNEMONICS  |        COMMENTS  |   
|     4100  |        3E,36  |        START  |        MVI A, 36  |        MODE SET FROM 8253  |   
|     4102  |        D3,CE  |        |        OUT 0CEH  |        |   
|     4104  |        3E,0A  |        |        MVI A, 0A  |        TIMER   INITIALIZATION  |   
|     4106  |        D3,C8  |        |        OUT DC8H  |   |
|     4108  |        3E,00  |        |        MVI A, 00  |   |
|     410A  |        D3,C8  |        |        OUT OC8H  |   |
|     410C  |        3E,4E  |        |        MVI A,4E  |        MODE   SET FOR 8251  |   
|     410E  |        D3,C2  |        |        OUT 0C2H  |        |   
|     4110  |        3E,37  |        |        MVI A,37  |        |   
|     4112  |        D3,C2  |        |        OUT 0C2H  |        |   
|     4114  |        DB,C2  |        LOOP  |        IN 0C2H  |        CHECK   FOR TRANSMITTER EMPTY  |   
|     4116  |        E6,04  |        |        ANI 04  |        |   
|     4118  |        CA,14,41  |        |        JZ LOOP  |        |   
|     411B  |        3E,41  |        |        MVI A,41H  |        |   
|     411D  |        D3,C0  |        |        OUT 0COH  |        DATA   IS TRANSMITTED.  |   
|     411F  |        CF  |        |        RST 1  |        |   
SLAVE PROGRAM: RECEIVER PROGRAM
   ADDRESS |        OPCODE  |        LABEL  |        MNEMONICS  |       COMMENTS |   
|     4200  |        3E,36  |        START  |        MVI A, 36  |        MODE   SET FOR 8253  |   
|     4202  |        D3,CE  |        |        OUT 0CEH  |        |   
|     4204  |        3E,0A  |        |        MVI A, 0A  |        |   
|     4206  |        D3,C8  |        |        OUT    OC8H  |        |   
|     4208  |        3E,00  |        |        MVI A, 00  |        |   
|     420A  |        D3,C8  |        |        OUT 0C8H  |        |   
|     420C  |        3E,4E  |        |        MVI A,4E  |        MODE   FOR 8251  |   
|     420E  |        DE,C2  |        |        OUT 0C2H  |        |   
|     4210  |        3E,37  |        |        MVI A, 37  |        STATUS   WORD FOR 8251.  |   
|     4212  |        D3,C2  |        |        OUT 0C2H  |        |   
|     4214  |        DB,C2  |        LOOP1  |        IN 0C2H  |        CHECK   RECIVER IS READY  |   
|     4216  |        E6,02  |        |        ANI 02  |        |   
|     4219  |        CA,14,42  |        |        JZ LOOP1  |        JUMP   ON ZERO TO ADDRESS  |   
|     421B  |        DB,C0  |        |        IN 0C0H  |        |   
|     421D  |        32,50,41  |        |        STA 4150H  |        STORE   DATA  |   
|     4220  |        CF  |        |        RST 1  |        |   
OUTPUT:
Master:         TRANSMITTER END - 41           Slaves:           RECEIVER END - 41
RESULT:
            Thus the interface program for communication between two microprocessor using RS 232C was executed and the results are verified.
No comments:
Post a Comment