Rabbit 6000 User’s Manual
digi.com
221
21.3.3 Master/Slave Communication
1. The master writes data to the appropriate external I/O address on the data bus for the slave device
and register desired. For example, in the setup described here, the master would write to register
SPD2R on the first slave by writing to the address 0xC002 (0xC000 for the I6 strobe, and 0x0002
for SPD2R on that slave).
2. If the master is writing multiple bytes, it should write to SPD0R last since that will trigger an inter-
rupt on the slave device. If only one byte is being sent, it should be written to SPD0R.
3. The slave responds to the interrupt, reading the data from the slave port data registers.
21.3.4 Slave/Master Communication
1. The slave writes data to the appropriate slave port data register. If it is writing multiple bytes,
SPD0R should be written last, which enables the /SLVATTN line.
2. The master receives an external interrupt from the /SLVATTN line, and reads the data out of the
slave port data registers via external I/O reads on the data bus.
21.3.5 Handling Interrupts
The interrupt request on the slave is cleared by either the master or the slave accessing one of the slave
port registers. To clear the interrupt without affecting the register values, a dummy write can be made to
SPSR.
21.3.6 Example ISR
A sample interrupt handler is shown below.
slave_isr::
push af ; save used registers
; read the data sent by the master
ioi ld a, (SPD2R)
ld (to_slv_d2), a
ioi ld a, (SPD1R)
ld (to_slv_d1), a
ioi ld a, (SPD0R)
ld (to_slv_d0), a
; if a response is required, perform it here
ld a, (to_mas_d2)
ioi ld (SPD2R), a
ld a, (to_mas_d1)
ioi ld (SPD1R), a
ld a, (to_mas_d0)
ioi ld (SPD0R), a ; this write asserts /SLVATTN
; the interrupt request is cleared by any read/write of the
; registers
pop af ; restore used registers
ipres
ret
Summary of Contents for 6000
Page 1: ...Rabbit 6000 Microprocessor User s Manual 90001108_J...
Page 11: ...Rabbit 6000 User s Manual digi com 11 1 3 Block Diagram Figure 1 1 Rabbit 6000 Block Diagram...
Page 43: ...Rabbit 6000 User s Manual digi com 43 4 1 1 Block Diagram...
Page 57: ...Rabbit 6000 User s Manual digi com 57 5 1 1 Block Diagram...
Page 88: ...Rabbit 6000 User s Manual digi com 88 7 2 Block Diagram...
Page 115: ...Rabbit 6000 User s Manual digi com 115 11 1 1 Block Diagram...
Page 127: ...Rabbit 6000 User s Manual digi com 127 12 1 1 Block Diagram...
Page 138: ...Rabbit 6000 User s Manual digi com 138 13 1 1 Block Diagram...
Page 154: ...Rabbit 6000 User s Manual digi com 154 15 1 1 Block Diagram...
Page 163: ...Rabbit 6000 User s Manual digi com 163 16 1 1 Block Diagram...
Page 170: ...Rabbit 6000 User s Manual digi com 170 17 1 1 Block Diagram...
Page 177: ...Rabbit 6000 User s Manual digi com 177 18 1 1 Block Diagram...
Page 186: ...Rabbit 6000 User s Manual digi com 186 19 1 1 Block Diagram...
Page 230: ...Rabbit 6000 User s Manual digi com 230 22 2 Block Diagram...
Page 234: ...Rabbit 6000 User s Manual digi com 234 Figure 22 3 Sample Slow A D Converter Circuit...
Page 287: ...Rabbit 6000 User s Manual digi com 287 25 1 1 Block Diagram...
Page 310: ...Rabbit 6000 User s Manual digi com 310 26 1 1 Block Diagram...
Page 323: ...Rabbit 6000 User s Manual digi com 323 28 1 1 Block Diagram...
Page 351: ...Rabbit 6000 User s Manual digi com 351 31 1 4 Block Diagram...
Page 361: ...Rabbit 6000 User s Manual digi com 361 32 1 1 Block Diagram...
Page 369: ...Rabbit 6000 User s Manual digi com 369 33 2 Block Diagram...
Page 390: ...Rabbit 6000 User s Manual digi com 390 35 1 1 Block Diagram...
Page 408: ...Rabbit 6000 User s Manual digi com 408...
Page 410: ...Rabbit 6000 User s Manual digi com 410...
Page 411: ...Rabbit 6000 User s Manual digi com 411...
Page 420: ...Rabbit 6000 User s Manual digi com 420 Figure 37 1 Memory Read and Write Cycles...