[comp.sys.sgi] Help needed to read bits on Iris serial ports

jonmc@bruce.cs.monash.OZ.AU (jon mccormack) (06/18/91)

I'm trying to access the serial port of a Personal Iris on a bit level. I
need to be able to poll the receive pin of the port and see if it's a
1 or 0. It would be nice to look at the DTR, RTS, etc. pins as well. 
The information comming in wont be in sync so I can't just read
a whole byte at any specific baud rate. 

Can anybody help on this? Information and/or sample code would be 
much appreciated.

Thanks in Advance,

Jon McCormack.

Computer Science
Monash University
Melbourne, AUSTRALIA
email: jonmc@bruce.cs.monash.edu.au

olson@anchor.esd.sgi.com (Dave Olson) (06/19/91)

In <4463@bruce.cs.monash.OZ.AU> jonmc@bruce.cs.monash.OZ.AU (jon mccormack) writes:


| I'm trying to access the serial port of a Personal Iris on a bit level. I
| need to be able to poll the receive pin of the port and see if it's a
| 1 or 0. It would be nice to look at the DTR, RTS, etc. pins as well. 
| The information comming in wont be in sync so I can't just read
| a whole byte at any specific baud rate. 
| 
| Can anybody help on this? Information and/or sample code would be 
| much appreciated.

We don't provide any support for this.  Polling the status bits
would have to be done in the i/o space, and you would have to add
to the mmap struct in master.d/mem the pages in the i/o space that
map the duarts.  I don't remember what happens with the duarts, but
for some chips the status read has side effects that could mess up
the driver.

We don't even document the address at which the chip resides in the
io space.  As it happens, for the 4D20/25 (only!) it is at
0xbfb80000 and 0xbfb80004.  Figuring out how to proceed from there
is left as an exercise for the reader.:)  I'm not sure if it can be
made to work or not, but I wouldn't want to count on it.

Perhaps if the data is not synced up with the baud rate, and you
are just signalling some external event, you could do something
external to just cause a break to be generated instead, and then
setup your program so that port is the controlling terminal for
your program, and catch the SIGINT signal generated by the BREAK.