please dont rip this site

BIOS Serial UART Driver Routines

REF: PC Magizine Vol 10 No 8 Pg 178

"The 16550A UART: Breaking Old Bottlenecks"

The NS16550AF UART (Universal Asychtonous Receiver/Transmitter) contains two 16-byte FIFO (first in, first out) buffers vice the one byte register on the 8250 UART used in most machines. Systems with the newer chip may take advantage of it by activating the buffered mode as shown in the figure below. Slower machines using fast modems need these buffers, as do faster machines that attempt to run other programs in a multitasking mode while using asynchronous communications.

The buffers reduce the interrupt activity of the CPU because they can hold more data before generating an interrupt to request a transfer. This makes it easier for slower CPUs to avoid dropping characters when they receive a fast stream of data. The buffer may be set to receive 1, 4, 8, or 14 characters before the UART generates an interrupt.

Be aware that the plain 16550 (vice the 16550A) was flawed and will not work correctly if the FIFO buffers are activated. Also, some communications programs written before the introduction of the 16550A might lock up when the UART activates the previously unused upper bits of the Interrupt ID Register



        JMP  Start

U16550A:DB ' 16550A UART $'
U8250: DB ' 8250 UART $'

Start:  MOV  DX,03F8           ; PORT ADDRESS   - 0040:0000
        ADD  DX,+02            ; set offset to Interrupt ID Register
        MOV  AL,C1             ; set receive buffer to 14 and enable
        OUT  DX,AL             ; change the 14  = 0x0c to 1,4,or 8
        XOR  AX,AX
        IN   AL,DX
        PUSH AX

        AND  AL,C0             ; set up for 16550A UART
        CMP  AL,C0             ; is it a 16550A ?
        JNZ  No                ; no

Yes: LEA  DX,U16550A        ; yes
        JMP  StrOut

No: LEA  DX,U8250        ; print either 16550 or 8250

StrOut: MOV  AH,09
        INT  21

        POP  AX
        MOV  AH,4C             ; show the IIR setup as errorlevel
        INT  21
        RET




file: /Techref/io/serial/16550af.htm, 2KB, , updated: 2013/7/23 10:27, local time: 2024/12/14 05:58, owner: gv-coepa-ED6,
TOP NEW HELP FIND: 
18.97.14.90:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/io/serial/16550af.htm"> io serial 16550af</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .