Page 1 of 1

Synchronize red pitaya with arduino

Posted: Thu Jun 01, 2023 5:19 pm
by f_sat
Hi, for a project I need to generate 3 PWM to control 3 motors, but the Red Pitaya can only generate 2, so I have decided to use an arduino as an intermediary only for this, however I don't know how to synchronize it with the red pitaya to control from those pwm.

My other option is to use the gpio to generate the pwm but I don't think it's as simple as doing this:


rp_DpinSetDirection(RP_DIO5_N, RP_OUT);

rp_GenReset();
rp_GenFreq(RP_DIO5_N, 20000.0);
rp_GenAmp(RP_DIO5_N, 1.0);
rp_GenWaveform(RP_DIO5_N, RP_WAVEFORM_PWM);
rp_GenOutEnable(RP_DIO5_N);

I have little experience in this but I hope you can help me and advise me, thank you.

Re: Synchronize red pitaya with arduino

Posted: Fri Jun 02, 2023 10:51 am
by redpitaya
Perhaps by using UART, SPI, or I2C communication as an intermediate for sending commands.
Do not forget to connect the "Ext. common mode GND" to the Arduino GND pin.

Re: Synchronize red pitaya with arduino

Posted: Fri Jun 02, 2023 8:45 pm
by Bulova
Hello,
as far as I know, even the Arduino Uno itself can provide six PWM channels.

Best regards

Dieter