Expt 05 IC 8251 Manual Mode Only

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

EXPERIMENT NO :- 05 AIM :- Study of IC 8251 (USART) interfacing & programming in various modes.

APPARATUS :- 8086 DYNA Kit, DYNA 8251 kit, 50 pin FRC cable, tags. THEORY :- The 8251 peripheral card is also called a (USART) Universal Synchronous Asynchronous Receiver Transmitter. It consists of 2 USART buffers to drive LEDs interrupts & GND tags. The peripheral card is interfaced through a 50 pin FRC cables to the DYNA 8086 kit. It has built in band rate generator. It allowed different types of communication. 1. 2. 3. 4. Asynchronous Transmission Asynchronous Reception Synchronous Transmission Synchronous Reception

GENERAL PROCEDURE :1. Keep the peripheral card to the left hand side of DYNA 8086 kit. 2. Connect DYNA 8251 kit to 8086 kit using 50 pin FRC cable. 3. Do not connect / remove DYNA 8251 to/from DYNA 8086 while power is ON. 4. Enter S/W code. 5. Execute the program. 6. 7. Address of Interrupt Service Routine. a. IRQ 5 0:0034H b. IRQ 6 0:0038H c. IRQ 7 0:003CH Generally IRQ is used. 8. Default I/O address range. a. Command port :- 31H b. Data Port :- 30H 9. Other I/O ranges are a. IOE x P1 38H 3FH b. IOE x P2 28H 3FH c. IOE x P3 3FH 10. I/O addresses can be selected through Dip Switch.

STATUS WORD FORMAT :DSR SYNC BRK DET DET FE OE PE TXE RXRDY TXRDY

1=Dataset Ready Frames Error 1=Error present 1=Sync. Data 0=Break defect Overflow Error 1=Error present

Transmitter Ready Ready=1 Receiver Ready Ready=1 Transmitter Empty 1=Empty 0=Not Empty

Parity Error 1=Error present

PROGRAM A PROBLEM STATEMENT :- Configure 8251 in Asynchronous Transmitter mode with following specifications(Manual Mode) 1. Select Baud Rate factor x 1 2. Character length 8 bits 3. Number of stop bits = 1 PROCEDURE :1. Feed the program. 2. Connect DSRA & CTSA to ground & Baud clock to manual clock using tags & make I/O address selection 1 & 6 ON. 3. Execute the program. 4. Observe the blinking of LED at T X D pin of selected 8251 after applying each clock pulse through pulses switch & note it. ALGORITHM :1. Initialize 8255 in Asynchronous mode i.e. load mode word in accumulator & out it to control section of 8251. 2. Initialize 8251 in Transmitter mode i.e. load word in accumulator & out it to control section of 8251. 3. Load data to be transmitted in accumulator. 4. Out data section of 8251. PROGRAM :-

FLOWCHART :-

START

INITIALIZE 8251 IN ASYN. TRANSMITTER MODE i.e. LOAD MW & CW.

LOAD DATA TO BE TRANSMITTED IN ACCUMULATOR.

OUT THIS DATA TO DATA SECTION OF 8251.

STOP

D7 D6 D5 D4 D3 D2 D1 D0 0 1 0 0 1 1 0 1 MODE WORD : 4D

RESULT ASYNCHRONOUS TRANSMITTER :TXD CLK 1 0 Marking 1 1 Initial 0 2 Start Bit 1 3 D0 1 4 D1 1 5 D2 1 6 D3 1 7 D4 1 8 D5 1 9 D6 1 10 D7 0 11 PARITY 1 12 STO P BIT 1 13 MARK

DATA : FE

PROGRAM B PROBLEM STATEMENT :- Configure 8251 in Asynchronous receiver mode for following specifications : (Manual Mode) 1. Select Bawd rate x 16 2. Character length = 8 Bits 3. Disable parity 4. Number of Stop Bits PROCEDURE :1. Feed the program. 2. Connect baud clock to manual clock using tags & make I/O address selection 1 & 6 ON. 3. Connect DSRA & CTSA to ground. 4. Connect TXDA to RXDA 5. Execute the program. 6. Check result on LED of RXD line & in register after applying each clock pulse through pulses switch & note it. ALGORITHM :1. Initialize 8251 i.e. Load mode word first & then command word to enable transmitter & receiver & set DTR & RTS bits. 2. Output data section of 8251. 3. Read status 8251. 4. Check if receiver is enabled. 5. If receiver is enabled, goto step (3). 6. If receiver is enabled, read data & store in Register. 7. Stop.

MODE WORD COMMAND WORD

: 0100 1101 : 4D :

PROGRAM :-

RESULT :TXD CLK 1 0 Marking 1 1 Initial 0 2 Status Bit 0 3 D0 1 4 D1 0 5 D2 1 6 D3 0 7 D4 1 8 D5 0 9 D6 1 10 D7 1 11 Parity 1 12 Stop bit 1 13 Mark

DATA : AA

You might also like