This chapter describes the I/O port programming of the 8051 with many examples. In Section 4.1, we describe I/O access using byte-size data, and in Section 4.2, bit manipulation of the I/O ports is discussed in detail. SECTION 4.1: 8051 I/O PROGRAMMING In the 8051 there are a total of four ports for I/O operations. […]
SECTION 4.2: I/O BIT MANIPULATION PROGRAMMING In this section we further examine 8051 I/O instructions. We pay special attention to I/O bit manipulation since it is a powerful and widely used feature of the 8051 family. I/O ports and bit-addressability Sometimes we need to access only 1 or 2 bits of the port instead of […]