1 slave rabbit as a protocol uart – Jameco Electronics Rabbit 3000 User Manual

Page 63

Advertising
background image

54

Rabbit 2000 Microprocessor

Of the three registers seen by each side for each direction of communication, the first reg-
ister, slave register zero, has a special function because an interrupt can only be generated
by a write to this register, which then causes an interrupt to take place on the other side of
the link if the interrupt is enabled. One type of protocol is to store data first in registers 1
and 2, and then as the last step store to register 0. Then 24 bits of data will be available to
the interrupt routine on the other side of the link.

Bulk data transfers across the link can take place by an interrupt for each byte transferred,
similar to a typical serial port or UART. In this case, a full-duplex transfer can take place,
similar to what can be done with a UART. The overhead for such an interrupt-driven trans-
fer will be on the order of 100 clocks per byte transferred, assuming a 20-instruction inter-
rupt routine. (To keep the interrupt routine to 20 instructions, the interrupt routine needs to
be very focused as opposed to general purpose.) Several methods are available to cater to
a faster transfer with less computing overhead. There are enough registers to transfer two
bytes on each interrupt, thus nearly halving the overhead. If a rendezvous is arranged
between the processors, data can be transferred at approximately 25 clocks per byte. Each
side polls the status register waiting for the other side to read/write a data register, which is
then written/read again by the other side.

4.4.1 Slave Rabbit As A Protocol UART

A prime application for the Rabbit used as a slave is to create a 4-port UART that can also
handle the details of a communication protocol. The master sends and receives messages
over the slave port. Error correction, retransmission, etc., can be handled by the slave.

Advertising
This manual is related to the following products: