**[Reversion 11-19-96 to the Nav-Cam commands: Both Inputs and
Outputs]{.underline}**

The CHANGES: Well everything thing has changed but the big issues are
listed here, just to establish a new baseline.

1.  All commands to the nav-cam from the space craft (S/C) and
    corresponding telemetry will be explicit.

```{=html}
<!-- -->
```
2.  All commands and telemetry will be sent in 8 bits packets or bytes
    at 9600 BAUD.

```{=html}
<!-- -->
```
3.  All commands will reside in registers, 8 for the camera and 4 for
    the Scan Mirror. These registers will be read/writeable via send
    commands and telemetry requests from the S/C.

```{=html}
<!-- -->
```
4.  The filter wheel has ***[four values to indicate
    position.]{.underline}*** Three values are your standard binary
    coded position information and the forth is some strange parity
    value to help your know position if one of the three indicators
    burns out.

5\. Bit value of "0" turn off the function & "1" turn on the function.

The following tables will list all the commands for control and
telemetry:

***[commands sent from S/C to Camera:]{.underline}***

  -------------------------- ---------- ----- ---- ---- ---- ------- ------- ------- ------
                                        MSB                                          LSB

  [command                              7     6    5    4    3       2       1       0
  description]{.underline}                                                           

  Execute                    register   0     0    0    0    T~A~    T~D~    F~N~    E~N~
                             #0                                                      

  Shutter time, lower LSBs   register   0     0    0    1    E~4~    E~3~    E~2~    E~1~
                             #1                                                      

  shutter time, mid bits     register   0     0    1    0    E~8~    E~7~    E~6~    E~5~
                             #2                                                      

  shutter time, high bits    register   0     0    1    1    E~12~   E~11~   E~10~   E~9~
                             #3                                                      

  Telemetry mux select       register   0     1    0    0    x       T~3~    T~2~    T~1~
                             #4                                                      

  Lamps, compression & etc.  register   0     1    0    1    n/a     n/a     C~1~    L~1~
                             #5                                                      

  Filter steps moved         register   0     1    1    0    B~N~    W~3~    W~2~    W~1~
                             #6                                                      

  Wheel Position             register   0     1    1    1    P~4~    P~3~    P~2~    P~1~
                             #7                                                      
  -------------------------- ---------- ----- ---- ---- ---- ------- ------- ------- ------

***NOTE!! ONLY [ONE BIT]{.underline} AT A TIME CAN BE SET IN AN EXECUTE
COMMAND or the value Dumped.***

C~1~ data compression in on (1), all data is scaled to 8 bits or off (0)
and data passes though as 12 bits.

T~D~ is enable for digital telemetry of all registers in the UART. T~A~
is enable of analog telemetry mux select.

F~n~ enable the filter wheel to move a set number of steps. B~n~ is bulb
enable (shutter stays open).

E~n~ enable shutter timed exposure (TAKE an IMAGE!)

[Definitions (whats it all mean):]{.underline}

Register 0 executes the previous setup command values or registers.

> When T~D~ is set (1) all 8 digital register values,in the UART, will
> be sent back to the S/C as a telemetry data packet. The packet will
> consist of 8 bytes or 4 words.

Register 1, 2, 3 store the exposure time for the shutter and E~n~ is the
enable.

Register 4 selects which analog telemetry point is to be read back to
the S/C and T~A~ is the enable.

> An analog input is selected, digitized to 12 bits and 4 bytes are sent
> (see example for sending telemetry).

Register 5 turn on the cal lamp (L~1~) and has no enable command. Bit #3
is FIFO full & bit #2 is FIFO empty and these two bits are only seen
when the S/C does a read of this register.

Register 6 is the number of steps or filter wheel positions to be moved.
Each step takes one second, so a three step move would take three
seconds.

n/a are positions used in the telemetry read back or status bits in the
camera.

X is a spare or unused bit location.

***[Sending Telemetry to the S/C from the camera:]{.underline}***

<table>
<colgroup>
<col style="width: 35%" />
<col style="width: 3%" />
<col style="width: 7%" />
<col style="width: 7%" />
<col style="width: 7%" />
<col style="width: 7%" />
<col style="width: 7%" />
<col style="width: 7%" />
<col style="width: 7%" />
<col style="width: 7%" />
</colgroup>
<tbody>
<tr class="odd">
<td></td>
<td></td>
<td>MSB</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>LSB</td>
</tr>
<tr class="even">
<td><u>command description</u></td>
<td></td>
<td>7</td>
<td>6</td>
<td>5</td>
<td>4</td>
<td>3</td>
<td>2</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="odd">
<td>Analog Channel selected (1 of 8)</td>
<td></td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>T<sub>3</sub></td>
<td>T<sub>2</sub></td>
<td>T<sub>1</sub></td>
</tr>
<tr class="even">
<td><blockquote>
<p>Analog lower byte data</p>
</blockquote></td>
<td></td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>D<sub>4</sub></td>
<td>D<sub>3</sub></td>
<td>D<sub>2</sub></td>
<td>D<sub>1</sub></td>
</tr>
<tr class="odd">
<td>Analog mid byte data</td>
<td></td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>D<sub>5</sub></td>
<td>D<sub>8</sub></td>
<td>D<sub>7</sub></td>
<td>D<sub>6</sub></td>
</tr>
<tr class="even">
<td>Analog high byte data</td>
<td></td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>D<sub>12</sub></td>
<td>D<sub>11</sub></td>
<td>D<sub>10</sub></td>
<td>D<sub>9</sub></td>
</tr>
<tr class="odd">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><em><strong><u>“OR’’</u></strong></em></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td>Digital Register #0 ( first of 8)</td>
<td></td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>F<sub>N</sub></td>
<td>E<sub>N</sub></td>
</tr>
<tr class="odd">
<td>Digital data value in register #1</td>
<td></td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>E<sub>4</sub></td>
<td>E<sub>3</sub></td>
<td>E<sub>2</sub></td>
<td>E<sub>1</sub></td>
</tr>
<tr class="even">
<td>Digital data value in register #2</td>
<td></td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>E<sub>8</sub></td>
<td>E<sub>7</sub></td>
<td>E<sub>6</sub></td>
<td>E<sub>5</sub></td>
</tr>
<tr class="odd">
<td>Digital data value in register #3</td>
<td></td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>E<sub>12</sub></td>
<td>E<sub>11</sub></td>
<td>E<sub>10</sub></td>
<td>E<sub>9</sub></td>
</tr>
<tr class="even">
<td>Digital data value in register #4</td>
<td></td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>x</td>
<td>T<sub>3</sub></td>
<td>T<sub>2</sub></td>
<td>T<sub>1</sub></td>
</tr>
<tr class="odd">
<td>Digital data value in register #5</td>
<td></td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>F<sub>2</sub></td>
<td>F<sub>1</sub></td>
<td>C<sub>1</sub></td>
<td>L<sub>1</sub></td>
</tr>
<tr class="even">
<td>Digital data value in register #6</td>
<td></td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>B<sub>N</sub></td>
<td>W<sub>3</sub></td>
<td>W<sub>2</sub></td>
<td>W<sub>1</sub></td>
</tr>
<tr class="odd">
<td>Digital data value in register #7</td>
<td></td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>P<sub>4</sub></td>
<td>P<sub>3</sub></td>
<td>P<sub>2</sub></td>
<td>P<sub>1</sub></td>
</tr>
</tbody>
</table>

***[NOTE!]{.underline} - All telemetry data will have bit 7=1.***

> ***- The first Byte in a telemetry packet, bit 3=1 for analog data &
> =0 for digital data.***
>
> ***- Also the bit pattern (starting @ the MSB) will always be "100001"
> for the start of a digital data packet.***

***- The ability of doing a discrete read of a digital register value is
now lost***

***- When the E~N~ bit is set (1) ["two"]{.underline} things happen.***

***1. A timed exposure image is started***

> ***2. An automatic telemetry read-back of digital Registers 0 to 7
> values (the rising edge of E~n~ will clock in the current state to
> Registers 0, 5 & 7.).***

***[NOTE!]{.underline}*** F~2~ and F~1~ will be reset at the start of
taking a new Image (E~n~ is reset to 1).

F~2~= FIFO is full. F~1~= FIFO is empty

***[NOTE!]{.underline} P~4~ is some weird parity bit and how it works
will be explained later. Register 7 displays the actual position of the
filter wheel.***

***[COMMANDS SENT from the S/C TO THE SCAN MIRROR]{.underline}***

  -------------------------- ---------- ----- ---- ---- ---- ------ ------ ------ ------
                                        MSB                                       LSB

  [command                              7     6    5    4    3      2      1      0
  description]{.underline}                                                        

  Execute                    register   0     0    0    0    x      T~D~   x      V~N~
                             #0                                                   

  Velocity, lower bits       register   0     0    0    1    V~4~   V~3~   V~2~   V~1~
                             #1                                                   

  Velocity, high bits        register   0     0    1    0    V~8~   V~7~   V~6~   V~5~
                             #2                                                   

  Misc. Stuff Register       register   0     0    1    1    x      M~1~   H~1~   D~1~
                             #3                                                   
  -------------------------- ---------- ----- ---- ---- ---- ------ ------ ------ ------

***NOTE!! ONLY [ONE BIT]{.underline} AT A TIME CAN BE SET IN AN EXECUTE
COMMAND.***

T~D~ is enable read-back of all digital registers in the Scan Mirror
UART.

V~n~ enable new vel. Value H~1~ heater on/off control

M~1~ is start (1) or stop(0) the motor (motor should be in off state for
30m seconds

before direction is changed).

***[NOTE before the direction can be changed the motor has to BE
STOPPED!!!]{.underline}***

***[Telemetry SENT to the S/C from the Scan Mirror]{.underline}**
(automatic read-back of all 4 digital registers )*

  --------------------------- ---------- ----- ---- ---- ---- ------ ------ ------ ------
                                         MSB                                       LSB

  [description]{.underline}              7     6    5    4    3      2      1      0

  Execute                     register   1     0    0    0    0      1      x      V~N~
                              #0                                                   

  Velocity, lower bits        register   1     0    0    1    V~4~   V~3~   V~2~   V~1~
                              #1                                                   

  Velocity, high bits         register   1     0    1    0    V~8~   V~7~   V~6~   V~5~
                              #2                                                   

  Misc. Stuff Register        register   1     0    1    1    x      M~1~   H~1~   D~1~
                              #3                                                   
  --------------------------- ---------- ----- ---- ---- ---- ------ ------ ------ ------

***[NOTE bit 7=1]{.underline} when telemetry is being sent back to the
S/C.** All telemetry reads will be 4 bytes because of some weird PACi
requirement.*

***[HANDLING OF BITS ERRORS IN COMMAND AND TELEMETRY DATA &
TLC]{.underline}***

1\. All bytes send back and forth using the UART port will use even
parity.

2.  All bytes sent to the Nav-cam instrument will be echoed back to the
    S/C, IMDEATELY AFTER RECEIVEING IT, ***[EXACTLY AS RECEIVED
    !!!]{.underline}*** So if Nav-cam receives and a bad byte it will
    send the same wrong thing back i.e. Garbage IN - Garbage Out!

3.  ***It is up to the Space Craft to determine if there has been a
    transmission error and resend the command!***

4.  If the Nav-cam instrument detects a parity error, it will dump that
    byte and wait for a correct byte transmission. If an execute command
    is being received and more than one bit is high then this command is
    dumped and nothing is done.

5.  ***The time spacing between "correct" byte transmission will be AT
    LEAST 2m seconds!!!*** This requirement has been levied so there
    will adequate time in between byte commands for errors to be
    detected and corrective action taken.

```{=html}
<!-- -->
```
6.  All execute commands (bits in register 0) will be reset by the
    hardware after the operation is completed.

7.  ~~If a received command has the MSB set (invalid command), this is
    dumped and ***NOT ECHOED!***~~

8.  On "power-on" all UART values are set to zero.

9.  Each step move of the Filter Wheel takes one second, so a 4 step
    move would take 4 seconds.

***[Summary of changes made on 11-1-96:]{.underline}***

***[to the camera:]{.underline}***

1.  All execute commands can only have one bit set at a time.

2.  The Spare register was changed to the Misc. stuff register (reg#7).

3.  Shutter bulb control was move down to the Misc. stuff register
    (reg.#7), bit 0 location.

***[To the scan mirror:]{.underline}***

1.  All execute commands can only have one bit set at a time.

2.  Heater control was moved from Register #0 bit 0 (execute) to
    Register #3 bit-3.

3.  Velocity enable command was added to the execute command, bit-0.

***[Summary of changes made on 11-12-96:]{.underline}***

***[to the camera:]{.underline}***

1.  Bulb was moved to register 6 bit #3.

2.  Register now holds the actual filter wheel position.

3.  F~2~ and F~1~, FIFO control bits are more clearly defined.

***[to the scan mirror:]{.underline}***

1.  Two execute command were dropped, M~n~ & D~n~ and T~n~ was moved to
    bit #2 of Register 0.

2.  In Register #3, M~1~ (bit 3) & D~1~ (bit 2) were added. Now the
    motor on/off control no longer needs an enable to change state and
    will change immediately once the bit 3 value in register #3 is
    changed. Also the direction bit no longer needs an enable to change
    state and will change immediately once the bit 2 value in register
    #3 is changed. ***CAUTION! THE MOTOR SHOULD BE STOPPED TO AT LEAST
    30m seconds BEFORE THE DIRECTION IS CHANGED!!***

3.  Telemetry being send back to the S/C is now 2 bytes instead of one.

4.  Lines #6,7,8 & 9 were added in the handling of errors section.

***[Summary of changes made on 11-19-96:]{.underline} All telemetry
outputs are either 2 or 4 WORDS to S/C.***

***[to the camera:]{.underline}***

1.  A new bit was added T~D~ in Reg. 0. This bit will do an automatic
    telemetry read of all digital registers in the UART. The T~N~ bit
    was change to T~A~ and this bit will enable reads of only analog
    telemetry. The T~4~ bit was dropped and is now a spare (8 telemetry
    analog inputs is enough).

2.  A new feature was added to E~N~. On its rising edge it will start
    taking an image and ***[also]{.underline}*** do an automatic
    telemetry read of all digital registers in the UART (the same
    operation as T~D~).

3.  **All telemetry** packets to the S/C will be **either 4 words** (for
    digital info.) **or 2 words** (for analog info. ). This also implies
    the format for all the bits were changed and they were! (see example
    for sending telemetry data).

***[to the scan mirror:]{.underline}***

1.  The T~N~ bit was change to T~D~ and this bit will do an automatic
    read of all 4 digital registers in the scan mirror UART.

2.  The width of all data values was changed to 4 bits, hence changing
    the storage structure of register 1 &2.

3.  The telemetry select bits (T~2~ &T~1~) were dropped and the control
    bits M,H & D were all shifted (right justified).

4.  **All telemetry packets to the S/C will be 2 words,** a read of all
    4 registers! (see example for sending telemetry data).