I received a pair of I/O boards yesterday. Came with pins as others noted, nice.
Loaded up one of the boards with the test program and put an oscope on it, all looked proper. Used the Python test program, worked great.
I have a vacuum desoldering tool so I removed the long header easily and removed one of the 2 spacers. Reinstalled the header and now it sits level. Clears the case top fine.
I have a 5-band VHF transverter that covers 144/222/432/902/1296 bands. I built a DB-9 to DB15 cable and assigned pins 1-4 for Band Data 0-3, and pin 5 for PTT, Pin 9 for ground. I installed wire jumpers from the DB9 header to the J6 pins 1-5. The pin pattern is inverted to make the Xvtr change bands correctly, ie, set to I/O pin to value=1 to close the MOSFET switch to ground, representing a 0 input as desired. I can use the Python test program and change bands and operate PTT. All good so far.
I got my VS Code and command line compile setup on Win 11 OK. I use VS Code with Arduino and Teensy 4 for my Teensy SDR development but have never tried it with a Pico before. There is a Windows installer that makes things easier.
Raspberry Pi Pico Windows Installer - Raspberry PiYOU can compile and attempt to run in VS Code but it fails, needs more setup. I had to manually add paths to my env for the Toolchain and SDK. The cmd line cmake/make approach worked after the path were setup.
I modified n2adr_basic configure_pins.c and main.c, compiled successfully. I redefined the example HF bands in switch(band) section of main.c to operate my 4 I/O pins for 6M and 144-1296 bands.
After some playing around with the latest Quisk and Thetis HL2 builds which support the IO board I noted some things were not as I expected. I modified the code to force things to work but I think something is amiss. Now to figure out if the error is mine or if the problem is external.
Here is what I saw:
1. The RX frequency does not appear to be sent and/or read. My band outputs did not change as I changed bands while in RX. If I changed bands then pressed PTT, the band did change implying the logic is ignoring RX, or the RX change detection never kicked in (because there was no new I2C RX freq data?). It was using TX freq OK.
When I initially added code to force the changes, it would change to the correct band on TX only, then pop back to one single band, 432MHz in my case which might suggest it actually read 1 frequency in RX - not sure what yet.
Finally I bypassed the rx_freq_changed test (with "if (1)" per below). The RX band changes then worked. I suspect this is causing a lot of extra work as a result.
// Poll for a change in one of the twelve Rx frequencies. The rx_freq_changed is set in the I2C handler.
if (1) { //rx_freq_changed) {
rx_freq_changed = false;
change_band = true;
if (rx_freq_high == 0)
rx_band = tx_band;
else
rx_band = fcode2band(rx_freq_high); // Convert the frequency code to a band code.
}
if (change_band) {
Feels like "rx_freq_changed" is not working for some reason. After all was working good here I went back and restored that if (1) to original code and sure enough, no band change while in RX. PTT works fine still.
2. Since band change is set to True for a change in RX/TX state, I call a small function Xvtr_PTT(state) that sets my pin 5 (Xvtr PTT) to match the current TX/RX state. Seemed easier than adding logic at the very end. For RX band changes, probably added unnecessary extra work though. Here is my Xvtr logic which happens to be the Elecraft K3 patterns (recall they are inverted). Might need a bit of delay to ensure the Xvtr band change is settled.
case BAND_125cm:
gpio_put(GPIO02_RF3, 1); // default REG_RF_INPUTS = 1 for Split IF
gpio_put(GPIO03_INTTR, 1); // default REG_RF_INPUTS = 1 for Split IF
gpio_put(GPIO16_Out1, 0);
gpio_put(GPIO19_Out2, 0);
gpio_put(GPIO20_Out3, 1);
gpio_put(GPIO11_Out4, 1);
Xvtr_PTT(current_is_rx);
break;
case BAND_70cm:
3. I set REG_RF_INPUTS = 1 for split IF. I can do this via the Python test app fine. IT is register 11 and GPIO2 and 3. I am not sure yet the correct way to set these to the registers are updated properly. If I write to the 2 GPIO pins I do not see the correct register value for register 11 in the test app. Is there a way to write the register in C to emulate the I2C command process? I am thinking I can call this as done in the IRQ handler, inserting REG_RF_INPUTS in place of i2c_regs_control. Will test that next.
Registers[i2c_regs_control] = data;
4. I verified the band volts changes with each band though it is undefined for most of my Xvtr bands as expected.
Overall, couple hours and it is working. Now to spruce things up.
Nice job Jim and contributors!
Mike K7MDL