home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / swl / swlguid1 / icomrs.txt < prev    next >
Text File  |  1989-04-02  |  20KB  |  531 lines

  1.           
  2.           
  3.           
  4.           
  5.           
  6.           
  7.                      Computer Control of ICOM Amateur Gear
  8.           
  9.                               Carl Clawson, N7KBV
  10.           
  11.           
  12.           
  13.                               General Description
  14.           
  15.           
  16.                Several ICOM products feature a built-in computer
  17.           interface connected to a 1/8" phone jack on the rear panel.
  18.           However, ICOM gives no information about this interface in
  19.           the instruction manuals that I've seen.  The information
  20.           exists within ICOM, and my dealer managed to get it for me.
  21.           
  22.                This interface, called the "CI-V" by ICOM, is standard
  23.           on the following models:  735, 761, 275, 375, 475, and
  24.           R7000.  Earlier models used the CI-IV parallel interface,
  25.           which can be connected to CI-V by ICOM's UX-14 converter.
  26.           Models using the CI-IV are the 751, 271, 471, 1271, and R71.
  27.           The information I got from ICOM was written with the 735 in
  28.           mind, but a listing of a BASIC program to control the R7000
  29.           was appended.  I believe it will help with the other models,
  30.           too.  The control codes and data format should be the same
  31.           for all of them.
  32.           
  33.                The computer interface allows you to do such things as:
  34.           
  35.           -    Set and read the frequency and modulation mode
  36.           
  37.           -    Set VFO A, VFO B, or memory mode
  38.           
  39.           -    Select memory channel
  40.           
  41.           -    Store displayed frequency into memory
  42.           
  43.           -    Transfer displayed memory-mode frequency to a VFO
  44.           
  45.                Even without a computer, you can run a cable between
  46.           the remote control jacks of two rigs, and whenever the fre-
  47.           quency or modulation mode of either is changed, the other
  48.           will track it if possible.  (If the rigs have incompatible
  49.           frequency coverages, like the 735 and R7000, funny things
  50.           can happen.)
  51.           
  52.                The interface is bi-directional, using TTL levels on a
  53.           single line for sending and receiving serial ASCII data.
  54.           You may need an appropriate hardware interface to convert,
  55.           for example, RS232 to TTL.  (I understand that Commodore
  56.           computers have TTL inputs and outputs so that no interface
  57.           is needed with them.) I used the Motorola MC1488 and MC1489
  58.           chips powered by two 9-volt batteries to interface to my
  59.           RS232 line.  Appendix 1 lists the pinouts used for this
  60.           interface.  If you'd rather buy something, ICOM sells the
  61.           
  62.           
  63.           
  64.           
  65.           
  66.           
  67.           
  68.           
  69.                                      - 2 -
  70.           
  71.           
  72.           
  73.           model CT-17 level converter for RS232.
  74.           
  75.                The interface uses a "carrier-sense, multiple-access
  76.           with collision detection" local area network protocol, so
  77.           that multiple rigs can be connected in parallel without dif-
  78.           ficulty.  Thus, you can use the same RS232 line and level-
  79.           converter interface to control many rigs.  Each rig must
  80.           have a unique address, which is set by internal jumpers.
  81.           Each model comes factory preset to its own address, which is
  82.           04 for the 735 and 08 for the R7000.  Appendix 2 has infor-
  83.           mation on the jumper settings.
  84.           
  85.                I will use the words "receive" and "send" to refer to
  86.           data transmission.  Thus a "receiver" isn't necessarily an
  87.           R7000; it's any device receiving data from the CI-V bus.  I
  88.           will use the word "rig" to mean an ICOM product using the
  89.           CI-V interface.
  90.           
  91.           
  92.           
  93.                                   Data Format
  94.           
  95.           
  96.                The rigs send and receive data in variable length pack-
  97.           ets, which are formatted as follows:
  98.           
  99.                   Byte #    Contents
  100.           
  101.                   1         hex 'FE' (i.e. 11111110 binary, 254 decimal)
  102.                   2         hex 'FE'
  103.                   3         <RX>
  104.                   4         <TX>
  105.                   5         <Code>
  106.                   6-n       <BCD data of variable length>
  107.                   n+1       hex 'FD'
  108.           
  109.           The two hexadecimal FE bytes signal the beginning of a
  110.           packet, and the FD byte signals the end.  <Code> is the con-
  111.           trol code sent by the computer to the rig, which determines
  112.           the action that the rig will take.  In some cases, the
  113.           receiving rig will include a control code in its response to
  114.           the sender; see the section "Control Codes and Responses"
  115.           below.  <TX> is the address of the device sending the data,
  116.           and <RX> is the address to which the data is being sent.
  117.           When a rig responds to a data packet, it addresses that
  118.           response to the <TX> in the packet.  Thus, if your computer
  119.           requests a rig to report its frequency, it will address that
  120.           report to the computer and other rigs will ignore the data.
  121.           (Of course, the computer can lie about its address and trick
  122.           one rig into talking to another!) Your computer should use
  123.           its own unique, non-zero address on the network.  I will
  124.           assume in the examples that the computer is at address 02.
  125.           There are two control codes that can cause any rig on the
  126.           network to respond when sent with <RX>=0; I discuss these
  127.           
  128.           
  129.           
  130.           
  131.           
  132.           
  133.           
  134.           
  135.                                      - 3 -
  136.           
  137.           
  138.           
  139.           below.
  140.           
  141.                Bytes #6 through #n contain any data required by the
  142.           control code, in BCD format with 2 decimal digits per byte.
  143.           Frequency data is sent starting with the byte containing the
  144.           1-Hz and 10-Hz digits.  These digits are sent even if they
  145.           are not used by the rig, so that the data format is the same
  146.           for all rigs regardless of their frequency coverage and
  147.           resolution.  For example, consider the frequency 25.13244
  148.           MHz.  This is broken up into two-digit groups:
  149.           
  150.                                  25  13  24  40
  151.           
  152.           It is then coded in BCD.  In other words, consider each
  153.           digit group to be a hexadecimal number instead of decimal.
  154.           The decimal values of these BCD digit groups are 2x16+5=37,
  155.           1x16+3=19, 2x16+4=36, and 4x16+0=64.  Now send these groups,
  156.           starting with the least significant.  The complete data
  157.           packet will be, in hexadecimal,
  158.           
  159.                  FE  FE  <RX>  <TX>  <Code>  40  24  13  25  FD
  160.           
  161.           
  162.                If you have more than one rig on the network you may
  163.           occasionally receive a sequence of 5 bytes of hex 'FC'.
  164.           This is the "jammer code" used by a rig to indicate that a
  165.           collision has occurred.  Each rig, when sending, monitors
  166.           the interface.  If it does not receive exactly what it sent,
  167.           then a collision occurred, i.e., another rig was sending
  168.           data at the same time.  If a rig detects a collision when
  169.           sending a packet, it will wait until the network is idle,
  170.           then send the jammer code.  A rig that receives this code
  171.           will realize that a collision has occurred and ignore the
  172.           previously received packet.  Because the ICOM remote control
  173.           ports are bi-directional, your computer will receive every-
  174.           thing it sends, so you can check for collisions from your
  175.           computer, too.
  176.           
  177.           
  178.           
  179.                           Control Codes and Responses
  180.           
  181.           
  182.                Most of the following codes are addressed to a specific
  183.           rig, which addresses an acknowledgement packet to the <TX>
  184.           contained in the control packet.  The first two codes, 00
  185.           and 01, can be sent to the "group call address" of 00, in
  186.           which case any rig will receive them without sending an ack-
  187.           nowledgement.  These two codes are sent in this way by any
  188.           rig when its mode or frequency is changed by manual control,
  189.           and are received by any rig on the network.  This allows a
  190.           number of rigs to track each other in frequency and mode
  191.           without computer intervention.  Rigs can be inhibited from
  192.           sending and receiving group call packets by an internal
  193.           
  194.           
  195.           
  196.           
  197.           
  198.           
  199.           
  200.           
  201.                                      - 4 -
  202.           
  203.           
  204.           
  205.           jumper.  See Appendix 2 for more details.  These codes can
  206.           also be sent with a specific, non-zero <RX>, in which case
  207.           they will be received by the addressed rig even if the group
  208.           call function is disabled.
  209.           
  210.           00   Set frequency.  See above for format of frequency data.
  211.                See code 05 below for more details.
  212.           
  213.           01   Set modulation mode.  One or two data bytes are
  214.                required to indicate the mode desired.
  215.           
  216.                                 Data      Mode
  217.           
  218.                                 00        LSB
  219.                                 01        USB
  220.                                 02        AM
  221.                                 03        CW
  222.                                 04        RTTY
  223.                                 05        FM
  224.                                 05 00     SSB (R7000)
  225.           
  226.           
  227.           02   Report tuning range.  No data required.  The rig will
  228.                report its frequency limits in the format
  229.           
  230.                 FE FE <RX> <TX> 02 <upper limit> 2D <lower limit> FD
  231.           
  232.                (Hex 2D is the ASCII hyphen.) According to ICOM, some
  233.                rigs report the lower limit first.
  234.           
  235.           03   Report frequency.  No data required.  The addressed rig
  236.                returns its displayed frequency to the sender in the
  237.                format
  238.           
  239.                           FE FE <RX> <TX> 03 <Frequency> FD
  240.           
  241.           
  242.           04   Report modulation mode.  No data required.  The
  243.                addressed rig returns its mode to the sender using the
  244.                codes listed above.  Rigs with selectable bandwidth
  245.                return an additional byte indicating the bandwidth.
  246.                The format of the response is
  247.           
  248.                       FE FE <RX> <TX> 04 <Mode> <Bandwidth> FD
  249.           
  250.                The bandwidth codes are:
  251.           
  252.                             Data      Bandwidth
  253.           
  254.                             01        Width 1 (widest)
  255.                             02        Width 2 (narrower)
  256.                             03        Width 3 (narrowest)
  257.           
  258.           
  259.           
  260.           
  261.           
  262.           
  263.           
  264.           
  265.           
  266.           
  267.                                      - 5 -
  268.           
  269.           
  270.           
  271.           05   Set frequency.  The data format is given above.  If the
  272.                data contains fewer digits than the rig uses, the
  273.                digits sent will be changed and the rest will remain
  274.                the same.  If the rig receives valid frequency data
  275.                within its tuning range, it responds with a packet con-
  276.                taining the data "FB":
  277.           
  278.                                 FE FE <RX> <TX> FB FD
  279.           
  280.                If it didn't like the data, it responds with the data
  281.                "FA":
  282.           
  283.                                 FE FE <RX> <TX> FA FD
  284.           
  285.                These acknowledgement codes are used by all following
  286.                commands.
  287.           
  288.                The 735 responds to out-of-range frequency data by
  289.                sending the "FA" acknowledgement and: 1) If the fre-
  290.                quency it receives is less than 0.1 MHz, it sets its
  291.                frequency to 0.1 MHz, 2) If it received 4 bytes of fre-
  292.                quency data that is more than 30 MHz, it sets itself to
  293.                30 MHz, and 3) If it received more than 4 bytes of fre-
  294.                quency data, the data is ignored.
  295.           
  296.           06   Set modulation mode.  If one byte is sent, it sets the
  297.                mode per the above table.  If two bytes are sent, the
  298.                second is the IF bandwidth.
  299.           
  300.           07   Set VFO status.  If no data is sent, the rig changes
  301.                from MEMORY mode to VFO mode.  If data 00 or 01 is
  302.                sent, the rig sets VFO A or VFO B respectively.
  303.           
  304.           08   Set memory channel.  If no data is sent, the rig
  305.                changes from VFO mode to MEMORY mode.  If BCD channel
  306.                data is sent, the rig changes to that memory channel.
  307.           
  308.           09   Store displayed frequency and mode into displayed
  309.                memory channel.  No data required.
  310.           
  311.           0A   Write frequency and mode from displayed memory channel
  312.                to a VFO.  No data required.
  313.           
  314.           
  315.           
  316.                                       Examples
  317.           
  318.           
  319.                I will give a few examples of codes and responses for
  320.           the 735.  The 735 is at address 04 and the computer is at
  321.           02.  First, let's find out what's in memory channel 1 (code
  322.           08 to set the channel, and code 03 to read the frequency).
  323.           Assume the 735 has the frequency 7.12750 MHz stored in
  324.           memory #1.
  325.           
  326.           
  327.           
  328.           
  329.           
  330.           
  331.           
  332.           
  333.                                      - 6 -
  334.           
  335.           
  336.           
  337.           Computer to 735:
  338.           
  339.                   FE FE 04 02 08 01 FD
  340.           
  341.           735 to computer:
  342.           
  343.                   FE FE 02 04 FB FD
  344.           
  345.           Computer to 735:
  346.           
  347.                   FE FE 04 02 03 FD
  348.           
  349.           735 to computer:
  350.           
  351.                   FE FE 02 04 03 00 75 12 07 FD
  352.           
  353.           Now let's change the frequency and mode to 14.02500 MHz USB
  354.           (codes 05 and 06).
  355.           
  356.           Computer to 735:
  357.           
  358.                   FE FE 04 02 05 00 50 02 14 FD
  359.           
  360.           735 to computer:
  361.           
  362.                   FE FE 02 04 FB FD
  363.           
  364.           Computer to 735:
  365.           
  366.                   FE FE 04 02 06 01 FD
  367.           
  368.           735 to computer:
  369.           
  370.                   FE FE 02 04 FB FD
  371.           
  372.           Now store the changed result back into memory #1.  This
  373.           channel is already displayed, so we need only the store com-
  374.           mand, code 09.
  375.           
  376.           Computer to 735:
  377.           
  378.                   FE FE 04 02 09 FD
  379.           
  380.           735 to computer:
  381.           
  382.                   FE FE 02 04 FB FD
  383.           
  384.           
  385.           
  386.           
  387.           
  388.           
  389.           
  390.           
  391.           
  392.           
  393.           
  394.           
  395.           
  396.           
  397.           
  398.           
  399.                                      - 7 -
  400.           
  401.           
  402.           
  403.           
  404.                       Appendix 1 -- RS232 to TTL converter
  405.           
  406.           
  407.                This is an easily built converter that will run your
  408.           ICOM gear from a standard RS232 line.  It can be built in an
  409.           hour or two for about $10.  The converter uses two inexpen-
  410.           sive, widely-available chips -- the Motorola MC1488 line
  411.           driver and MC1489 line receiver.  The only other components
  412.           needed are a box, connectors, a power switch, and a couple
  413.           .01 or .1 capacitors to bypass the power supply leads.  I
  414.           used two 9V batteries for power.  Power for the 1488 can be
  415.           +-9 to +-15 volts, and the 1489 requires +5 to +10 volts.
  416.           With a suitable DC-DC converter chip and a 78L05 or 78L08,
  417.           you could power the circuit off of your 13.8-V supply.  Or,
  418.           if you're clever, figure out a way to trickle charge two 9V
  419.           nicads off of your RS232 line.
  420.           
  421.                The pinouts are as follows:
  422.           
  423.           For the 1488 -
  424.           
  425.                   Pin       Connect to
  426.           
  427.                   1         -V
  428.                   2         ICOM remote jack center conductor
  429.                   3         RS232 pin 3 (RD)
  430.                   7         Ground
  431.                   14        +V
  432.           
  433.           
  434.           For the 1489 -
  435.           
  436.                   Pin       Connect to
  437.           
  438.                   1         RS232 pin 2 (TD)
  439.                   3         ICOM remote jack center conductor
  440.                   7         Ground
  441.                   14        +V
  442.           
  443.           Ground pin 7 of the RS232 line and the outer conductor of
  444.           the ICOM remote jack, and you're on line.
  445.           
  446.           
  447.           
  448.           
  449.           
  450.           
  451.           
  452.           
  453.           
  454.           
  455.           
  456.           
  457.           
  458.           
  459.           
  460.           
  461.           
  462.           
  463.           
  464.           
  465.                                      - 8 -
  466.           
  467.           
  468.           
  469.           
  470.                         Appendix 2 -- Jumper Selections
  471.           
  472.           
  473.                There are jumpers in the ICOM rigs to set the device
  474.           address, baud rate, and to enable the group call feature.
  475.           You must look on the schematic to find them.  The jumper to
  476.           enable the group call feature is called the "transceive" bit
  477.           by ICOM, and may be labeled with "TRV" on the schematic.
  478.           The others are labeled "DBn" on the 735 and R7000; look for
  479.           something similar.  The rigs are factory-set to 1200 baud,
  480.           transceive enabled.
  481.           
  482.                I have specific information from ICOM on the 735
  483.           jumpers, and for the R7000 I have a likely guess based on
  484.           the 735 codes and the schematic.
  485.           
  486.           For the 735 -
  487.           
  488.                The jumpers use lines labeled DB0 through DB5 at con-
  489.           nector J22 on the PL board.  Lines DB0 through DB2 set the
  490.           device address.  Line DB3 is the transceive enable.  The
  491.           baud rate is controlled by DB4 and DB5 according to
  492.           
  493.                   DB4  DB5  Baud
  494.           
  495.                   0    0    undefined
  496.                   1    0    9600
  497.                   0    1    1200
  498.                   1    1    300
  499.           
  500.           The 735 is set at the factory to address 04.
  501.           
  502.           For the R7000 -
  503.           
  504.                The jumpers use lines DB0 through DB7 at connector J17
  505.           on the logic board.  The address is set by DB0 through DB4,
  506.           DB5 is the transceive enable, and the baud rate is set by
  507.           DB6 and DB7.  The factory address is 08.
  508.           
  509.                If you have any other rig, you can determine its
  510.           address by hooking it up to your computer and changing the
  511.           frequency or modulation mode manually.  You will receive a
  512.           group call packet that contains as its 4th byte the address
  513.           of the rig.
  514.           
  515.           
  516.           
  517.           
  518.           
  519.           
  520.           
  521.           
  522.           
  523.           
  524.           
  525.           
  526.           
  527.           
  528.           
  529.  
  530.  
  531.