The reason for having a programmable attenuator in a VNA’s test set is to accommodate devices under test that have widely different forward and reverse gains, such as amplifiers. For this 0-70 dB step attenuator, I have a bunch of very nice Teledyne J412 DPDT TO-5 relays that have high isolation, low SWR, and are specified for use to 1 GHz. Thank heavens for Ebay, once again, where I found them for less than $10 each instead of the catalog price of $68. For attenuators, I’m using Minicircuits GAT-10 parts, which provide an accurate 10 dB in an SMT package. The final board is 2x4 inches.
Since the N2PK VNA interface supplies 3 bits for attenuation setting, a decoder is required. No simple logic device will do the job, since the objective is to turn on N relays where N is 0...7. A programmable logic device would do, or in my case I used a Z8 Encore microcontroller that I had laying around. By running its internal clock at 32 kHz, no RFI was detectable above -120 dBm.