I want to continuously sample the data with a trigger. Therefore, I connected the RP input1 with sine signal(amplitude: 1V, frequency 20kHz), input2 with ramp signal(amplitude: 0.8V, frequency 50kHz). Then, I tried the axi_adc (Thanks to Nils) without any modification in the Redpitaya/Examples/C in the following way.
Code: Select all
redpitaya> cd RedPitaya/
redpitaya> make api
Makefile:134: warning: overriding recipe for target 'tmp'
Makefile:131: warning: ignoring old recipe for target 'tmp'
make -C api/rpbase
make[1]: Entering directory '/root/RedPitaya/api/rpbase'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/RedPitaya/api/rpbase'
make -C api/rpbase install INSTALL_DIR=/root/RedPitaya/build
make[1]: Entering directory '/root/RedPitaya/api/rpbase'
make -C src install INSTALL_DIR=/root/RedPitaya/build
make[2]: Entering directory '/root/RedPitaya/api/rpbase/src'
mkdir -p /root/RedPitaya/build/lib
mkdir -p /root/RedPitaya/build/include
cp ../../lib/librp.so /root/RedPitaya/build/lib
cp -r ../../include/redpitaya /root/RedPitaya/build/include
make[2]: Leaving directory '/root/RedPitaya/api/rpbase/src'
make[1]: Leaving directory '/root/RedPitaya/api/rpbase'
redpitaya> cd Examples/C
redpitaya> make axi_adc
gcc -g -std=gnu99 -Wall -Werror -I../../api/include -L ../../api/lib -lm -lpthread -lrp axi_adc.c -o axi_adc
redpitaya> LD_LIBRARY_PATH=/opt/redpitaya/lib ./axi_adc
Code: Select all
clear all; clc;
u = udp('192.168.1.1',5001, 'LocalPort', 9000);
fopen(u)
A=fread(u, 10);
fclose(u)
Or, could you please give me some suggestions or references for data transfer from RP to computer using the UDP protocol? Thank you very much.
Kind regards,
Chang