je1rav / QP-7C_RP2040_CAT_Arduino

GNU General Public License v3.0
1 stars 1 forks source link

Windows serial cat problem #1

Open mpmarks opened 1 year ago

mpmarks commented 1 year ago

First THANK YOU so much for sharing your code and hardware designs. I was trying to build the same kind of radio - a pico controller and audio input and output for ft8, etc. I was able to use the c code on the tinyusb pico examples but really wanted to be able to build on VSCode with C++, which is much more convenient.

I have a simple fix for you for the CAT problem on Windows. I saw that the Serial.available() was not detecting the input characters and traced it back to how Hamlib in WSJT opens the serial port on Windows. I found that if you change the Radio settings in WSJT to set DTR and RTS high and handshake=none CAT control works on Windows, and the USB audio works as well. That avoids needing the Python program.

I hope that is useful information for you.

je1rav commented 1 year ago

Thank you for your great comments. I have tested your suggestion and it worked fine. I will rewrite and add the document you mentioned. (sorry that is written in Japanese).

mpmarks commented 1 year ago

If I can make another suggestion for you. In the adc() routine you take 24 12 bit adc samples and add them into a 16 bit accumulator. That can lead to an overflow depending on the input data values. I changed the accumulator to int32_t and then returned the average value (adc/24). That reduced the signal noise a lot.

je1rav commented 1 year ago

Thanks for the advice. I will change the adc routine this weekend and test it according to your suggestion.

je1rav commented 1 year ago

I tested the adc routine this weekend. The input deviation is about 100 mV, so the 16-bit accumulator will not overflow if the offset constant is appropriate. However, I set the variable to 32 bits for the safe. Also, the current output value may be too large, so I made it possible to divide it according to user requirements. Thank you for your suggestions.