Translate this page
Controlling The Real World With Computers
::. Control And Embedded Systems .::

Address Lines and Ports

Home                                                        Order Let me know what you think
Previous: Boolean Logic Next: How To Read A Schematic

Data inside a computer is accessed by means of metallic conductors called address lines. Each of them carries a bit of information, the same as a data line. A group of address lines is called an address bus. Just as with data, a bit can be on or off, and addresses can be represented on paper as a series of ones and zeros.

Addresses are seldom represented in binary, however. They are almost always shown in HEX with the 0x prefix. An exception is in the schematic diagram. Individual lines are often drawn and labeled with abbreviations using the capital A -- A0, A1, A2, etc.

Any time a variable or constant is accessed in the C language, the appropriate address lines are activated. This is not readily apparent since variables and constants are almost always referenced by name. It's a lot easier to work with words than with obscure memory addresses. There is a way to more directly access address space in C. It's through the powerful concept of pointers, and you can read about it in the tutorials offered in the software section of the technology education sites links. We are concerned here with another use of address lines.

The PC actually has two memory systems. One deals with variables and constants as noted above. The other addresses what are called ports. Ports provide access to outside-world devices. The printer, serial communications, disk drives and sound cards, among others, all use ports for monitoring and control. A typical PC uses A0 through A9 as the bases for addressing ports, with A9 always high. That means that the range of port addresses is 0X200 through 0X3FF:

A9 A8   A7 A6 A5 A4   A3 A2 A1 A0
 1  0    0  0  0  0    0  0  0  0 = 0X200 minimum port address


A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 1 1 1 1 1 1 1 1 1 1 = 0X3FF maximum port address

The board used in the examples is capable of using all of these addresses in 64 byte blocks. Subdivisions within each block allow access to several sub-systems on the board. All of them will be covered in detail in the hardware and experiments sections.

Port read or write status depends on the state of the Input/Output Read and Write lines, which are dedicated to port activities. The appropriate line must be low. If both are high, then port I/O will not take place. The Input/Output Read line is abbreviated IOR, and the Input/Output Write line is abbreviated IOW . In addition to IOR or IOW, a line called Address Enable (AEN) must be low for port access.

The following is a self-test over this section. It would be a very good idea to make sure you know the answers to all of the questions since the sections that follow will build on this one.

1) Data inside computers is accessed by metallic conductors. These conductors are called __1__. A group of them is called a __2__ .

A) Data Lines, Data Bus
B) Address Lines, Address Bus
C) Data Bus, Address Lines
D) Address Bus, Data Lines

2) _____ provide access to outside-world devices, such as printers and disk drives.

A) Ports
B) Address Enable (or AEN)
C) Input/Output Write (or IOW)
D) 0x

Answers

Previous: Boolean Logic ---- Next: How To Read A Schematic
Problems, comments, ideas? Please Let me know what you think
Copyright © 2000, Joe D. Reeder. All Rights Reserved.
Order Home