# IRIG timecode

Inter-range instrumentation group timecodes, commonly known as IRIG timecode, are standard formats for transferring timing information. Atomic frequency standards and GPS receivers designed for precision timing are often equipped with an IRIG output. The standards were created by the Tele Communications Working Group of the U.S. military's Inter-Range Instrumentation Group (IRIG), the standards body of the Range Commanders Council. Work on these standards started in October 1956, and the original standards were accepted in 1960.
The original formats were described in IRIG Document 104-60, later revised and reissued in August 1970 as IRIG Document 104-70, upgraded later that year as the IRIG Document to the status of a Standard, IRIG Standard 200-70. The latest version of the Standard is IRIG Standard 200-16 from August 2016.

## Timecodes

The different timecodes defined in the Standard have alphabetic designations. A, B, D, E, G, and H are the standards currently defined by IRIG Standard 200-04.
The main difference between codes is their rate, which varies between one pulse per minute and 10,000 pulses per second.
IRIG timecode :
| Code | Bit rate | Bit time | Bits per frame | Frame time | Frame rate |
| A | 1000 Hz | 1 ms | 100 | 0.1 s | 10 Hz |
| B | 100 Hz | 10 ms | 100 | 1 s | 1 Hz |
| C | 2 Hz | 0.5 s | 120 | 60 s | 1⁄60 Hz |
| D | 1⁄60 Hz | 60000 ms | 60 | 3600 s | 1⁄3600 Hz |
| E | 10 Hz | 100 ms | 100 | 10 s | 0.1 Hz |
| G | 10000 Hz | 0.1 ms | 100 | 0.01 s | 100 Hz |
| H | 1 Hz | 1000 ms | 60 | 60 s | 1⁄60 Hz |
* ↑ C was in the original specification, but was replaced by H.
* Grohman, Richard O.; Mellenbruch, Larry L.; Sowic, Felix J. (14 March 1974). Special Hardware for ARL Analysis of ACODAC Data (pdf) (Technical report). Texas University at Austin. ARL-TM-74-12. Archived from the original on 8 April 2013. Retrieved 23 December 2011.
* Handbook of Time Code Formats (PDF) (Seventh ed.). Datum Inc. 1987. p. 18. Archived (PDF) from the original on 8 March 2023. Retrieved 18 March 2024 – via vk7krj.com.
The bits are modulated on a carrier. A three-digit suffix specifies the type and frequency of the carrier, and which optional information is included:

### Modulation type

* DC level shift (DCLS) (pulse width coded without carrier)
* Sine wave carrier (amplitude modulated)
* Manchester modulated

### Carrier frequency

* No carrier (DCLS)
* 100 Hz (10 ms resolution)
* 1 kHz (1 ms resolution)
* 10 kHz (100 μs resolution)
* 100 kHz (10 μs resolution)
* 1 MHz (1 μs resolution)

### Coded expressions

    Binary-coded decimal (BCD) day of year, hours, minutes, and (for some formats) seconds and fractions are always included. Optional components are:
   * Year number (00–99; century is not coded)
   * User-defined "control functions (CF)" occupying bits not defined by IRIG
   * "Straight binary seconds (SBS)", a 17-bit binary counter that counts from 0 to 86399.
    The types are:
   * BCD, CF, SBS
   * BCD, CF
   * BCD
   * BCD, SBS
   * BCD, BCD_Year, CF, SBS
   * BCD, BCD_Year, CF
   * BCD, BCD_Year
   * BCD, BCD_Year, SBS
The recognized signal identification numbers for each format according to the standard 200-04 consist of:
Permissible Code Formats :
| Format | Modulation Type | Carrier Frequency | Coded Expressions |
| A | 0,1,2 | 0,3,4,5 | 0,1,2,3,4,5,6,7 |
| B | 0,1,2 | 0,2,3,4,5 | 0,1,2,3,4,5,6,7 |
| D | 0,1 | 0,1,2 | 1,2 |
| E | 0,1 | 0,1,2 | 1,2,5,6 |
| G | 0,1,2 | 0,4,5 | 1,2,5,6 |
| H | 0,1 | 0,1,2 | 1,2 |
Thus the complete signal identification number consists of one letter and three digits. For example, the signal designated as B122 is deciphered as follows: Format B, Sine wave (amplitude modulated), 1 kHz carrier, and Coded expressions BCDTOY.
The most commonly used of the standards is IRIG B, then IRIG A, then probably IRIG G. Timecode formats directly derived from IRIG H are used by NIST radio stations WWV, WWVH and WWVB.
For example, one of the most common formats, IRIG B122:
    IRIG B122 transmits one hundred pulses per second on an amplitude modulated 1 kHz sine wave carrier, encoding information in BCD. This means that 100 bits of information are transmitted every second. The time frame for the IRIG B standard is 1 second, meaning that one data frame of time information is transmitted every second. This data frame contains information about the day of the year (1–366), hours, minutes, and seconds. Year numbers are not included, so the timecode repeats annually. Leap second announcements are not provided. Although information is transmitted only once per second, a device can synchronize its time very accurately with the transmitting device by using a phase-locked loop to synchronize to the carrier. Typical commercial devices will synchronize to within 1 microsecond using IRIG B timecodes.

## Timecode structure

IRIG timecode is made up of repeating frames, each containing 60 or 100 bits. The bits are numbered from 0 through 59 or 99.
At the start of each bit time, the IRIG timecode enables a signal (sends a carrier, raises the DC signal level, or transmits Manchester 1 bits). The signal is disabled (carrier attenuated at least 3×, DC signal level lowered, or Manchester 0 bits transmitted), at one of three times during the bit interval:
* After 0.2 of a bit time, to encode a binary 0
* After 0.5 of a bit time, to encode a binary 1
* After 0.8 of a bit time, to encode a marker bit
Bit 0 is the frame marker bit P$_r$. Every 10th bit starting with bit 9, 19, 29, ... 99 is also a marker bit, known as position identifiers P$_1$, P$_2$, ..., P$_9$, P$_0$. Thus, two marker bits in a row (P$_0$ followed by P$_r$) marks the beginning of a frame. The frame encodes the time of the leading edge of the frame marker bit.
All other bits are data bits, which are transmitted as binary 0 if they have no other assigned purpose.
Generally, groups of 4 bits are used to encode BCD digits. Bits are assigned little-endian within fields.
* Bits 1–4 encode seconds, and bits 6–8 encode tens of seconds (0–59)
* Bits 10–13 encode minutes, and bits 15–17 encode tens of minutes (0–59)
* Bits 20–23 encode hours, and bits 25–26 encode tens of hours (0–23)
* Bits 30-33 encode day of year, 35-38 encode tens of days, and bits 40–41 encode hundreds of days (1–366)
* Bits 45–48 encode tenths of seconds (0–9)
* Bits 50–53 encode years, and bits 55–58 encode tens of years (0–99)
* Bits 80–88 and 90–97 encode "straight binary seconds" since 00:00 on the current day (0–86399, not BCD)
In IRIG G, bits 50–53 encode hundredths of seconds, and the years are encoded in bits 60–68.
Not all formats include all fields. Obviously those formats with 60-bit frames omit the straight binary seconds fields, and digits representing divisions less than one frame time (everything below hours, in the case of IRIG D) are always transmitted as 0.
No parity or check bits are included. Error detection can be achieved by comparing consecutive frames to see if they encode consecutive timestamps.
Unassigned 9-bit fields between consecutive marker bits are available for user-defined "control functions". For example, the IEEE 1344 standard defines functions for bits 60–75.

## IRIG timecode

IRIG A time code structure :
| Bit | Weight | Meaning | Bit | Weight | Meaning | Bit | Weight | Meaning | Bit | Weight | Meaning | Bit | Weight | Meaning |
| 00 | P$_r$ | Frame marker | 20 | 1 | Hours (0–23) | 40 | 100 | Day of year (1–366) | 60 | 0 | Unused, available for Control Functions | 80 | 1 | Straight Binary Seconds (0–86399) |
| 01 | 1 | Seconds (00–59) | 21 | 2 | Hours (0–23) | 41 | 200 | Day of year (1–366) | 61 | 0 | Unused, available for Control Functions | 81 | 2 | Straight Binary Seconds (0–86399) |
| 02 | 2 | Seconds (00–59) | 22 | 4 | Hours (0–23) | 42 | 0 | Unused | 62 | 0 | Unused, available for Control Functions | 82 | 4 | Straight Binary Seconds (0–86399) |
| 03 | 4 | Seconds (00–59) | 23 | 8 | Hours (0–23) | 43 | 0 | Unused | 63 | 0 | Unused, available for Control Functions | 83 | 8 | Straight Binary Seconds (0–86399) |
| 04 | 8 | Seconds (00–59) | 24 | 0 | Hours (0–23) | 44 | 0 | Unused | 64 | 0 | Unused, available for Control Functions | 84 | 16 | Straight Binary Seconds (0–86399) |
| 05 | 0 | Seconds (00–59) | 25 | 10 | Hours (0–23) | 45 | 0.1 | Tenths of seconds (0.0–0.9) | 65 | 0 | Unused, available for Control Functions | 85 | 32 | Straight Binary Seconds (0–86399) |
| 06 | 10 | Seconds (00–59) | 26 | 20 | Hours (0–23) | 46 | 0.2 | Tenths of seconds (0.0–0.9) | 66 | 0 | Unused, available for Control Functions | 86 | 64 | Straight Binary Seconds (0–86399) |
| 07 | 20 | Seconds (00–59) | 27 | 0 | Unused | 47 | 0.4 | Tenths of seconds (0.0–0.9) | 67 | 0 | Unused, available for Control Functions | 87 | 128 | Straight Binary Seconds (0–86399) |
| 08 | 40 | Seconds (00–59) | 28 | 0 | Unused | 48 | 0.8 | Tenths of seconds (0.0–0.9) | 68 | 0 | Unused, available for Control Functions | 88 | 256 | Straight Binary Seconds (0–86399) |
| 09 | P$_1$ | Position identifier | 29 | P$_3$ | Position identifier | 49 | P$_5$ | Position identifier | 69 | P$_7$ | Position identifier | 89 | P$_9$ | Straight Binary Seconds (0–86399) |
| 10 | 1 | Minutes (00–59) | 30 | 1 | Day of year (1–366) | 50 | 1 | Year (00–99) | 70 | 0 | Unused, available for Control Functions | 90 | 512 | Straight Binary Seconds (0–86399) |
| 11 | 2 | Minutes (00–59) | 31 | 2 | Day of year (1–366) | 51 | 2 | Year (00–99) | 71 | 0 | Unused, available for Control Functions | 91 | 1024 | Straight Binary Seconds (0–86399) |
| 12 | 4 | Minutes (00–59) | 32 | 4 | Day of year (1–366) | 52 | 4 | Year (00–99) | 72 | 0 | Unused, available for Control Functions | 92 | 2048 | Straight Binary Seconds (0–86399) |
| 13 | 8 | Minutes (00–59) | 33 | 8 | Day of year (1–366) | 53 | 8 | Year (00–99) | 73 | 0 | Unused, available for Control Functions | 93 | 4096 | Straight Binary Seconds (0–86399) |
| 14 | 0 | Minutes (00–59) | 34 | 0 | Day of year (1–366) | 54 | 0 | Year (00–99) | 74 | 0 | Unused, available for Control Functions | 94 | 8192 | Straight Binary Seconds (0–86399) |
| 15 | 10 | Minutes (00–59) | 35 | 10 | Day of year (1–366) | 55 | 10 | Year (00–99) | 75 | 0 | Unused, available for Control Functions | 95 | 16384 | Straight Binary Seconds (0–86399) |
| 16 | 20 | Minutes (00–59) | 36 | 20 | Day of year (1–366) | 56 | 20 | Year (00–99) | 76 | 0 | Unused, available for Control Functions | 96 | 32768 | Straight Binary Seconds (0–86399) |
| 17 | 40 | Minutes (00–59) | 37 | 40 | Day of year (1–366) | 57 | 40 | Year (00–99) | 77 | 0 | Unused, available for Control Functions | 97 | 65536 | Straight Binary Seconds (0–86399) |
| 18 | 0 | Unused | 38 | 80 | Day of year (1–366) | 58 | 80 | Year (00–99) | 78 | 0 | Unused, available for Control Functions | 98 | 0 | Unused |
| 19 | P$_2$ | Position identifier | 39 | P$_4$ | Position identifier | 59 | P$_6$ | Position identifier | 79 | P$_8$ | Position identifier | 99 | P$_0$ | Position identifier |

## IRIG J timecode

IRIG standard 212-00 defines a different time-code, based on RS-232-style asynchronous serial communication. The timecode consists of ASCII characters, each transmitted as 10 bits:
* 1 start bit
* 7 data bits
* 1 odd parity bit
* 1 stop bit
The on-time marker is the leading edge of the first start bit.
IRIG J-1 timecode consists of 15 characters (150 bit times), sent once per second at a baud rate of 300 or greater:
* SOH is the ASCII "start of header" code, with binary value 0x01.
* DDD is the ordinal date (day of year), from 1 to 366.
* HH, MM and SS are the time of the start bit.
* The code is terminated by a CR+LF pair.
At the end of the timecode, the serial line is idle until the start of the next code. There is no idle time between other characters.
IRIG J-2 timecode consists of 17 characters (170 bit times), sent 10 times per second at a baud rate of 2400 or greater:
This is the same, except that tenths of seconds are included.
The full-timecode specification is of the form "IRIG J-xy", where x denotes the variant, and y denotes a baud rate of 75×2$^y$.
Normally used combinations are J-12 through J-14 (300, 600, and 1200 baud), and J-25 through J-29 (2400 through 38400 baud).
| Combination J-xy | variant (x) | y | 2$^y$ | Baud = 75 × 2$^y$ |
| J-12 | 1 | 2 | 4 | 300 |
| J-13 | 1 | 3 | 8 | 600 |
| J-14 | 1 | 4 | 16 | 1200 |
| J-25 | 2 | 5 | 32 | 2400 |
| J-26 | 2 | 6 | 64 | 4800 |
| J-27 | 2 | 7 | 128 | 9600 |
| J-28 | 2 | 8 | 256 | 19200 |
| J-29 | 2 | 9 | 512 | 38400 |