Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Сигнальный МП Motorola DSP56002.pdf
Скачиваний:
22
Добавлен:
26.05.2014
Размер:
2 Мб
Скачать
☆

Freescale Semiconductor, Inc.

GENERAL-PURPOSE I/O (PORT C)

Freescale Semiconductor, Inc.

 

Port Control

Data Direction

Pin Function

 

Register Bit

Register Bit

 

 

 

0

0

Port Input Pin

 

PORT C DATA (PCD)

 

PIN

 

 

 

 

REGISTER BIT

 

 

 

 

 

(GPIO

 

 

 

POSITION)

 

DATA DIRECTION

 

 

PORT

REGISTER (PCDDR)

 

 

 

 

 

REGISTERS

 

 

 

 

PORT C CONTROL

 

 

 

(PCC) REGISTER BIT

 

(INPUT

 

 

 

POSITION)

 

PORT INPUT DATA BIT

 

 

 

OUTPUT DATA BIT

 

 

PERIPHERAL

DATA DIRECTION BIT

 

 

LOGIC

 

 

 

 

INPUT DATA BIT

 

 

Figure 6-4 Port C I/O Pin Control Logic

6.2.1Programming General Purpose I/O

Port C and all the DSP56002 peripherals are memory mapped (see Figure 6-5). The standard MOVE instruction transfers data between Port C and a register; as a result, performing a memory-to-memory data transfer takes two MOVE instructions and a register. The

MOVEP instruction is specifically designed for I/O data transfer as shown in Figure 6-6. Although the MOVEP instruction may take twice as long to execute as a MOVE instruction, only one MOVEP is required for a memory-to-memory data transfer, and MOVEP does not use a temporary register. Using the MOVEP instruction allows a fast interrupt to move data to/from a peripheral to memory and execute one other instruction or to move the data to an absolute address. MOVEP is the only memory-to-memory move instruction; however, one of the operands must be in the top 64 locations of either X: or Y: memory. The bit-oriented instructions which use I/O short addressing (BCHG, BCLR, BSET, BTST,

JCLR, JSCLR, JSET, and JSSET) can also be used to address individual bits for faster

6 - 6 PORT C MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Соседние файлы в предмете Радиоприемные устройства