One of the pleasures of a homebrew rig is that if it doesn't have a feature that you want, you can always add it. So this past weekend I added functionality to the F40 to make it work with Ham Radio Deluxe and other PC programs. With a properly configured rig, Ham Radio Deluxe makes working DX much easier. It has an integrated DX spot function that lets you see the DX spots on your bands of interest. If you see a station you would like to work you simply click on the entry and radio tunes to that frequency. To log a new QSO, its just a couple of clicks and HRD picks up the frequency and mode directly from the rig. But to do this you need to have a rig that supports some version of the Computer Aided Transceiver (CAT) protocol. Happily, virtually every modern (and most not-so-modern) commercial rig has CAT capability that let you control most or all of the rigs settings from a PC program like HRD or WSJTX. But how do you implement CAT control in your homebrew rig?
Enter Pavel Milanes (CO7WT). Building on earlier work by James Buck (VE3BUX), FT857D arduino Lib, Pavel created the FT857d- CAT Control for Arduino Library (FT857d)
- catGoToggleVFOs() is called when the PC program directs changing VFOS, This is where we put the code to switch between VFO A and B
- catSetFreq(long f) is called to change the active VFO frequency to whatever the PC program wants
- catGetFreq() – returns the current active VFO frequency to the PC program so it can display the frequency that the rig is tuned to.
- And so on.
Taking two examples… here is my code for catGetFreq()
long catGetFreq() {
// this must return the freq as an unsigned long in Hz, you must prepare it before
long freq;
if (active_vfo == VFOA) {
freq = vfoAfreq-bfo;
} else {
freq = vfoBfreq-bfo;
}
// pass it away
return freq;
}
This function is invoked when the PC software wants to know what the current active frequency is – usually to display it in the UI or to use it for logging.
It references the control variable from my main sketch.
- active_vfo – is either VFOA or VFOB (#defines in my main sketch)
- vfoAFreq and vfoBfereq are variables that contain the current value of the two VFO settings – with the bfo offset already applied
- bfo – is the bfo offset frequency
So all the code does is recover the operating frequency from
whichever is the active VFO and return that the cat library. Pavel’s
library will send it back to the PC program for display or logging or whatever.
And here is my code for catSetFreq()
void catSetFreq(long f) {
//
// Change the frequency of the current active VFO
// Clock frequency is the operatingfrequecy plus the BFO
//
if (active_vfo == VFOA) {
vfoAfreq=f+bfo; setVFO(VFOA, vfoAfreq); } else { vfoBfreq=f+bfo; setVFO(VFOB, vfoBfreq); }
}
The CAT library calls this routine when the PC software has issued a command to tune to a new frequency. All I do here is add the BFO offset to the requested operating frequency and call the setVFO() function in the main sketch which updates the SI5351 clocks and the F40 display.
So far I have it tested it with Ham Radio Deluxe, WSJTX and FLDIGI, and FLRIG and the get and set frequency routines work fine. Next step will be to implement software PTT.
Thanks to James and Pavel for their contribution to the F40. This mod opens up a whole new world of possibilities. Check this space for progress reports.
I am happy to provide the sketch to anyone interested, but I would like to keep track of who is using it. Just send an email to KK4DAS@gmail.com.
73 from Great Falls,
Dean
KK4DAS
Hi Dean,
ReplyDeleteWe share common interests, I follow Solder Smoke and N6QW’s work. I am starting on Pete’s RADIG and you work to get CAT working with the Si5351 may simplify the build. Do you have a code repository for your CAT code? - 73 Dan WA6PZB
Hi Dan,
ReplyDeleteThanks for the note. If you send me a note on my email - kk4das@gmail.com I'll send you the code for the sketch. Pete's been after me to build the RADIG but I am still having fun with the Simple!
73 - Dean
Will do thanks!!! 73 Dan WA6PZB
DeleteTitanium Stinger Sledgehammer - Titanium Triatom Trimmer
ReplyDeleteThis steel titanium easy flux 125 amp welder razor is aftershokz trekz titanium the world's leading in quality stainless steel blades and the world's second only titanium wedding band Titanium Trimmer. The titanium nipple bars Titanium Trimmer is ford escape titanium 2021 a