Chapter 5. Mode Codes & Bus Management

While standard data transfers move application data between the BC and RTs, Mode Codes are the "management" layer of the MIL-STD-1553 bus. They allow the Bus Controller to manage the health, synchronization, and state of the network.

5.1 What is a Mode Code?

A Mode Code is a special type of command. It is identified when the Subaddress Field in the Command Word is set to either 00000 (0) or 11111 (31).

When the Subaddress is 0 or 31, the Data Word Count field is re-interpreted as the Mode Code Identifier (defining which specific action to take).

5.1.1 Types of Mode Codes

Mode codes are classified by whether they require a data word:

  1. No Data Word: The command is self-contained (e.g., "Reset"). The RT simply performs the action and transmits its Status Word.
  2. With Data Word (Transmit): The RT sends a specific data word along with its Status Word (e.g., "Transmit Bit Word").
  3. With Data Word (Receive): The BC sends a data word immediately following the command (e.g., "Synchronize with Data").

 

Table 2 - Complete List of MIL-STD-1553 Mode Codes

Command
T/nR bit

Mode Code
(Binary)

Mode Code
(Decimal)

MIL-STD-1553 Defined FunctionAssociated
Data Word
Broadcast
Allowed
000000
to
01111
0
to
15
Undefined mode commands 0 - 15 when T/nR bit = 0NoNo
1000000Dynamic Bus ControlNoNo
1000011Synchronize (without data)NoYes
1000102Transmit Status WordNoNo
1000113Initiate Self-TestNoYes
1001004Transmitter ShutdownNoYes
1001015Override Transmitter ShutdownNoYes
1001106Inhibit Terminal FlagNoYes
1001117Override Inhibit Terminal FlagNoYes
1010008Reset Remote TerminalNoYes
101001
to
01111
9
to
15
Reserved Mode Commands 9 - 15 with T/nR bit = 1NoYes
01000016Undefined Mode CommandYesNo
11000016Transmit Vector WordYesNo
01000117Synchronize With DataYesYes
11000117Undefined Mode CommandYesNo
01001018Undefined Mode CommandYesNo
11001018Transmit Last CommandYesNo
01001119Undefined Mode CommandYesNo
11001119Transmit Built-In Test WordYesNo
01010020Selected Transmitter ShutdownYesYes
11010020Undefined Mode CommandYesNo
01010121Override Selected Transmitter ShutdownYesYes
11010121Undefined Mode CommandYesNo
001001
to
01111
22
to
31
Reserved Mode Commands 22 - 31 with T/nR bit = 0YesYes
101001
to
01111
22
to
31
Reserved Mode Commands 22 - 31 with T/ R bit = 1YesNo

 

5.2 Common Mode Codes

While the standard defines many codes, these are the most critical for system operation: 

Table 3 - Common Mode Commands

Mode CodeFunctionDescription
00010Transmit Status WordAsks the RT to send its last Status Word. Used for error recovery to check why an RT didn't respond previously.
01000Reset Remote TerminalForces the RT to reset to its power-up state. Critical for "un-hanging" a stuck terminal.
00001SynchronizeUsed to reset the RT's internal timer or synchronize time across the bus.
00100Transmitter ShutdownCommands the RT to disable its transmitter on the other bus (A or B). Used to isolate a babbling transmitter in a dual-redundant system.
00011Initiate Self-TestCommands the RT to run its internal Built-In-Test (BIT).

 

5.3 Exception Handling & Bus Management

The MIL-STD-1553 bus relies on status bits to manage flow control and errors.

5.3.1 The "Busy" Bit

If an RT is overwhelmed (e.g., its host processor is rebooting or the buffer is full), it can set the Busy Bit in its Status Word response.

  • BC Action: The BC sees the Busy bit and must retry the message later.
  • Design Note: The standard discourages prolonged use of the Busy bit.

5.3.2 Service Request

An RT can set the Service Request Bit to alert the BC that it has high-priority data waiting (asynchronous data).

  • BC Action: The BC typically polls for this bit and, upon seeing it, issues a specific command (like a "Transmit Vector Word" mode code) to determine what service is needed.

5.4 Illegal Commands

It is critical to distinguish between an Invalid Command and an Illegal Command, as the RT responds to them differently.

  • Invalid Command: A command that fails the physical validity tests (e.g., bad parity, wrong sync, incorrect Manchester timing).
    • RT Response: The RT ignores the command completely. It remains silent and sends no Status Word.
  • Illegal Command: A command that is valid physically (correct sync, parity, etc.) but instructs the RT to perform a function it is not designed or authorized to do (e.g., writing to a reserved Subaddress or attempting a Mode Code that is not implemented).
    • RT Response: The RT must respond. It sends its Status Word with the Message Error bit set. It does not transmit data (if it was a transmit command) and ignores any data sent to it (if it was a receive command).
    • Purpose: This feature creates a safety layer, "illegalizing" specific commands to prevent the Bus Controller from accidentally overwriting critical memory or triggering unauthorized actions.

5.5 The Holt Advantage: Hardware Illegalization and Mode Code Handling

Offloading the protocol management to the hardware requires addressing two distinct challenges: automating the response to standard Mode Codes and enforcing the safety rules for Illegal Commands.

All Holt Protocol Solutions (including the HI-6130, HI-6131, MAMBA device family (HI-6135, HI-6136, HI-6137, HI-6138, HI-6139), HI-2130 and HI-6300 IP Core) handle both of these tasks in hardware, independent of the host processor.

  • Hardware Legalization (Illegal Command Detection): The ICs utilize a hardware "Legalization Table" (often a dedicated register or memory block). If message illegalization is enabled, then every incoming command is checked against this table.
    • If a command (specific Subaddress, Mode Code, or Word Count) is marked as "Illegal," the Holt IC automatically rejects it according to the standard (suppressing data and setting the Message Error bit).
    • This ensures complete safety and compliance without requiring the host software to validate every message interrupt.
  • Automatic Mode Code Handling: The ICs can be configured to automatically handle standard Mode Codes (like Synchronize, Transmit Status, or Reset Remote Terminal) without waking the host. In addition, Holt’s Simplified Mode Code Handling for RT mode, stores the associated data words directly in the descriptor block, simplifying host mode code management for Mode Codes with data. 
    • Auto-Response: The chip performs the required action (e.g., resetting internal timers) and transmits the status word automatically.
    • Host Notification: The host processor is only interrupted for Mode Codes that require its specific intervention (like Initiate Self-Test), keeping software overhead to a minimum.

 

Chapter 6.

Downloads
Tutorial