Embedded Systems Building Blocks, Second Edition

11.04: Serial Ports on a PC

11.04 Serial Ports on a PC

The software modules provided in this chapter allow you to use both serial ports on an IBM-PC/AT compatible computer although it can be easily altered to support different hardware. A review of the PC's architecture relating to the serial ports available on PCs is thus necessary in order to better understand the code.

PCs are typically equipped with two RS-232C communication ports that are referred to as COM1 and COM2. Both ports generally consist of a National Semiconductor NS16550 or equivalent UART and are capable of communicating at baud rates up to 115200 bps. The PC provides services through its BIOS (Basic Input/Output System) but unfortunately, communications using the BIOS must be done by polling (monitoring the port to see if bytes have been received or sent). This limitation means that communication effectively cannot exceed about 1200 baud. This shortcoming can be corrected by replacing the BIOS services with interrupt-driven functions.

An IBM-PC/AT computer contains two interrupt controllers (Intel 82C59A PIC) providing 15 sources of interrupts to the PC's microprocessor. Interrupts are labeled IRQ0 through IRQ15, as shown in Figure 11.17. IRQ2 of the first i82C59A is actually the output of the second i82C59A interrupt controller.


Figure 11.17: PC/AT interrupt controllers.

Table 11.3 shows what devices are typically connected to the interrupt controllers. The table lists the interrupt sources in priority order (IRQ0 has the highest priority). Table 11.3 also shows that each serial I/O port is connected to its...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: DSP Boards
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.