Tuesday, December 25, 2012

Icom Receivers, Transceivers and the CI-V Interface

The next set of radios targeted for remote control is a couple ICOM units. I have an IC-706MKIIG multiband amateur rig, and an IC-R10 handheld general coverage receiver.
ICOM IC-706MkIIG transceiver, IC-R10 receiver, CT-17 CI-V interface

Compared to the TenTec radio, the ICOMs have a more sophisticated serial interface. ICOM designed a fairly compact, yet robust, protocol for serial communication. Control of ICOM radios is done via their "CI-V" interface, which has been around for over ten years, and is still supported in their newer radios.

The CI-V interface takes a three-wire RS-232C serial connection  (RX/TX/GND) and converts it to a two wire TTL level serial serial connection. The data protocol is variable sized "packets" that have byte constants marking the start (0xFE 0xFE) and end (0xFD) of the packets. The radios also have standardized response packets for indicating success, failure, and returning data for any packets sent to the units. Some CI-V interfaces, like the CT-17 shown in the picture, can control multiple radios via one serial port. Each radio has it's own identifier, which is included in the CI-V data packets. The CT-17 routes messages to the appropriate radio based on this identifer.

The Arduino drivers are written in C/C++ using Atmel AVRStudio,  extending the infrastructure established for the TenTx RX320 interface. This will allow common functions between radios to be accessed  in a uniform fashion, while having the ability to expose additional functionality provided by the ICOM units.

Where the TenTec radio had more "human readable" ascii commands, the CI-V interfaces deals with bytes. Therefore, a little more bit twiddling must be done when programming the Arduino. The C/C++ language makes this real easy, though it has been a while since I have programmed on this level. A constant challenge when writing these drivers, is that the Arduino UNO has limited firmware memory. So careful thought must be given when designing code to make it as small as possible, something I have not done since my DOS TSR (terminate and stay resident) application days years ago.

Commands for the ICOM radios implemented so far:
  • memory/vfo mode
  • set dial frequency
  • select vfo a or b
  • select memory x
  • select radio mode (AM, USB, LSB, RTTY, FM, WFM)
I will be posting more info about the Arduino command structure used to drive the radios as code becomes firmed up.

No comments:

Post a Comment