User's Manual
PMAC Dual-Ported RAM User Manual
Dual-Ported RAM Automatic Functions 27
DPRAM ASCII Communications
PMAC can perform ASCII communications through the dual-ported RAM, as well as through the normal
bus communications port and the serial port. The DPRAM ASCII communications is enabled by setting
I58 to 1. This permits the host to send an ASCII command to PMAC by placing the command string
characters in consecutive registers in the DPRAM and setting a flag to notify PMAC of the command.
PMAC will respond by placing its response string characters in consecutive registers in the DPRAM, then
setting a flag, and optionally triggering an interrupt to notify the host of the response.
General Description
Setting I58 to 1 enables the ASCII I/O feature. When this mode is enabled, the following I-variables are
automatically set to the following values:
I3 = 2 or 0 ;Handshake control (PROM 1.15x: 3 changed to 2; 1
;changed to 0, ;PROM 1.14x: Always set to 2)
I4 = 0 ;Checksum control
I6 = 1 ;Error reporting control
These variables should be changed subsequent to setting I58 to 1.
Once the DPRAM ASCII communication is enabled, PMAC is ready to receive ASCII commands either
through the normal bus port or through the DPRAM port. The active response port is whichever port
through which PMAC has received the most recent command. Therefore, PMAC will respond to a host
command through the port where it received the command. Communications resulting from internal SEND
or CMD statements in PMAC programs will be sent to the active response port.
When sending and receiving ASCII strings through the DPRAM, the handshake control characters are not
part of the strings, as they are on the other ports. Instead, they are placed in fixed control word registers.
To make the serial port the active response port, it is necessary to send the <CTRL-Z> command through
the serial port. This will disable the DPRAM ASCII communications by setting I58 to 0.
Setting I58=0 will disable the ASCII communications -- PMAC will not accept any commands through the
DPRAM. If you have been communicating through the DPRAM, it is a good idea also to send <CTRL-
X> command to clear any pending responses.
Note:
With I58=1, sending a <CTRL-X> command will empty the command and
response queues; it will also clear the control words 0x06D0 (Y:$D1B4) and
0x062C (Y:$D18B).
Read/Write Procedure
To initialize the buffer:
1. Clear registers 0x062C (Y:$D1B4) and 0x06D0 (Y:$D18B) Bit 0.
2. Set I58 = 1
To send a command line:
1. Put ASCII characters in Host-to-PMAC buffer 0x0630-0x06CE ($D18C - $D1B3) with a NULL
character to terminate the string
2. Set Host-Output Control Flag 0x062C (Y:$D18B) Bit 0 to 1 (Host-Output Complete)
Note:
When sending ASCII command strings through the DPRAM, it is not necessary to
use a carriage-return character. PMAC looks for the NULL character (ASCII value
0) to mark the end of the string, and looks at the Host-Output Control Flag to know
when it has been given a command.