Arduino Sketch

Rev C V2.3 - applicable to Rev C boards has active temperature compensation (ATC) to the frequency stays within 1 or 2 Hz from 15°C to 45°C. You can turn it on or off. This code will run on Rev D boards but the ATC should be turned off because Rev D boards have a TXCO. This sketch uses the old SI-5351 library.

Rev D V3.0 - applicable to Rev D boards bit will run on Rev C boards with no ATC. This version has been updated to use the latest SI5351 library which allows the external oscillator to be tuned anywhere from 4 kHz to 225 MHz. The low frequency response of the coupling transformer may determine the lower limit. Also corrected the serial output for the Hardrock-50 power amp that was causing issues on start-up and reset.

Rev D V3.1 - Changes the PLL frequency to reduce spurs, cleans up some of the definitions. Supports the IQ Keyer

Rev D V3.2 - Adds support for the PI SDR IQ+ but does not support the IQ Keyer. It also has support for the 0-10-20-30dB RF attenuator which are in prototype status but so far there hasn't been much interest.

Rev D V4.0 - Extends the range for the frequency calibration offset to +/-10 kHz @ 10 MHz; Send the Hardrock-50 a ";" to clear the serial buffer in case it picked up some superfluous characters during TX.

Step-By-Step for updating the firmware in the RS-HFIQ:

First follow the instructions here: https://www.arduino.cc/en/Guide/windows to install the Arduino IDE. If you use the default directory structure things will be greatly simplified. The RS-HFIQ uses an Arduino Nano which is built in so there's no board specific' install needed.

Reboot your PC.

Before you start the Arduino IDE download "RS-HFIQ Arduino Files.zip" and "RS-HFIQ_Rev_D_3-2.zip" from the bottom of this page.

Open "Documents\Arduino\libraries" folder on your PC and open "RS-HFIQ Arduino Files.zip" then drag and drop the "SendOnlySoftwareSerial" and "Si5351Arduino-master" folders into the "Documents\Arduino\libraries" folder. Close the open folders.

Open the "Documents\Arduino" folder on your PC and open "RS-HFIQ_Rev_D_3-2.zip" then drag and drop the "RS-HFIQ_Rev_D_3-2" folder into the "Documents\Arduino" folder. Then in the "Documents\Arduino" folder. double click on the "RS-HFIQ_Rev_D_3-2" folder to open it and double click on the "RS-HFIQ_Rev_D_3-2.ino" file which will open the Arduino IDE with the RS-HFIQ sketch ready to go.

In the Arduino IDE click on "Tools" then "Board" and select the Arduino Nano. Make sure that the RS-HFIQ's USB is connected to the PC.

Select "Tools" then "Port" and select the port that the RS-HFIQ is on.

Select "Tools" then "Processor" and select "ATmega328P (Old Bootloader)".

Then select "Sketch" then "Upload" and the IDE will compile the Sketch and send it to the RS-HFIQ.

You should be good to go after that.

Included in the zip file are 2 libraries that are not normally included with the Arduino IDE but are needed to compile the RS-HFIQ sketch:

1. Si5351Arduine-master - copy this folder to the \Ardiono\libraries folder before starting the Arduino IDE. This library controls the SI5351 chip on the RS-HFIQ.

2. SendOnlySoftwareSerial - copy this folder to the \Ardiono\libraries folder before starting the Arduino IDE. This library is very similar to the SoftwareSerial library but can only send data and only requires allocation of a single pin. We use this to send band data to the Hardrock-50 power amplifier or other peripheral.

The baud rates for communication with the USB port and the Hardrock-50 are set in the following lines:

Serial.begin(57600); // Communicate via USB serial port at 57600 Baud HR50.begin(19200); // Communicate with the HR50 at 19200 Baud

We've moved the frequency offset so you don't have to recompile the code to adjust the frequency. The 'D' command sets the offset and stores it in EEPROM so it is persistent across power cycles and new firmware loads. You can set it using Termite or the now control panel if you have Omni-Rig installed.

If you would like to download the files DO NOT CLICK ON THE FILE NAME!!!! click on the blue arrow to the right!