Delta Tau GEO BRICK LV User Manual
Turbo PMAC User Manual
396
Writing a Host Communications Program
Remember, we get this second interrupt because Turbo PMAC has just now placed data in the mailbox
registers, which is now ready to be read. We service this second interrupt and note that the accompanying
interrupt vector is $A1, telling us to read the data in the mailbox registers. In this example, Turbo PMAC
will have 22 characters to be read:
registers, which is now ready to be read. We service this second interrupt and note that the accompanying
interrupt vector is $A1, telling us to read the data in the mailbox registers. In this example, Turbo PMAC
will have 22 characters to be read:
123456 789012 345678<CR><ACK>, with the first 16 of them
in the mailbox registers. (We are assuming I-variable I3 is set to 2 again.) The data will be in the
registers as follows:
registers as follows:
Address
$7FA001 $7FA003 $7FA005 ... $7FA01D $7FA01F
Mailbox #
0 1 2
...
14 15
Character
1 2 3
.
3 4
We read in the mailbox registers, beginning with the first one until we encounter a <CR>, <ACK>,
<BELL>, or have read all 16 registers. In this case, the first 16 characters PMAC has for us does not
contain a <CR>, <ACK>, or <BELL>. Therefore we read in all 16 mailbox registers to obtain the first 16
characters of Turbo PMAC’s response, and then write $00 to mailbox register #1 (in this case, at
$7FA003) to allow Turbo PMAC to put the next chunk of data in the mailbox registers. Turbo PMAC
interrupts us again with vector $A1, and the remainder of the characters in the mailbox registers are:
<BELL>, or have read all 16 registers. In this case, the first 16 characters PMAC has for us does not
contain a <CR>, <ACK>, or <BELL>. Therefore we read in all 16 mailbox registers to obtain the first 16
characters of Turbo PMAC’s response, and then write $00 to mailbox register #1 (in this case, at
$7FA003) to allow Turbo PMAC to put the next chunk of data in the mailbox registers. Turbo PMAC
interrupts us again with vector $A1, and the remainder of the characters in the mailbox registers are:
Address
$7FA001 ... $7FA009 $7FA00B ... $7FA01D $7FA01F
Mailbox #
0 ... 4
5 ... 14
15
Character
5
.
<CR> 2
.
3 4
Now we read again the mailbox registers, looking for <CR>, <ACK>, or <BELL>. The fifth character we
read in mailbox #4 ($7FA009) happens to contain a <CR>, so we stop reading and write $00 into mailbox
register #1. Because Turbo PMAC still has to send the final <ACK> character, it interrupts us again with
vector $A1 and we see in the mailbox registers:
read in mailbox #4 ($7FA009) happens to contain a <CR>, so we stop reading and write $00 into mailbox
register #1. Because Turbo PMAC still has to send the final <ACK> character, it interrupts us again with
vector $A1 and we see in the mailbox registers:
Address
$7FA001 ... $7FA009 $7FA00B ... $7FA01D $7FA01F
Mailbox #
0 ... 4
5 ... 14
15
Character
<ACK>
.
<CR> 2
.
3 4
Now we stop at the first character, <ACK>, which serves as the end-of-transmission character, and we
again write $00 into mailbox register 1. Since Turbo PMAC does not having any more data to be read for
now, we will not get another interrupt (until we send another command or one of our executing PLC or
motion programs puts out data via the CMD or SEND command).
The diagram on the following page summarizes the communications process over the VME bus using the
mailbox registers.
again write $00 into mailbox register 1. Since Turbo PMAC does not having any more data to be read for
now, we will not get another interrupt (until we send another command or one of our executing PLC or
motion programs puts out data via the CMD or SEND command).
The diagram on the following page summarizes the communications process over the VME bus using the
mailbox registers.