SCIENTIFIC-LINUX-USERS Archives

July 2009

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Feero <[log in to unmask]>
Reply To:
Bill Feero <[log in to unmask]>
Date:
Wed, 29 Jul 2009 14:05:21 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
On Tuesday 28 July 2009, you wrote:
> WILLIAM J LUTTER wrote:
> > SUMMARY I'm running SL 5.0 (Boron) with kernel 2.6.18-92.1.22.el5.   I have a
> > 15 year old digitizer unit with vanilla 8N1 (8 bits, no parity, one stop bit)
> > serial port parameters.
> > 
> > When I send the unit a status prompt which returns 55 characters, it comes
> > back using a c "read(fd,data,80) (read in up to 80 bytes) as 8 bytes per read
> > - as if there is an 8 byte buffer associated with the 16550A UART serial
> > port.
> 
> the 16550 uart has a 16 byte fifo buffer.
> 
> if you are using a 'canned' i/o to read/write the 16550, that could be causing
> your problems.
> 
> i would suggest that you pull http://www.national.com/ds/PC/PC16550D.pdf and
> read so that you can write your own i/o to get interface that you want.
> 
> hth.
> 
> 

You did not mention the baud rate you were using. You may need to enable hardware or software
flow control, depending on what the digitizer supports. Flow control is needed for high baud rates (>9600)

It your baud rate is slow (<=9600), the device driver may be getting an interrupt when the FIFO is 1/2 full,
and it then pulls out the 8 bytes and sends it upstream to you.

If the digitizer ends each line of data with a newline, then using fgets might wait until the newline is
received before it returns the buffer.

Bill

ATOM RSS1 RSS2