Rear view of DUO transceiver
Right: CAT USB B interface
So I have switched to an Arduino MEGA, a different beast altogether. The MEGA is longer than the UNO, but has the same basic pinout plus it adds a lot more analog and digital pins, a separate I2C bus and most importantly it has 3 extra serial ports. So the SoftwareSerial library is not needed to talk to the DUO USB.
All that is needed is to start one of the extra serial ports (serial 2, which uses pins 16/TX2 & 17/RX2), is
Serial2.begin(38400);
Which enables the connected USB A host module for a connection to the DUO USB B slave input/output.
BUILD
This is the system
Top, the USB power/programming from my Macbook
on the Left: TR switch
Right: tuning, step and mode
Bottom: display and USB host master to radio CAT USB
CODE
Latest code for this CAT_MEGA app is here.
NEXT
I have so far got:
1. Send frequency tuning
2. Send TX/RX command
3. Send mode LSB-USB-CW-FM-AM
4. Change local frequency tuning step (100Hz, 1kHz, 10kHz but could be increased)
I have not managed yet to get data back from the SDR, that is to read values back to the MEGA. Read/Answer does work, but there seems to be timing errors, and to poll the SDR over and over means a huge amount of CAT activity, and maybe either the baud rate (38400 used) is too low or the SDR simply cannot respond quick enough.
However I will try to find out what is going on as one of the targets is to have a "two way" system. So that if you tune or change mode or TX/RX on the radio the MEGA follows along.
No comments:
Post a Comment