14.01.2015 Views

Interfacing the Serial/RS-232 Port

Interfacing the Serial/RS-232 Port

Interfacing the Serial/RS-232 Port

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Interfacing</strong> <strong>the</strong> <strong>Serial</strong> / <strong>RS</strong><strong>232</strong> <strong>Port</strong> V5.0<br />

AT's have a fast bus speed which <strong>the</strong> 8250 series of UART can't handle to well thus it is very<br />

unlikely to be found in any AT. However if you wish to test for <strong>the</strong>m as well you can follow <strong>the</strong> same<br />

test as above to distinguish 16550's or 16550A's from <strong>the</strong> rest. If no FIFOs are enabled <strong>the</strong>n a possible<br />

UART is <strong>the</strong> 16450, 8250, 8250A or 8250B. Once it is established <strong>the</strong> it could be one of <strong>the</strong>se four<br />

chips, try writing a byte to <strong>the</strong> scratch register and <strong>the</strong>n read it back and compare <strong>the</strong> results. If <strong>the</strong> results<br />

match <strong>the</strong>n you must have a scratch register, if <strong>the</strong>y don't you ei<strong>the</strong>r don't have a scratch register, or it<br />

doesn't work to well.<br />

From <strong>the</strong> descriptions of <strong>the</strong> UART above if you read back your byte from <strong>the</strong> scratch register<br />

<strong>the</strong>n <strong>the</strong> UART must be a 16450 or 8250A. (Both have scratch registers) If you don't read back your byte<br />

<strong>the</strong>n it's ei<strong>the</strong>r a 8250 or 8250B.<br />

The 16750 has 64 byte FIFO's, thus <strong>the</strong> easiest way to test for it's presence is to enable <strong>the</strong> 64<br />

byte buffer using <strong>the</strong> FIFO Control Register and <strong>the</strong>n read back <strong>the</strong> status of <strong>the</strong> Interrupt Identification<br />

Register. However I have never tested this.<br />

<strong>Interfacing</strong> <strong>the</strong> <strong>Serial</strong> / <strong>RS</strong><strong>232</strong> <strong>Port</strong> V5.0 Page 32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!