Skip to content

Commit

Permalink
Merge pull request #603 from analogdevicesinc/tfcollins/ad9467-updates
Browse files Browse the repository at this point in the history
Remove pluto from AD9467 example
  • Loading branch information
tfcollins authored Oct 4, 2024
2 parents a2301e8 + e2e2bd8 commit 5f1030f
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions examples/ad9467.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,13 @@
from scipy import signal

# Create radio
rx = adi.ad9467(uri="ip:analog")
tx = adi.Pluto()
dev = adi.ad9467(uri="ip:analog")
fs = int(250e6) # May need to adjust based on device

# Configure tx properties
tx.tx_lo = 2000000000
tx.tx_cyclic_buffer = True
tx.tx_hardwaregain_chan0 = -30
tx.gain_control_mode_chan0 = "slow_attack"

# Create a sinewave waveform
fs = int(tx.sample_rate)
N = 1024
fc = int(3000000 / (fs / N)) * (fs / N)
ts = 1 / float(fs)
t = np.arange(0, N * ts, ts)
i = np.cos(2 * np.pi * t * fc) * 2 ** 14
q = np.sin(2 * np.pi * t * fc) * 2 ** 14
iq = i + 1j * q

# Send data
tx.tx(iq)

# Collect data
for r in range(20):
x = rx.rx()
x = dev.rx()
f, Pxx_den = signal.periodogram(x, fs)
plt.clf()
plt.semilogy(f, Pxx_den)
Expand Down

0 comments on commit 5f1030f

Please sign in to comment.