beautypg.com

Motorola DSP96002 User Manual

Page 127

background image

MOTOROLA

DSP96002 USER’S MANUAL

7 - 41

clock

words cycles

_LOOP1 JCLR #TXDE,X:(R4),_LOOP1 2 6

MOVE R1,X:(R3) 1 2

_LOOP2 JCLR #TXDE,X:(R4),_LOOP2 2 6

MOVE R0,X:(R3) 1 2

6 16

The minimal memory write is 6 program words and 16 clock cycles. The second move triggers the X Mem-

ory Write interrupt request in the slave. The interrupt service routine in the slave takes 10-14 clock cycles

to execute. If there are other interrupts with higher priority the response to this interrupt may be delayed.

A somewhat faster procedure may be employed by ensuring that sufficient time has elapsed after the writing

the address to TX before writing the data to eliminate testing for TXDE=1 as above:

clock

words cycles

_LOOP JCLR #TRDY,X:(R4),_LOOP 2 6

MOVE R1,X:(R3) 1 2

NOP 1 2

MOVE R0,X:(R3) 1 2

5 12

This procedure requires 5 program words and 12 clock cycles. The NOP instruction provides the necessary

elapse time between two consecutive TX writes if both master and slave processors are being fed the same

clock frequency and duty cycle, otherwise a second NOP instruction should be added to the above code.

7.4.21.10

X/Y/P Memory Read Procedure

The X/Y/P Memory Read procedure enables the host processor to read a data word D from an arbitrary

address A located in the DSP96002 memory space. The host processor must execute the following steps:

1.

Verify that TX is empty (TXDE=1).

2.

Write A into the TX register using the host function "TX register write and X/Y/P Memory Read
Interrupt". This sets HMRC. If HRX is empty, the HI then transfers A to HRX automatically and
initiates the X/Y/P Memory Read interrupt.

3.

In the DSP96002 side, the X/Y/P Memory Read interrupt vector should point to a routine that
first reads HRX to get the address A, stores A in an address pointer Rn, reads the memory
location pointed to by Rn, and stores the data D in the HTX register using the HTXC address.
The data D passes to the RX register (host processor side), HMRC is cleared and RXDF is set

(this may assert

H

R).