12.07.2015 Views

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 11INPUT/OUTPUT PORTSMany applications do not require full use of all the on-chip peripheral functions. For example, theChip-Select Unit provides a total of ten chip-select lines; only a large design would require allten. For smaller designs that require fewer than ten chip-selects, these pins would be wasted.The input/output ports give system designers the flexibility to replace the functions of unused peripheralpins with general-purpose I/O ports. Many of the on-chip peripheral pin functions aremultiplexed with an I/O port. If a particular peripheral pin function is unnecessary in an application,that pin can be used for I/O. The <strong>80C186EB</strong>/<strong>80C188EB</strong> has four types of ports: bidirectional,input-only, output-only, and open-drain bidirectional.11.1 FUNCTIONAL OVERVIEWAll port pin types are derived from a common bidirectional port logic module. Unidirectional andopen-drain ports are a subset of the bidirectional module. The following sections describe eachport type. The bidirectional port is described in detail, as it is the basis for all of the other porttypes. The descriptions for the unidirectional and open-drain ports only highlight their specificdifferences from the common bidirectional module.11.1.1 Bidirectional PortFigure 11-1 shows a simplified schematic of a bidirectional port pin. The overall function of abidirectional port pin is controlled by the state of the Port Control Latch. The output of the PortControl Latch selects the source of output data and the source of the control signal for the threestateoutput driver. When the port is programmed to act as a peripheral pin, both the data for thepin and the directional control signal for the pin come from the associated integrated peripheral.When a bidirectional port pin is programmed as an I/O port, all port parameters are under softwarecontrol.The output of the Port Direction latch enables (or disables) the three-state output driver when thepin is programmed as an I/O port. The three-state output driver is enabled by clearing the PortDirection latch. The data driven on an output port pin is held in the Port Data latch. Setting thePort Direction latch disables the three-state output driver, making the pin an input.The signal present on the device pin is routed through a synchronizer to a three-state latch thatconnects to the internal data bus. The state of the pin can be read at any time, regardless of whetherthe pin is used as an I/O port or for a peripheral function.11-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!