16550_exercises-soln - ; odd parity, 8 bits data, 1 stop...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
16550 serial interface — Exercise 1 Write an instruction sequence to initialize a 16550 serial interface to operate as follows. Baud rate divisor = 60; data - 8 bits, odd parity, 1 stop bit; disable FIFO queues; low port address = 50H. DLL EQU 50H ; divisor latch low DLH EQU 51H ; divisor latch high LINEC EQU 53H ; line control FIFOC EQU 52H ; FIFO control MOV AL, 10000000B ; set up access to divisor latch OUT LINEC, AL MOV AX, 60 ; divisor value OUT DLL, AL ; lower divisor latch MOV AL, AH OUT DLH, AL ; upper divisor latch MOV AL, 00001011B
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; odd parity, 8 bits data, 1 stop bit OUT LINEC, AL MOV AL, 0 ; disable FIFO OUT FIFOC, AL 16550 serial interface Exercise 2 Write an instruction sequence to input 300 bytes by program-controlled I/O from the 16550 initialized above and store the data in buffer orange . DATA EQU 50H ; data port for input and output STATUS EQU 55H ; status port MOV DI, 0 MOV CX, 300 CKIN: IN AL, STATUS ; input from status register TEST AL, 1 ; poll DR bit JZ CKIN IN AL, DATA ; input data MOV ORANGE[DI], AL INC DI LOOP CKIN...
View Full Document

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

Ask a homework question - tutors are online