Communications Port Software

HUNTER’s communications format is software controlled.

If HUNTER fails to communicate, always check the port initialisation for the correct format.

Initialising The Port

To initialise, or alter, HUNTER’s communications parameters as follows:

From File Manager, COMS, or application program select ‘Initialise communications’.

You are now in the communications program. All entries are menu-type choices, selected by the cursor control keys and confirmed by ‘enter’.

Values previously selected are displayed as the initial menu option presented. For instance, if ‘1200 baud’ had previously been selected, then this option will appear after the heading ‘Rate’.

HUNTER will prompt first for ‘transmission parameters’, followed by ‘Receiving Parameters’.

Specific parameters are modified by positioning the cursor with the cursor left, cursor right keys, and selecting the desired option with the cursor up, cursor down keys.

Warning

If the HUNTER has been totally reset for any reason, the parameters shown on entry to this program may differ from that expected. Extended use of the cursor keys will always correct any anomalies.

------------------------------------------
|         Transmission Parameters        |
|                                        |
|   Rate-2400  Prtcl-none     Pty-8bit   |
|                                        |
| CTS-n DTR-n LF-n Echo-n T/O-no Null- 0 |
|                                        |
|       press ENTER if acceptable.       |
------------------------------------------

Transmission Parameter Screen

------------------------------------------
|          Receiving Parameters          |
|                                        |
|   Rate-2400  Prtcl-none     Pty-8bit   |
|                                        |
| RTS-off  DSR-n DCD-n  T/O-no Serig-off |
|                                        |
|       press ENTER if acceptable.       |
------------------------------------------

Receiving Parameters Screen

To re-select the previous entries, press ENTER.

Baud Rate (Rate)

The available baud rates are:-

  • 75

  • 110

  • 150

  • 300

  • 600

  • 1200

  • 1800

  • 2400

  • 4800

  • EXT

The EXT feature is to provide for external clocking when using synchronous protocols.

Select Protocol (Prtcl)

The protocols available on HUNTER are:-

  • NONE

  • XON/XQFF

  • ACK/NAK

  • ETX/ACK

  • Systime

  • IBM 2780 (optional)

Select Parity (Pty)

On transmission parity is implemented as follows:-

None:

bit 8 is reset, i.e. logical 0.

Odd

bit 8 is set or reset to cause an odd number of logical 1’s in the data bits.

Even

bit 8 is set or reset to cause an even number of logical 1’s in the data bits.

8-bit :All eight bits are transmitted with no modification. This may be :used to transfer binary information.

On reception the implementation is:-

None

Parity bit is ignored and set to logical 0.

Odd or Even

The data is checked for an odd or even number of logical 1’s. If the check fails then the character is received as 255 decimal (OFFH).

8-bit

All eight bits of data are passed to the calling program.

Note

The parity fail character (OFFH) is displayed as ← on the screen.

Handshaking Lines

There are handshaking lines provided on the RS-232 port. These signals are usually used when operating with a modem. The lines conform to the standard RS-232 specification for with use modems, for specific applications lines need to be enabled as appropriate. In general, a straight 25 way cable will operate with most modems. They may also be used when communicating with slow devices e.g. printers or for the HUNTER to hold up incoming data. These lines will be discussed in turn.

CTS pin 5 (Clear to send) input to HUNTER.

This signal, selected on the transmit menu, controls data being transmitted.

If selected (y) then only if the line is active (+ve) will data be transmitted. The input is tested at the start of each character in async or of each block in sync. Data characters are always completely transmitted even if CTS goes inactive.

If deselected (n) then this input is ignored and data is always sent.

RTS pin 4 (Request to Send) output from HUNTER.

The RTS handshake can be set to operate in three different ways from either the Communications Menu or via Basic by poking the RTS flag, see Memory Locations. The three modes are:

OFF

When this option for RTS is selected the RTS line is permanently active (+ve) and its state is not altered at any time during communications.

HOLD

In this mode the RTS line is normally active (+ve) and only goes inactive (-ve) when HUNTER has received too many characters and the receive buffer is about to overflow. This mode can thus be used to hold up a transmitting device until HUNTER has removed enough characters from the receive buffer such that there is enough space in the buffer to allow the transmitting device to send more data by raising RTS to active (+ve) again. This mode can be used when communicating HUNTER to HUNTER via a crossed cable. If a synchronous protocol has been selected, RTS should not be set to HOLD.

TRUE

This mode of RTS is meant for handshaking with a MODEM or similar device. When HUNTER wishes to transmit data, it first of all raises RTS from inactive (-ve) to active (+ve). Then HUNTER waits for a reply on the CTS line (if enabled) before sending the data in the transmit buffer. RTS remains active until all the data has been sent and the buffer is empty, then HUNTER returns RTS to the inactive state (-ve).

DCD pin 8 (Data Carrier Detect) input to HUNTER.

This signal, selected on the receive menu, is used to tell HUNTER that received data is valid.

If selected then only when the signal is active (+ve) is data received normally.

If DCD is inactive then no data will be received, even if the data input line has data on it.

DSR pin 6 (Data Set Ready) input to HUNTER.

This signal, selected on the receive menu, is used to tell HUNTER if the peripheral (usually a modem) is ready to operate.

If selected, only if DSR is active will HUNTER communicate in both directions.

If DSR is inactive then HUNTER will not transmit or receive data. This signal can be ignored by selecting “n” on the receive menu.

DTR pin 20 (Data Terminal Ready) Ouptut from HUNTER

This signal, selected on the transmit menu, is provided to enable modems that require DTR to be present before generating carrier.

If selected (DTP-y), DTR will go to the active (+ve) state if either transmission or reception is attempted from the HUNTER.

If not (DTR-n), DTR will only be active if transmission from the HUNTER is attempted.

DTR can also be controlled by the communications power supply port 132 (see Port Allocations), INVCON. DTR is active when inverter the is on.

Timeouts

Automatic communication timeouts are provided to signal to user programs that the communications lines are quiescent. Separate timeouts are user-selectable for both transmit and receive channels. The timeouts are designed for use with the Basic ON COMMS statement, but can also be invoked manually or by machine code programs. The error number is available in the location COMERR (see Memory Locations).

The timeouts have a range of 10-60 seconds in 10 second steps and are controlled by memory locations RXTOAF and TXTOAF (see Memory Locations). These locations can be read or written to by user programs. When set to 0 (cleared), the timeouts have no effect. When set they have the following effect:

RXTOAF

Will cause a ‘communications error’ if the recieve line is quiescent for more than the selected period. Reception of any character, or noise, will reset the timeout. The timeout is initiated by a request for serial data through a Basic LINPUT or similar statement. If no attempt is made to read the input communications buffer, the timeout will not occur.

TXTOAF

Will cause a ‘communications error’ if the HUNTER is inhibited by hardware handshake lines CTS (Clear to send) or DSR (Data set ready). If either line inhibits transmission from the HUNTER, a ‘communications error’ will occur after the specified time.

Echo

The ‘echo flag’, ECHOF (see Memory Locations) determines whether transmitted characters are echoed on the HUNTER screen. Data transmission and reception are not affected and the displayed characters are not passed to user programs or entered in the receive buffer.

Echo can be regarded as a full/half-duplex selection, with duplicate characters appearing on the screen if the HUNTER is communicating with a full-duplex host with echo ‘on’.

LF

The line feed flag, LFACT (see Memory Locations) determines whether a LF character (decimal 10, Hex ‘OA’) is inserted in the data stream transmitted by HUNTER automatically following every CR (Decimal 13, Hex ‘OD’) in the transmitted text.

If selected, on (LF-y), line feeds are inserted after CR even if line feed characters are already present in the data.

If selected, off (LF-n), line feeds are not inserted. However, line feeds present in the data will be transmitted.

%note% Note

When sending binary data, the LF-y option will insert LF characters if the data contains decimal 10, even if the decimal 10 character is not intended as a CR. Always select LF off (LF-n) if using 8-bit transmission.

Null

The Null count is provided in the transmission set up for use with printers that have a significant carriage return delay and when no handshaking or buffer is available.

If selected, NULL inserts NUL (Decimal 00) characters in the data stream after CR (and LF, if selected with the LF-y option).

The number of nulls is chosen from 0,2,5,10 or 20, these options are provided by the HUNTER operating system and cannot be varied.

Note

If transmitting binary files in 8 bit mode, null must be selected off (Null-0), since it will otherwise insert Null (Decimal 0) characters after every CR (Decimal 13) character.

SERIG (Receive channel only)

The SERIG location (see Memory Locations) allows any single character in the range 0 - 127 Decimal (‘0’ - ‘7F’ Hex) to be ignored by HUNTER’s serial data reception system.

Characters rejected by SERIG are not entered in the communications buffer or passed to user programs.

SERIG is provided for use with computer systems that provide abundant spurious characters (e.g. XON or DEL) as part of data streams. Since filtering these unwanted characters can be inconvenient in user programs, SERIG provides a useful solution.

The value of SERIG is selected by incrementing/decrementing the decimal value using the up/down cursor keys and must be set to ‘OFF’ when not in use. Serig-off is obtained by incrementing past 127 or below 0.