Microcontrollers in Practice

Chapter 2: Using the Digital I/O Lines

2.1 In this Chapter

This chapter contains an overview of the parallel I/O subsystem of the HC11, AVR, and 8051 microcontrollers, from a hardware and software perspective.

2.2 Overview of the Parallel I/O System

The digital I/O lines are the simplest and most common way microcontrollers interact with the outside world. Figure 2.1 shows how digital input and output lines are connected to the internal bus of the MCU.


Figure 2.1: The principle of accessing the input and output lines

In case of an input line, the status of the MCU pin is transferred on the internal bus to the CPU by activating the internal signal RP (Read Port), generated during the execution of the instruction used to read the port.

An output line is associated with an internal latch, which can be written from the internal bus and the driver connected to the physical pin.

In practice, things are a bit more complicated. For economic and technological reasons, it is more convenient to assign two or more functions to each pin than to double the number of pins of the capsule. This is the reason why all microcontrollers extensively use bi-directional input/output lines. The simplest way to obtain a bi-directional line is to use an open drain driver for the output line. When the output transistor is blocked, an external device can control the line. Figure 2.2 shows the logic diagram of a bi-directional I/O line implemented according to this principle.


Figure 2.2: Bi-directional I/O line with...

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: IC Bus Interfaces and Controllers
Finish!
Privacy Policy

This is embarrasing...

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