Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
8xC196EA microcontroller user's manual.1998.pdf
Скачиваний:
52
Добавлен:
23.08.2013
Размер:
8.29 Mб
Скачать

8XC196EA USER’S MANUAL

7.4.3Internal Structure for Ports 3 and 4 (Address/Data Bus)

Figure 7-3 shows the logic of ports 3 and 4. Consult the datasheet for specifications on the amount of current ports 3 and 4 can source and sink.

During reset, the active-low level of RESET# turns off Q1 and Q2 and turns on transistor Q4, which weakly holds the pin high. Resistor R1 provides ESD protection for the pin. During normal operation, the device controls the port through BUS CONTROL SELECT, an internal control signal.

When the device needs to access external memory, it clears BUS CONTROL SELECT, selecting ADDRESS/DATA as the input to the multiplexer. ADDRESS/DATA then drives Q1 and Q2 as complementary outputs.

When external memory access is not required, the device sets BUS CONTROL SELECT, selecting Px_REG as the input to the multiplexer. Px_REG then drives Q1 and Q2. If P34_DRV is set, Q1 and Q2 are driven as complementary outputs. If P34_DRV is cleared, Q1 is disabled and Q2 is driven as an open-drain output requiring an external pull-up resistor. With the open-drain configuration (BUS CONTROL SELECT set and P34_DRV cleared) and Px_REG set, the pin can be used as an input. The signal on the pin is latched in the Px_PIN register. The pins can be read, making it easy to see which pins are driven low by the device and which are driven high by external drivers while in open-drain mode.

7-26

I/O PORTS

Internal Bus

 

 

 

 

 

 

 

 

 

Vcc

 

Px_REG

1

 

 

 

 

ADDRESS/DATA

0

 

 

Q1

 

 

 

 

 

 

BUS CONTROL SELECT

 

 

 

 

I/O Pin

0=Address/Data

 

 

 

 

 

1=I/O

 

 

 

 

 

P34_DRV

 

 

 

Q2

 

 

 

 

RESET#

 

 

 

 

 

 

Vss

 

 

Sample

150

to 200

R1

 

Latch

 

 

Px_PIN

Buffer

 

 

 

 

 

 

 

 

Q

D

 

 

 

 

LE

 

 

 

 

Read Port

PH1 Clock

 

 

 

 

 

 

 

 

 

 

Vcc

 

 

 

 

 

Medium

 

 

 

 

 

Pullup

 

 

300ns Delay

 

Q3

 

RESET#

 

 

 

 

 

 

 

 

 

 

 

 

Vcc

 

 

 

 

 

Weak

 

 

 

 

 

Pullup

 

 

 

 

 

Q4

 

 

 

 

 

 

A5492-01

Figure 7-3. Ports 3 and 4 Internal Structure

7-27

8

Serial I/O (SIO) Port

Соседние файлы в предмете Электротехника