Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Embedded Controller Hardware Design (Ken Arnold, 2000).pdf
Скачиваний:
214
Добавлен:
12.08.2013
Размер:
1.35 Mб
Скачать

124EMBEDDED CONTROLLER

Hardware Design

Note also that two separate address ranges have been used, one for the input port and one for the output port. In practice, it is possible to have the input and output ports respond to the same address by using the read line for input cycles, and the write line for outputs.

Address Range

Address bits

Decoder Ouputs

Active Select:

(hex)

A15 A14 A13

76543210

Memor y I/O

0000 - 1FFF

0 0 0

11111110

RAM 0

 

 

 

 

2000 - 3FFF

0 0 1

11111101

RAM 1

 

 

 

 

4000 - 5FFF

0 1 0

11111011

RAM 2

 

 

 

 

6000 - 7FFF

0 1 1

11110111

RAM 3

 

 

 

 

8000 - 9FFF

1 0 0

11101111

RAM 4

 

 

 

 

 

A000

- BFFF

1 0 1

11011111

RAM 5

 

 

 

 

 

C000

- DFFF

1 1 0

10111111

Output Port

 

 

 

 

 

E000

- FFFF

1 1 1

01111111

Input Port

 

 

 

 

 

Table 5-2: External data memory map (8031 external memory space).

The decoder will select the input port at any address in the range E000 through FFFF hex. That means that the single input port bit takes up 8K address locations, all reading the same input port. This decoding technique is partial address decoding because only the three most significant address bits are decoded for this input port, and the rest of the address lines are effectively “don’t cares.” This may seem wasteful of address space, but it reduces the amount of decoding circuitry when it is not necessary to decode all the unique addresses individually. The memory map of the external data memory address space is shown in Table 5-2.

Chapter Five Problems

1.If the design of Figure 5-7 needs to be changed to eliminate the duplication of addresses caused by partial address decoding, how many additional input signals would be required for the decoder?

2.The 8031 CPU has 16 address lines. How much external memory can be attached to it without resorting to any memory extension mechanism?

3.If all bits of Port 1 on an 8031 are used to select external data memory in one of 256 “banks,” what is the maximum amount of external data memory that can be accessed?

4.What is the answer to life, the universe, and everything?