This Arduino library which I have created will allow you to control various functions of your radio via an Arduino micro-controller through the use of “Computer Aided Transceiver” (CAT) functions. Although the CAT command byte definitions are aimed at a Yaesu FT-857D, many of the functions should work along the FT-8*7 platform with little or no need for modification.
The library (and previous versions) can be found here:
- Current FT857D Library (rev 0.1) (7.6kb – ZIP) {arduino-1.0.1} 2012.08.17
Quick links:
Requirements:
- Arduino 1.0.1 (or more recent IDE)
- FT857D library installed
- SoftwareSerial library (comes with the IDE)
- CAT control interface from radio
- GND -> Arduino GND
- TX -> Arduino pin 3 (can be changed in library)
- RX -> Arduino pin 2 (can be changed in library)
The library makes use of SoftwareSerial to provide a non-physical serial port to issue the CAT commands, freeing up your hardware serial port for other tasks. To change the software serial pins, you would need to modify the FT857D.cpp file at the section:
extern SoftwareSerial rigCat(2,3); // rx,tx
I was able to define the pins in the Arduino sketch (outside the library portion), however, I found that the processing time required increased substantially, so I left the definition buried (for now) in the library file.
Using the Library:
#include <SoftwareSerial.h> // required by the library #include “FT857D.h” // the actual library FT857D radio; // define “radio” so that we may pass CAT commands void setup() { radio.begin(9600); // as with Serial.begin(9600); we wish to start the software serial port } void loop() { radio.setMode(“pkt”); // set mode to PKT (note these mode names are NOT case sensitive!) }Command Set:
To use the library functions, call them using the identifier you have chosen (ie. “radio” as the above example suggests). A list of the functions is as follows:
- lock on / off = radio.lock(true / false);
- PTT on / off = radio.PTT(true / false);
- Set frequency = radio.setFreq( desired frequency – no decimals );
- Set operating mode = radio.setMode( mode name – eg. usb );
- Clarifier on / off = radio.clar( true / false );
- Clarifier frequency = radio.clarFreq( desired frequency – again, no decimals );
- VFO A / B swapping = radio.switchVFO();
- Split operation on / off = radio.split( true / false );
- Repeater offset direction (+, -, simplex) = radio.rptrOffset( +, -, or s );
- Repeater offset frequency = radio.rptrOffsetFreq( offset frequench in kHz );
- CTCSS / DCS on / off = radio.squelch( DCS or TEN );
- CTCSS tone / DCS code = radio.squelchFreq( frequency, T or D );
- Read TX status = radio.chkTX(); – returns true / false
- Read RX frequency & mode = radio.getFreqMode();
Modifications:
If you wish to adapt the current library to another radio model, you may do so by editing the FT857D.h file to change the command words issued by the library. The commands are listed as #define statements and have the values indicated in the FT857-D operator’s manual in the CAT section (PDF page 66).
As an example, you will see definitions such as:
#define CAT_LOCK_ON 0x00 #define CAT_LOCK_OFF 0x80
As an example, the command words ( 0x00 and 0x80 ) can be modified to match your requirements.
If you do modify the library, or adapt portions of it to your own code, please give a small *nod* and put a little note in your code documentation to recognize the effort I have put into this project. Thanks!
Installation:
To install this library, simply extract the archived file inside the libraries directory found in the root Arduino IDE directory (ie: C:Program Files (x86)arduino-1.0.1libraries)
This process will unpack a new directory named FT857D which will have the following structure:
If you prefer a more fire-and-forget installation method, you can use the executable version of the library, assuming that you have installed your Arduino IDE as:
C:Program Files (x86)arduino-1.0.1
If you are using Windows 7 and the executable library “installer / zip file”, you may receive a warning (User Account Control) when you execute the file. This is completely normal. Upon finishing, you will likely receive an additional warning stating
Example:
To test your physical connection to the radio, and to ensure you are able to #include the library, I would suggest you try the example sketch that is included in the library. To load the example file, simply select:
File -> Examples -> FT857D -> FT857D_controls_test
Hi James!
The link to the library is dead. Please restore it.
Fixed! Thanks for the notification on this.
Ayuda, display no funciona con esta librería, si funciona con librería hola mundo i2c
Hello
I updated the library for new commands and fixed some bugs. I also ported the library on ESP32.
See my web site https://f6czv.fr.
All the softwares are on Github.
73
Philippe F6CZV
Very nicely adapted & good work fixing the bugs. I should give your modifications a whirl now that I’ve got some ESP32s on my work bench!
Hi Hello,
I am looking to use this nice library to control 2x FT817 for portable station on QO-100 satellite, so have the uplink transceiver (transmitting on 70cm) synchronized – with some fixed offset – with the downlink transceiver (receiving on 2m) . In the library you can define one RX/TX CAT com pair, but here would need 2 pairs. Any suggestion how to tackle this ? Make 2 different libraries ?? Thanks in advance vy 73
Hello Jean
Did you try to use the SPLIT mode ? Or may-be you need to have a full duplex transmission ?
At the source code init there is an instanciation of the library
FT857D radio; // define “radio” so that we may pass CAT commands
May-be you could do :
FT857D radio1;
FT857D radio2;
The initialization procedure (radio. begin) should be modified to give the serial pins as parameters as it is now hardcoded.
73
Philippe F6CZV
Hi!!! I want to connect a ft450 to an arduino…I readed your instructions, but still dont know how to modify the lib to yaesu ft450.. Could you help me a little bit? 73!
Rafael – PU2RFS
External touch screen for Yaesu FT8x7D v 1.0
José Carmona Saleta – EA3DMM
The project consists of extracting the FT8x7D data through the CAT port and thus being able to operate the station, in the most basic actions, without the need to extract the front panel (FT857D).
The screen is a 2.4 ”Nextion with a resolution of 320×240 pixels. To control the screen I used the official library version 0.9.0, improved.
To handle the data received and sent from both the screen and the station, I use an Arduino MEGA 2560 microcontroller and use the TTL communication library via CAT from colleague James Buck (VE3BUX). Although this library is not complete, nor assisted, for the purpose of this project it is sufficient.
For next versions I have already planned other necessary sources.
BREAKDOWN
HOME screen
Main screen
As you can see on this screen, almost all the “options” of the project are presented. We can observe the main and secondary FREQUENCY, VFO A and B, MODE, TX or RX, analog SMETER, S-meter button, Rptr and Split buttons (not operational in this version), Clar, A / B, Lock, Mode and PTT .
SMETER (digital) (TX) PWR, ALC, MOD, SWR, VLT. (RX) SIG, CTR, VLT, FS
S-meter: Activates the analog Smeter. Same parameters as digital.
CLAR: Independent for VFO A and B.
PTT: With interlocking.
Mode: Select the MODE USB, LSB, AM, FM, CW, CWR, DIGI, PKT
MODE screen
S-meter screen
Customizable with the INDICATIVE. (Green area).
Enter FREQUENCY screen
To activate this screen, click on the main frequency. The digits are entered consecutively, in case of error press DELETE and the last digit entered will be deleted. It is limited to a maximum of 8 digits. It is advisable to enter frequencies with two decimals.
If the frequency entered is not accepted by the system, the last one entered will remain.
Once the frequency is selected press ENTER and it will be updated on the main screen. Depending on the frequency entered automatically, the send / receive MODE will change.
can you please bring the code of what you did? thanks LW!ENG 73
Is it practical/doable to add a rotary encoder to the Arduino for frequency changing.
I was thinking of adding an encoder with the push switch action to select between fast and slow, up/down tuning.
Would this be supported via CAT.
Btw. I have no clue about coding for arduino so any pointers would be appreciated.
Peter (G1FXE)
Peter (G1FXE)
Such support can be implemented in a sketch.
Victor could you add the link for the updated library for arduino R3 software IDE 1.8.13
Thanks
Billy GM6DX
Hello everyone. Someone has been able to decipher the S signals in RX and the PWr in TX.
Greetings.
73, José EA3DMM
If still relevant, you can try.
Victor. UA6EM
James
Have you or anyone done a similar code build for the FT-100d ?
No one modified the library for the YAESU FTDX101? Would be frustrating to modify the library and read after doing this, that someone did this already…
The library works well, particularly after the mini din wiring is right. HI.
But one problem is driving me nuts…
I am frustrated with getting a VFO A = VFO B capability.
It certainly sounds simple (get VFO A freq, switch to VFO B, set VFO B freq, then switch to VFO A) but I can’t do it.
Has anyone done this (Arduino sketch with VFO A = VFO B capability)?
A copy of your code snippet would be greatly appreciated.
Thanks!
John
Annapolis, Maryland
Hello can you help me I have a compilation problem I use an arduino R3 and I have an error message exit 1 error compilation arduino / genuino uno
Thank you
I have not updated the library for the new Arduino platform – if you are able to try a down-graded version of the software (ie. version 1) then you may have luck.
Not having read most of the comments I too can not get the sketch to run with my Arduino UNO R3 does anyone have a easy work around for updating the sketch to something I can use?
I’m 76 and not to savvy (first Arduino) with sketches does someone have a running sketch for the “new” Arduino?
I have this library adapted by version IDE 1.8.x. Is this still relevant for you?
I would appreciate a version that would compile for Uno R3 on 1.8x
Thank you,
Sal
James, I wrote some additional code for library :
// set the clarifier frequency
void FT857D::clarFreq(long freq) {
byte clarOfst[5] = {0x00,0x00,0x00,0x00,0x00};
if (freq >= 0 ) clarOfst[0] = 0x00;//offset > 0
if (freq < 0 ) clarOfst[0] = 0x01; // offset < 0
clarOfst[1] = 0x00;//default
clarOfst[4] = CAT_CLAR_SET;//command byte
unsigned char tempWord[2];
converted = to_bcd_be(tempWord, abs(freq), 4);
for (byte i=0; i<2; i++){
clarOfst[i+2] = converted[i];
}
sendCmd(clarOfst,5);
getByte();
}
73! Vlad.
James, thank you for very nice library!
Easy to integrate to my SDR-IF for FT-897 arduino project.
My 73!
Dear Vlad,
In Steve Buck, VE3BUX’s blog, I came across your comments recently.
Would you mind sharing your FT897D project please.
I am very interested, if you do not mind.
I used the FT857.h file to adapt it for the FT897D, which in principle have the same CAT commands, but have not tried it out yet.
I am a very beginning Arduino fan and start trying Arduino C programming.
Thanks.
Best 73’s de Eb, ZL4RM/PA0JAG
Awesome!!!
This is going to be very usefull!!!
Thanks
Georg
ZS1GFL
I’m kind of doing the opposite end. I’m wanting to use an Arduino to receive CAT commands and control a DDS VFO, which in turn tunes my direct conversion receiver to a certain frequency. Then I can use a lot of the software that’s out there to control my transceiver.
So I’m searching how to read and interpret the commands. This sounds like a start. That and using some of the CAT control software out there and sniff the serial port to see what it’s sending.
Thanks
73, KM4OLT
Michael
Hi OM, you can find what you are asking here: https://github.com/pavelmc/ft857d just the opposite to this.
It will make possible to command any Arduino powered radio like if it’s a FT-857D
Cheers, Pavel, CO7WT
Hi Rick,
Thanks so much for making available your library for FT857 though I’m using it to control an external linear amplifier for a FT817, mainly for frequency reading and low pass filter selection.
Of course that I have included you in the credit of my sketch to recognise your really hard work.
I really do appreciate your effort and please let me thank you again for your contribution.
Best 73 from Spain,
EA4DUT
Hi,
just one question about the part of code:
while (rigCat.available() < 5 && elapsed < 2000) {
elapsed = millis() – timeout;
;}
Does the 5 digit (1st line) represent the 5 ms of minimum delay before the arduino starts to receive the data?
Regards,
Jakub
Hi,
anyone extended the library with the Read Tx Status and Read Rx Status using the
CAT_RX_DATA_CMD and CAT_TX_DATA_CMD ? I’m talking about reading the S-Meter data (RX) and PO meter data/SWR/PTT status (TX) ?
Regards,
Jakub/SP5TOF
Hello,
because i am not so deep in ARDUINO programming, maybe somebody would be so kind, sending a piece of software code for also reading S-Meter values.
Klaus
Hi James,
first of all congratulations for a very useful program.
I have a problem that I can’t connect to the FT-847 and read the frequency. For my project (automatic control remote antenna switch) I would only need information on which frequency is currently FT-847. I have read that it can be a problem in communication on COMM settings – 8N2. What do I need to change to be able to successfully read the current frequency on the TF-847?
Greetings from Slovenia
Miro – S51SK
If I remember correct, 8N2 is not possible using the software serial library which my FT857D library calls. You could modify the code and use the hardware serial port and (possibly) set it to 8N2.
Hi James,
Just one question: will be possible to read out the current freq of 757gx2 ?
I have broken vfd and looking for workaround using arduino.
Thanks,
Jakub
SP5TOF
Hi Jakub,
The FT-8×7 library should give you a great starting point from which to work. If the commands are not precisely the same, you can modify the code to work with your radio. I suspect that Yaseu has kept roughly the same schemata for its CAT protocol.
Hi James
TNX for supporting us by the ARDUINO lib. Great work. I tried to run it with a FT817 and a Arduino MEGA 2560 clone.
Unfortunately I can only send to the rig and change Modes etc., but can’t receive anything like getMode() or getFreqMode(). I checked the IOs by a scope and noticed signals on the RXD wire activity, but there is no difference if I use RXD or not, only TXD seems to work. Tried different Baudrates as well.
The result of getFreqMode() is 166666665, but as I learned that is only a symptom for bad communication from the rig.
Also tried to use a 74LS04 as a signal sharpener, but it was no cure.
Is the timing of the MEGA board different from the original target board?
Any idea?
TNX for a hint and 73, Mario, DJ7UA
Problem solved. I use the onboard UARTs of the MEGA 2560 now and it works.
73, Mario
I had the same issue with a Mega. After some digging I found that pins 2 or 3 can’t be used for rx on the mega with SoftwareSerial. I changed the SoftwareSerial pins to 52,53 and it works.
See https://www.arduino.cc/en/Reference/SoftwareSerial for pins that can be used for rx.
Hope this helps someone else.
George, W5JDX
Nice library, thank you. I am not into Arduino yet, but what do you use as input device and what do you use for display. My IC-706 display is almost completely washed out or faded out, so my interest in displaying what is on the screen (after adapting the library to ICOM commands).
Hi James
Well, I am progressing with the modification to the library to use it with the FT-100, and all commands now work ok. It was a bigger task than I thought, since the FT-100 is quite different in the way it sends commands.
I have even tested a basic version of an APRS tracker, that first makes sure the rig is on the right frequency etc, before it sends a beacon. But…
I am having a real problem working out how to convert the 16 byte HEX “status” word that the FT-100 uses to send info on band, mode, frequency etc.
If you could give any advice on this I would be most appreciative.
I can send a copy of the CAT notes if you want?
Cheers
John VK5OI
Forget last post, I finally worked it out
John,
Can you make your FT-100 library available please?
Best 73
Jeff – W5JGW
Hello,
Thank you for the project. I did small similar one in reverse, that is, controlling an Arduino VFO (simulating an Yaesu) from the PC. The comments on your file FT857D.h helped me to understand better the commands.
73
Hello James,
very good work.
I have a transceiver YAESU FT857 and i would connect it to an esternal antenna tuner FC800.
The communication protocol between the 2 equipmets is compatible?
Can I build a connection interface with your arduino CAT?
73 de IZ1QXJ
Antonio
Hi Antonio,
no the protocol does not seem to be the same. I am working on a Arduino program to control the FC-800 though and I have a first prototype working. Next thing is to readout the radios freq to tune the fc800 on the right tuner memory.
Hello Daniel,
is your programm already workin wit the FC-800 for you ??
OK, Figured out how to return the S meter value, its just 4 bits so not very accurate anyway. Needed to modify the control panel and definitions libraries.
Any chance you can fire off an email with the modifications which were necessary?
email address is james at my callsign .com
James,
Have done with a bit of info on the returned integer
Superb work. I’ve got it working so it will print the RX frequency and mode to the monitor com port.
What I’d like to do is get the raw signal strength value from the FT857D so I could then create a peak hold function and then use the Arduino to drive a large LED alphanumeric display with a calculated S value.
Does the getMode() function allow you to poll the radio for the status of the S meter value? I only seem to be able to get the value for the operating mode.
Hi James,
Wow, what a very nice job you did in making a lib for the FT857D
Myself are making a Remote Control Box for the FT950 and 3 years ago I started in programming with PIC-basic, but my other hobby’s took to much time, and now I found my way to Arduino, and put a Arduino-Mega in my controlbox so I will have enough pins and UARTs. I like to control the power, the noisereduction etc, and freqency-input wit a 4×4 keyboard. So I started learning C++, but Im a retired radio-radar engineer, so I know a lot of hardware about radios, but programming is a crime for me 😉 But your programming ideas will help me for sure. The FT950 has a RS232 comport and I hope I can make a short programm this week that will change the poweradjustment of the FT950.
Thanks for sharing James, and I will let you know if I can control my FT950
73’s PA2JJB Jan Texel-Island EU038
Does any way to control FC-40 auto antenna tuner?
Hello everyone, I am newbie with Arduino and I have a question?
Why the command “radio.getFreqMode ()” always returns me the number 166 666 665 even when the radio (FT857d) is not connected?
Thanks in advance for the answer …
Vy 73 de Luigi IZ7PDX
the routinewill return that number when there is no serial communication to the radio (not looked at why that exact number) so I suggest your radio is not connected. Try switching the serial tx and rx wires round, (2 and 3) worked for me
Excellent work James.
One thing has been overlooked, at least in the released example. The FT8x7 CAT protocol calls for “8N2” serial communication. From the FT857 user’s manual:
“Each byte consists of 1 start bit, 8 data bits, no parity bit, and two stop bits.”
CAT port in your examples is initialised at the 8N1 default. Strangely enough, the RTX is accepting commands both in 8N1 and 8N2 formats, but formally all the code should stick to the official documentation.
My 2c,
Paolo IK1ZYW
Thanks for catching this!
I’ll see if I can find a way to easily implement the 8N2 into the library, avoiding having users modify their software serial libraries.
I am trying to get my FT-847 connected but as it seems it won’t accept the 8N1 format. I can’t get any connection to the rig. (yes the CAT is on 9600Bd ^^)
Is there any progress in getting the SW to the 8N2 format?
I guess that will open possibilities to other Yaesu rigs.
73, Wilko PA3BWK
Update, I have the sketch working now, the 8n2 format seems not important. Is there anyone who can tell me how I display the mode of the TRX on an LCD?
I get only the number of the mode displayed but not the actual mode in text format (as USB, FM etc.)
73, Wilko
What you could do to display the mode as characters is make use of the switch function or you can simply use a bunch of if statements.
An example of how you might do it using if statements is as follows:
if (modeInput == 0) modeText = “LSB”; // LSB
if (modeInput == 1) modeText = “USB”; // USB
Hi James
I was hoping to have some working code long ago for the FT100 as discussed above back on June 14…but I can not get it working with the FT100 at all.
I have even abandoned all of my APRS/CAT code and simply tried to get a basic modification of your test program working, but with no joy.
I have tried to monitor the serial comms and I notice from the Arduino (tried a couple, even a breadboard version) I don’t get the bytes displaying correctly in the monitor. they are just small squares. Obviously I have tried afew baud rates and cables etc, but always the same result.
I reconnected the radio to HRD to check the comm port is not damaged, but that works fine.
I’m lost, and a bit frustrated at a lot of lost time.
I’ll stick with it, and hope to get some code back here for you soon.
Cheers John
VK5OI
Hi, James
I working on modify your code for the FT747 (I need it for mount a remote station)
Can I send you the modified code for your blog or upload it to my page?
Regards
Rick LU9DA
Hi Rick,
By all means I would love to have a copy of the modified code. I would like to modify the existing library to include other Yaesu models and this would allow me to do so.
If you want to email me .. my address is james @ ve3bux (same as this blog address).
Cheers!
Hi again, James.
Work in progress for porting the code to FT-747.
I can command the radio, next step are read the status from the rig.
Little trouble with the SoftSerial library, the standard library works only 8n1, and the rig requires 8n2. I do a little mod to SoftSerial and now I have a new library SoftSerial8n2 working fine
Regards
Rick LU9DA
Hi Rick
Thanks for the info above, I have been trying to modify James’ excellent work to suit the FT-100 but was having no luck. Then I read that you adapted your library to 8n2 and I realised I have the same problem…..
Can you please let me know if it is difficult to modify the softwareserial library to 8n2? my code writing is poor at best. Any hints would be very much appreciated.
Cheers, and thanks for the “heads up”
John VK5OI
Rick: Good catch on that!
I glazed over on the 8N2 from the manual. I find it interesting that the library works considering the missing second stop bit.
Aggravating that the protocol calls for 8N2 … I can honestly say that I do not recall the last time I had to use anything other than 8N1
John: How is the project coming along? Also, would you say that the modifications to the software serial are something that a “basic” Arduino user could do on their own with a bit of a helping hand (ie. tutorial)? for 8N2 … I can honestly say that I do not recall the last time I had to use anything other than 8N1
Hi James, Rick
I thought I was going well, then had comms problems, that Rick seems to have identified for me. I had just about given up until I read that post about 8n2.
I agree, I haven’t used anything but 8n1 for as long as I can remember. However, my FT-100 does not want to play nice at 8n1.
I am not a C (or Arduino) programmer’s little toe (cleaned up) and I rely on clever people like you to point me in the right direction. I do think I could adapt the library to 8n2 if I knew where to start, so I do think a tutorial would be great.
I will post my code here (Ft-100 control, with APRS beacon) when done, since it is 99% your work.
Cheers Gentlemen, good DX
John VK5OI
James,
Quick question I have been playing with your code which is great.
I’m trying to read the s meter data but can not figure out how
could you tell me how I could do this.
Thanks,
Troy
Hi James
great work thanks.
I am nearly finished modifying the library to suit the FT100.
My plan is to combine this code with an Arduino APRS tracker I built some time ago.
Then the Arduino could automatically check if the radio is on the correct frequency and mode etc before a beacon is sent.
This would allow me to use the radio for other QSO’s etc on HF or wherever, but still use it as a tracker.
Maybe some interlocks to check if PTT is active or a beacon on/off selection before the frequency is changed to the APRS freq for the beacon, then back to the previous settings (maybe using VFO A/B).
Anyway, lots of useful ideas, thanks to your work.
I have left all reference to you in the library, and I will send the finished code (tracker and CAT combined) if you wish.
Cheers
John VK5OI
Hi John,
I am glad that the library could be of good use to you & that modifications were possible to add the FT100 to the command-base. I’d love a copy of the completed code – I’m thinking about re-working the library to allow native control of more Yaesu models … I just lack the capability of testing the additions.
Much appreciated with leaving the library references – seems like such a rare thing these days.
Good luck with the projects and I look forward to having a peek at your work!
James
Nope my mistake
it compiles ok
I am sorry for the inconvenience
73 Manos SV1IW
Hi James
I am a new comer to the arduino world and have been trying to use your FT857 library for my radio (have also an FT0817). Unfortunately the example sketch FT857D_controls_test is verifying with errors. I wonder if there is something missing in the example. These are the errors I see:
FT857D_controls_test:25: error: expected constructor, destructor, or type conversion before ‘<' token
FT857D_controls_test.ino: In function 'void setup()':
FT857D_controls_test:41: error: 'radio' was not declared in this scope
FT857D_controls_test.ino: In function 'void loop()':
FT857D_controls_test:48: error: 'radio' was not declared in this scope
Perhaps you can advise
Thank you in advance
Manos SV1IW
Hello,
First, my big congratulations for your excellent work.
I realize a CAT for my 817. Details on my website …
I found a crash of my 817 when on MNF
I think there must be a problem of control between 817 and 857.
But I would like to have more information on getMode () command.
Could you commanter me the format of data Receipts
I would get the status of PTT VFO mode (AM / PKT / USB …), the repeater, the S-meter, etc …
I would not fail to mention your excellent work, thank you again
You can find my code on my site as it will be more operational part
http://f4cvm.free.fr
Regards
Pascal
In you command set only the last two allow one to read a status, The other commands only change status without revealing what that status is. Does the library allow one to read all the other status’s?
Hi John,
Have a look at page 118 of the FT-857D PDF file (page 116) of the print version. Using the getMode() and getFreqMode() functions allows you to poll the radio for the status of all of the listed information (notes 3 &4).
The library was written to allow end-user parsing of the incoming data, though I may very well create a few “purpose built” functions to simplify the life of inexperienced developers.
I have no immediate plans to revisit the library, however, I do plan to maintain it at some point. I’ll be sure to update all of my repositories when the time comes.
Hallo James,
I have a question, can I this library use for FT817?
73! Franta
Hi Franta,
Yes the library can be used with the FT-817 as it shares most of the “command words” with the FT-857D.
It _might_ be necessary to modify a few of the command words in the library file, though I doubt it.
I do not have an FT-817 to test with so I can not promise that it will work, however, the protocol indicates that it will.
James
Thank you Franta
James,
I am not sure that you understood my question right.
The Yaesu protocol will do fine because there is no actual rig of some brand just a digital VFO like this for example :
http://www.theladderline.com/dds-60
What is needed is to control this kind of VFO from some logging/contest/digi-mode program with CAT . There is lots of similar DDS-VFO’s in Net but they all lack CAT control from some PC program.
Jouko 5rm
The idea James is proposing totally rocks! I’m building a BitX for 20 meters and will be using an AD9850 module I picked up on eBay. I’ve already got the Arduino doing some basic control of the DDS and will be making it much like the project James mentions with that DDS-60 VFO. But the icing on the cake would be giving my homebrew rig the ability to be controlled by CAT so that “off the shelf” programs could control the radio. It would be a way to give homebrew rigs another perk usually found only in commercial rigs.
Hi James,
A fellow ham just asked help in situation where he would replace the analog VFO of an old rig with Arduino/DDS VFO(cheap ebay board with AD9850). CAT control from some logging/contest SW is needed. Do you think your library could be used with limited command set for this purpose? There is already SW to control the DDS frequency with Arduino. Could the USB port be used for CAT?
Hi Jouko,
The library which I have written would be capable of controlling many of the radio functions in software – a full list can be found in the “command set” list above. I would investigate the CAT command structure for the radio however as there are subtle differences between some of the Yaesu models. At worst, the command words in the library can be modified to suit your needs.
If I understand your question correctly, what you are proposing requires the USB port to act as a host as opposed to a device. There are some Arduino platforms (Leonardo as an example) which can achieve this. The other solution might be to write software that passes serial commands from the USB com-port to the radio, acting as a smart USB-to-serial adapter which happens to also issue its own CAT commands as required.
Hope that sets you off on the right track!
James
Hi John,
As with all coding, if you want to have a repetitive task performed, you will need to write your code in such a way as to force a loop of execution. You could achieve this by simply having something to the effect of:
main() {
dosomething; // (ie. ReadRX();)
delay 100; // don’t make the delay too long if using interrupts
}
And then have an interrupt routine handle any user input. This way, the micro-controller will be constantly poll the radio for its frequency, allowing for user input in the meantime.
It appears to my uneducated eye that you are using pins 2/3 for IO to the rig via the CAT port. Are not these Arduino pins the same as the serial connection to the PC? I am missing something since I do not think this works?
John,
The serial I/O pins which correspond to the on-board USB-to-serial converter are pins 0 and 1 for RX / TX respectively. I make use of pins 2 and 3 using a software serial library to allow for the possibility to power the arduino (and to interface with it) via the USB connection.
Thank you
Do I need to issue the command “ReadRX freq…” to get a single read of the freq?
In other words is there a way to get a continous read of the freq?
Hi James,
Congratulations for this great job!
I was trying to write a seach software to control my semi-automatic homemade antenna tuner connected to my FT857.
I prefered to built it by myself rather to buy a commercial one.
For the SW, I’m not really a specialist, so, you have been quicker than me ;). Cool! Now, I can focus on the antenna tuner itself!
Thanks again.
Dominique – F4FEI
Good job – and I haven’t even tried to use your library yet – just the fact that you had a go at setting this up. I recently bought an FT-857, and being a bit of an Arduino fan, one of my first questions was ‘Could I control this using the Arduino’ .. and so I then stumbled upon your site.
I’ll get around to giving it a go soon … but in the meantime, thanks 🙂
Rob (KB1VIN)
Hi Rob,
Glad you found this site since you have similar interests!
I really like the simplicity and user-friendliness of the Arduino platform. It is a fantastic jumping-off point for hobbyists for sure.
Let me know if / when you get your radio and Arduino talking!
James