Introduction
The first pattern in this chapter (PORT I / O [page 174]) is concerned with basic soft- ware techniques for interacting with the digital ports on an 8051 microcontroller.
The second pattern (PORT HEADER [page 184]) encapsulates a design guideline that helps you cope with the fact that many different components in a larger project will each require port access: specifically, PORT HEADER demonstrates how the port access for the whole project can be integrated into a single file. Use of these techniques can ease project development, maintenance and porting.
The following points should also be noted:
● This chapter does not consider the hardware that will be connected to the port: see Chapters 7 and 8 for relevant hardware details.
● This chapter does not consider analog input and output: for this, see Part G.