16550 FIFO register 
Author Message
 16550 FIFO register



: I think the problem is because of the double buffering feature of the
:16550 UART, ie, the 'first' character is not actually read out by the
:code above until the second character arrives and pushes the first down
:the FIFO.  Am I on the right track, and if so, how can I disable double
:buffering?

I believe that your problem is more likely due to your polling logic than
with buffering within the UART. If you care to explain when and how you
poll, I may be able to help you.

Best,
        -- Chuck Crayne
-----------------------------------------------------------

-----------------------------------------------------------

comp.lang.asm.x86 moderation panel member



Tue, 06 Aug 2002 03:00:00 GMT  
 16550 FIFO register

Quote:

>    I'm doing something like this on the rxing machine:

> mov     dx,03f8         ; load dx with com1 rx port address
> in      al,dx           ; read com1 rx charcater into al
> mov     ah,02h          ; prepare to send character to the screen
> INT     21h             ; output character to screen
>                         ; this program runs on a polling basis, checking CTS and                            >; RTS handshaking signals

  That looks like the right thing to do, but the more interesting
question is when to do it.  I'm not sure what you are polling.
RTS is an output, and CTS is flow control for your tx side.  It
shouldn't be involved in the rx side.

Quote:
>  I think the problem is because of the double buffering feature of the
> 16550 UART, ie, the 'first' character is not actually read out by the
> code above until the second character arrives and pushes the first down
> the FIFO.  Am I on the right track,

  No.  There is no such problem with the 16550.

  I have seen FIFO UARTs (other than 16550) in which reading the
rx data when none is available could get the FIFO out of sync.
I doubt that any 16550's have that design flaw, but just in
case, you might try a FIFO reset when you start, and then
only read the rx data when some is available.

Quote:
> and if so, how can I disable double
> buffering?

  You can disable the FIFO (beyond 2) buffering, but you can't
disable the 8250 compatible double buffering.  Anyway, you
shouldn't want to.

  If you are polling, you should poll the "received data
available" bit in the "line status" register.  There are
many 16550's on which polling the IIR is unreliable.  I
can't think of a third meaningful way to poll.
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/



Wed, 07 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. 16550 fifo

2. 16550 register compatible UART

3. A problem with interfacing with UART 16550

4. 16550 UART Model

5. synthesizable 16550 Verilog model

6. 16550 UART

7. 16550 Model

8. 16550 UARTS: 8251 compatible?

9. 16550 uart

10. Detecting 8250 versus 16550 com port

11. communications/16550 source wanted

12. 16550 UARTs

 

 
Powered by phpBB® Forum Software