0

I am currently using thePmodAD1 in this mod for signal reception

This is my code

from DesignSpark.Pmod.HAT import createPmod
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
adc = createPmod('AD1','JBA')
point[]
i=0
while i < 1000:
  point.append(adc.readA1Volts())

plt.xlim(0,100)
plt.ylim(0,5)
plt.plot(point)
plt.show()

I use this code when I input more than 1Khz sine wave, my waveform will start to become malformed, I know it is the relationship of the sampling rate is not enough, but I have adjusted the mod spi_max_speed to 12Mhz But no matter what The waveforms are still the same

in this article

It is said that it is the limitation of the linux spi driver. I counted the points, and my sampling rate is almost 20k.

Excuse me, if I want to get the complete 40k and 40khz waveforms, store the points of the waveforms in the matrix, and export the matrix to .csv, how can I do it with python?

forgot to type in the sample rate I needed I need a sample rate of at least 384khz The raspberry pi I am using now is raspberry pi 3b Linux Kernel is version 5.15.32-V7 The ADC part is directly plugged into the module, I don't know how his pins are connected

4
  • I doubt it is possible. However we will not know until you give details of the Pi you are using and how many samples a second you wish to take. Neither do we know how the ADCs are connected to the Pi. Your question suggests SPI. You need to edit ALL clarifications INTO YOUR QUESTION.
    – joan
    May 18 at 15:18
  • forgot to type in the sample rate I needed I need a sample rate of at least 384khz The raspberry pi I am using now is raspberry pi 3b Linux Kernel is version 5.15.32-V7 The ADC part is directly plugged into the module, I don't know how his pins are connected May 18 at 16:51
  • My opinion is you are wasting your time trying to do this with the Pi. You really need to pose the question to the vendor. If it is possible at all you will need to use C rather than Python.
    – joan
    May 18 at 17:35
  • It may not be possible to write it in C, because I need to use gnuradio's python block to receive the value , I don't just need the values, I want to store the values ​​in a matrix and print them out. May 18 at 17:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.