This file contains information on the ICOM CI-V interface for computer
control of ICOM amateur radio gear. Although this is specifically about
the CI-V implementation of the IC-820H Dual Band All-Mode transceiver,
much of the information will apply to other ICOM radios with a CI-V
interface as well. The following areas are the most likely to require
attention when using this information and/or example programs on other
ICOM tranceivers:

- Radio address. The IC-820H defaults to radio address 42h, however
  other tranceivers have different addresses. This information should
  be given in your tranceiver manual, however here is a list of the
  ones that I am aware of (I have not verified all of these):

    IC-761:     1Eh     IC-275A/E/H:    10h     IC-475A/E/H:    14h
    IC-375A:    12h     IC-575A/E/H:    16h     IC-735:         04h
    IC-R7000:   08h     IC-751(A):      1Ch     IC-271A/E/H:    20h
    IC-471A/E/H:22h     IC-1271A/E:     24h     IC-R71A/E/D:    1Ah
    IC-706:     48h

  Some radios apparently require a "UX-14" module for CI-V.

- The commands implemented may differ somewhat from one tranceiver to
  the next. Again, check with your tranceiver manual for details on the
  commands which it implements (NOTE: I found several mistakes in the
  IC-820H codes given in the manual).

  Each command is transmitted by preceeding it with 2 FEh characters,
  then the radio address (42h for IC-820H), then the controller address
  (E0h), and then the control codes. The sequence is terminated by FDh.

  When finished processing the command, the radio responds with 2 FEh
  characters, then the controller address (E0h), then the radio address
  (42h), followed by any of: FAh=Command not accepted (error), FBh=Command
  accepted, no data to send back or xxh ... data bytes. The result
  sequence also terminates with FDh.

  The IC820.C program included in this archive has a section of #define
  statements near the beginning that describe all of the control codes
  that the IC-820H recognizes. These should be similar for other radios.

  The control codes 00h and 01h are defined as the "tranceive" versions
  of the SET_FREQUENCY and SET_MODE commands. These operate the same as
  the standard commands, except that they do not generate ANY response
  at all. They are used by the "tranceive" feature by which one radio
  can mirror the frequency and mode of another connected radio, and are
  not normally used during computer controlled operation.

- The number of digits accepted and given for the frequency settings
  and band edges may differ from one tranceiver to the next. Your manual
  should have this information. Another way to determine the sizes of
  these strings would be to send the "read band edges" and "read frequency"
  commands to the radio and see what comes back.

  With the 820H (and I assume others), the frequency is transmitted in
  BCD, in reverse order (low digits first). If you do not transmit all
  digits, only the ones which you do send will change, allowing you to
  shorten the control sequence to set the frequency in cases where the
  higher digits will remain the same.

Files in this archive:

    README.TXT  - This file
    CIV.TXT     - Details of CI-V format and control codes *
    CIV.DWG     - CI-V to PC interface schematic (MICROCAD format)
    IC820.C     - Example computer control program - C source
    IC820.COM   - Example computer control program - executable
    VHF         - Sample VHF memory programming file
    UHF         - Sample UHF memory programming file
    UNGRAPH.COM - Program to remove PC characters from CIV.TXT *
    CATALOG     - DDS Product Catalog

* CIV.TXT contains IBM-PC graphic "box" characters. If you are unable
  to view or print this file, use the supplied UNGRAPH program to convert
  the graphic characters to '-' and '+'s. eg: UNGRAPH CIV.TXT UCIV.TXT

CI-V Interface parts list:

    Qty Description
    --- -----------
     1  MAX-232 5V RS-232 driver IC
     4  10uf 16v capacitor
     1  50uf 16v capacitor
     1  100 Ohm 1/4w resistor
     1  7805 5v regulator IC
     2  IN4004 diode
     1  DB-25 female connector
     1+ 1/8 Mini jacks (one per radio to be controlled).

Bypass capacitors should be placed across power rails or all IC's.

A complete schematic diagram for an RS-232 powered CI-V to PC interface
is contained in the file CIV.DWG. You may view/print it with my MICROCAD
drawing package:

    MICROCAD CIV /D     <- View on VGA monitor
    MCPRINT CIV LASER   <- Print on HP laserjet series (LPT1)
    MCPRINT CIV EPSON   <- Print on EPSON dot matrix (LPT1)

MICROCAD is available "free" from my WEB PAGE and DEMO disks, as part
of the EMBEDRAW package. For details on editing the drawing, or printing
it to devices attached to different ports, see the MICROCAD documentation.

The IC820.C example program:
----------------------------
This is a simple program that I wrote to check out the CI-V interface. It
provides command line control of the IC-820H radio, with commands that are
a close 1 to 1 relationship with the actual CI-V commands.

This program is written for and compiled with my MICRO-C/PC compiler, which
is available free of charge from my web page.

The following parameters are fixed in the source code, and can be easily
changed by editing and re-compiling):
    Baudrate:           1200    (ICOM standard for CI-V)
    Radio address:      42h     (ICOM standard for IC-820)
    Controller address: E0h     (ICOM standard for any controller)

The following command line options are available:
    /1-4        Select the COM port (1-4), if not specified, COM1 is used.
    /D          DEBUG mode - displays each byte sent/received
    /Q          QUIET mode - Inhibit title and command display
    /R          Shows ALL result codes for EVERY CI-V command *

* Normally, result codes are shown only for user supplied control codes
(See CODE command below), or in the event of an error.

After the command line options, you must specify a control command:

INFORMATION         - Shows information that can be read from the radio

PROGRAM filename    - Programs memory channels from a file
  Each line in the file represents one memory channel, which are set
  sequentially, beginning with channel 1. Each line must contain:
  frequency in the form: nnn.nnn, and the following control characters:
    '-' for Negative duplex \_ Neither = Simplex
    '+' for Positive duplex /
    'F' for FM
    'U' for USB
    'L' for LSB
    'C' for CW
    'N' for CW-Narrow
  Lines beginning with '*' or ';' are ignored (comments).
  Lines beginning with '$' will prompt with the remainder of the line
  and then continue (used for functions that must be manualy set).

CODE code ...       - Sends raw (hex) codes to the radio

FREQUENCY value     - Selects the indicated frequency
LSB                 - Selects LSB operating mode
USB                 - Selects USB operating mode
CW                  - Selects CW operating mode
NARROW              - Selects CW-NARROW operating mode
FM                  - Selects FM operating mode
VFO                 - Selects VFO operation (last VFO remains selected)
VFA                 - Selects VFO-A
VFB                 - Selects VFO-B
A=B                 - Copies active VFO into inactive
M/S                 - Swaps Main and Sub bands
MAIN                - Control MAIN band
SUB                 - Control SUB band
MEMORY              - Selects memory mode
MEMORY value        - Selects memory channel
MW                  - Write current settings to memory channel
M-VFO               - Copies memory channel to VFO
M-CL                - Clears a memory channel
OFFSET value        - Writes offset frequency
STOP                - Stop scanning
SCAN                - Start scanning
SIMPLEX             - Select SIMPLEX operation
-                   - Select duplex operation with - offset
+                   - Select duplex operation with + offset

All programs, documentation, source code and other information in this
archive is ?COPY.TXT 1996-2005 Dave Dunfield. All rights are reserved.
