03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INPUT/OUTPUT PORTS<br />

Register Name:<br />

Register Mnemonic:<br />

Register Function:<br />

Port Pin State Register<br />

PxPIN (P1PIN, P2PIN, P3PIN)<br />

Reads the logic state at a port pin.<br />

15 0<br />

P<br />

P<br />

7<br />

P<br />

P<br />

6<br />

P<br />

P<br />

5<br />

P<br />

P<br />

4<br />

P<br />

P<br />

3<br />

P<br />

P<br />

2<br />

P<br />

P<br />

1<br />

P<br />

P<br />

0<br />

A1315-0A<br />

Bit<br />

Mnemonic<br />

Bit Name<br />

Reset<br />

State<br />

Function<br />

PP7:0<br />

Port Pin<br />

State 7:0<br />

XXXXH<br />

Reading the Port Pin State register returns the<br />

logic state present on the associated pin.<br />

NOTE: PP7 and PP6 do not exist for Port 3.<br />

NOTE:<br />

Reserved register bits are shown with gray shading. Reserved bits must be written<br />

to a logic zero to ensure compatibility with future Intel products.<br />

Figure 13-7. Port Pin State Register (PxPIN)<br />

13.2.5 Initializing the I/O Ports<br />

The state of the I/O ports following a reset is as follows:<br />

• Port 1 is configured for peripheral function (general-purpose chip-selects, GCS7:0).<br />

• Port 2 is configured for peripheral function. The direction of each pin is the default direction<br />

for the peripheral function (e.g., P2.5/TXD1 is an output, P2.2/BCLK0 is an input). See<br />

Table 13-2 on page 13-6 for details.<br />

• Ports P3.0 through P3.3 are configured for peripheral function (interrupt requests). Ports<br />

P3.4 and P3.5 are configured as inputs (they are floating). See Table 13-3 on page 13-7 for<br />

details.<br />

There are no set rules for initializing the I/O ports. The Port Data Latch should be programmed<br />

before selecting a pin as an output port (to prevent unknown Port Data Latch values from reaching<br />

the pins).<br />

13-11

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

Saved successfully!

Ooh no, something went wrong!