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 />

Interrupt Enable Register (IER)<br />

Bit<br />

Notes<br />

Bit 7<br />

Bit 6<br />

Reserved<br />

Reserved<br />

Bit 5 Enables Low Power Mode (16750)<br />

Bit 4 Enables Sleep Mode (16750)<br />

Bit 3<br />

Bit 2<br />

Bit 1<br />

Bit 0<br />

Enable Modem Status Interrupt<br />

Enable Receiver Line Status Interrupt<br />

Enable Transmitter Holding Register Empty Interrupt<br />

Enable Received Data Available Interrupt<br />

Table 7 : Interrupt Enable Register<br />

The Interrupt Enable Register could possibly be one of <strong>the</strong> easiest registers on a UART to<br />

understand. Setting Bit 0 high enables <strong>the</strong> Received Data Available Interrupt which generates an<br />

interrupt when <strong>the</strong> receiving register/FIFO contains data to be read by <strong>the</strong> CPU.<br />

Bit 1 enables Transmit Holding Register Empty Interrupt. This interrupts <strong>the</strong> CPU when <strong>the</strong><br />

transmitter buffer is empty. Bit 2 enables <strong>the</strong> receiver line status interrupt. The UART will interrupt<br />

when <strong>the</strong> receiver line status changes. Likewise for bit 3 which enables <strong>the</strong> modem status interrupt. Bits<br />

4 to 7 are <strong>the</strong> easy ones. They are simply reserved. (If only everything was that easy!)<br />

Interrupt Identification Register (IIR)<br />

Bit<br />

Notes<br />

Bits 6 : 7 Bit 6 Bit 7<br />

0 0 No FIFO<br />

0 1 FIFO Enabled but Unusable<br />

1 1 FIFO Enabled<br />

Bit 5 64 Byte Fifo Enabled (16750 only)<br />

Bit 4 Reserved<br />

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

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

Saved successfully!

Ooh no, something went wrong!