Jameco Electronics 2000, 3000 manual Slave Applications, 3.Slave Port Status Register SPSR adr =

Models: 3000 2000

1 349
Download 349 pages 5.72 Kb
Page 215
Image 215
Table 13-3. Slave Port Status Register (SPSR) (adr = 0x023)

Bits 1,0—This 2-bit field sets the priority of the slave port interrupt. The interrupt is disabled by (0,0).

Table 13-3describes the slave port status register. The status register has 6 bits that are set if the particular register is full. That means that the register has been written by the processor that can write to it but it has not been read by the processor that can read it. The bits for SPD0R are used to control the slave interrupt and the handshaking lines as shown in Figure 13-3.

Table 13-3. Slave Port Status Register (SPSR) (adr = 0x023)

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

 

 

 

 

 

 

 

 

 

1—set by

1—set by

1—set by

 

1—set by

1—set by

1—set by

1—set by

1—set by

slave

master

master

master

slave write

slave write

master

slave write

write to

write to

write to

write to

to SPD2R.

to SPD1R.

write to

to SPD0R.

SPD0R.

SPD2R.

SPD1R.

SPD0R.

Cleared

Cleared

SPD0R.

Cleared by

Cleared

Cleared

Cleared

Cleared

when

when

Cleared by

master

when

when slave

when slave

when slave

master

master

slave write

reads

reads

reads

write to

reads

reads

master

to SPSR.

register.

register.

register.

SPSR.

register.

register.

reads

 

 

register.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

13.3 Applications and Communications Protocols for Slaves

The communications protocol used with the slave port depends on the application. A slave processor may be used for various reasons. Some possible applications are listed below.

Keep in mind that the Rabbit can also be operated as a slave processor via a serial port and some of the protocols will work well via a serial communications connection. If a serial connection is used, the protocol becomes more complicated if errors in transmission need to be taken into account. If the physical link can be controlled so that transmission errors do not occur, a realistic possibility if the interconnection environment is controlled, the serial protocol is simpler and faster than if error correction needs to be taken into account.

13.3.1 Slave Applications

Motion Controller—Many types of motion control require fast action, may be com- pute-intensive or both. Traditional servo system solutions may be overly expensive or not work very well because of system nonlinearities. The basic communications model for a motion controller is for the master to send short messages—positioning com- mands—to the slave. The slave acknowledges execution of the commands and reports exception conditions.

Communications Protocol Processor—Communications protocols may be very com- plex, may require fast responses, or may be compute-intensive.

Graphics Controller—The Rabbit can be used to perform operations such as drawing geometric figures and generating characters.

Digital Signal Processing—Although the Rabbit is not a speciality digital signal pro- cessor, it has enough compute speed to handle some types of jobs that might otherwise

206

Rabbit 3000 Microprocessor

Page 215
Image 215
Jameco Electronics 2000, 3000 manual Slave Applications, 3.Slave Port Status Register SPSR adr =